limmaCtData {HTqPCR} | R Documentation |
Function for detecting differentially expressed genes from high-throughput qPCR Ct values, based on the framework from the limma
package. Multiple comparisons can be performed, and across more than two groups of samples.
limmaCtData(q, design = NULL, contrasts, sort = TRUE, stringent = TRUE, ndups = 1, spacing = NULL, dupcor, ...)
q |
object of class qPCRset. |
design |
matrix, design of the experiment rows corresponding to cards and columns to coefficients to be estimated. See details. |
contrasts |
matrix, with columns containing contrasts. See details |
sort |
boolean, should the output be sorted by adjusted p-values. |
stringent |
boolean, for flagging results as "Undetermined". See details. |
ndups |
integer, the number of times each feature is present on the card. |
spacing |
integer, the spacing between duplicate spots, spacing=1 for consecutive spots |
dupcor |
list, the output from |
... |
any other arguments are passed to |
This function is a wrapper for the functions lmFit
, contrasts.fit
(if a contrast matrix is supplied) and eBayes
from the limma package. See the help pages for these functions for more information about setting up the design and contrast matrices.
All results are assigned to a category, either "OK" or "Unreliable" depending on the input Ct values. If stringent=TRUE
any unreliable or undetermined measurements among technical and biological replicates will result in the final result being "Undetermined". For stringent=FALSE
the result will be "OK" unless at least half of the Ct values for a given gene are unreliable/undetermined.
Note that when there are replicated features in the samples, each feature is assumed to be present the same number of times, and with regular spacing between replicates. Reordering the sample by featureNames
and setting spacing=1
is recommendable.
If technical sample replicates are available, dupcor
can be used. It is a list containing the estimated correlation between replicates. limmaCtData
will then take this correlation into account when fitting a model for each gene. It can be calculate using the function duplicateCorrelation
. Technical replicates and duplicated spots can't be assessed at the same time though, so if dupcor
is used, ndups
should be 1.
A list of data.frames, one for each column in design
, or for each comparison in contrasts
if this matrix is supplied. Each component of the list contains the result of the given comparisons, with one row per gene and has the columns:
genes |
Feature IDs. |
feature.pos |
The unique feature IDs from |
t.test |
The result of the t-test. |
p.value |
The corresponding p.values. |
adj.p.value |
P-values after correcting for multiple testing using the Benjamini-Holm method. |
ddCt |
The deltadeltaCt values. |
FC |
The fold change; 2^(-ddCt). |
meanTest |
The average Ct across the test samples for the given comparison. |
meanReference |
The average Ct across the reference samples for the given comparison. |
categoryTest |
The category of the Ct values ("OK", "Undetermined") across the test samples for the given comparison. |
categoryReference |
The category of the Ct values ("OK", "Undetermined") across the reference samples for the given comparison. |
Also, the last item in the list is called "Summary", and it's the result of calling decideTests
from limma on the fitted data. This is a data frame with one row per feature and one column per comparison, with down-regulation, no change and up-regulation marked by -1, 0 and 1.
Heidi Dvinge
Smyth, G. K. (2005). Limma: linear models for microarray data. In: Bioinformatics and Computational Biology Solutions using R and Bioconductor. R. Gentleman, V. Carey, S. Dudoit, R. Irizarry, W. Huber (eds), Springer, New York, pages 397–420.
lmFit
, contrasts.fit
and ebayes
for more information about the underlying limma functions. mannwhitneyCtData
and ttestCtData
for other functions calculating differential expression of Ct data. plotCtRQ
, heatmapSig
and plotCtSignificance
can be used for visualising the results.
# Load example preprocessed data data(qPCRpros) samples <- read.delim(file.path(system.file("exData", package="HTqPCR"), "files.txt")) # Define design and contrasts design <- model.matrix(~0+samples$Treatment) colnames(design) <- c("Control", "LongStarve", "Starve") contrasts <- makeContrasts(LongStarve-Control, LongStarve-Starve, Starve-Control, levels=design) # The actual test diff.exp <- limmaCtData(qPCRpros, design=design, contrasts=contrasts) # Some of the results diff.exp[["LongStarve - Control"]][1:10,]