Learn R Programming

HTqPCR (version 1.26.0)

changeCtLayout: Changing the dimensions (rows x columns) of qPCRset objects

Description

A function for splitting up the individual qPCR cards, in case there are multiple samples present on each card. I.e. for cases where the layout isn't 1 sample x 384 features, but for example 4 samples x 96 features on each 384 well card.

Usage

changeCtLayout(q, sample.order)

Arguments

q
a qPCRset object.
sample.order
vector, same length as number of features on each card (e.g. 384). See details.

Value

Details

The result from each qPCR run of a given card typically gets presented together, such as in a file with 384 lines, one per feature, for 384 well plates. However, some cards may contain multiple samples, such as commercial cards that are designed to be loaded with two separate samples and then include 192 individual features.

Per default, each card is read into the qPCRset object as consisting of a single sample, and hence one column in the Ct data matrix. When this is not the case, the data can subsequently be split into the correct features x samples (rows x columns) dimensions using this function. The parameter sample.order is a vector, that for each feature in the qPCRset indicates what sample it actually belongs to.

In the new qPCRset the samples (Ct columns) are ordered first by sample.order then by the original sampleNames, as shown in the examples below.

Examples

Run this code
# Example data
data(qPCRraw)
# With e.g. 2 or 4 samples per 384 well card.
sample2.order	<- rep(c("subSampleA", "subSampleB"), each=192)
sample4.order	<- rep(c("subA", "subB", "subC", "subD"), each=96)
# Splitting the data into all individual samples
qPCRnew2 <- changeCtLayout(qPCRraw, sample.order=sample2.order)
show(qPCRnew2)
qPCRnew4 <- changeCtLayout(qPCRraw, sample.order=sample4.order)
show(qPCRnew4)
sampleNames(qPCRnew4)

Run the code above in your browser using DataLab