Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/plotCtVariation.R
Examine the variation in Ct values, either across features present multiple times on each card, or for within different groups of samples. The function supports both a summarised and a more detailed output.
1 |
q |
object of class qPCRset. |
cards |
vector, the numbers of the cards to plot. Defaults to TRUE = all cards. |
variation |
character string indication whether to calculate the variation, "var", or standard deviation, "sd". |
type |
character string indicating whether to output the results in a summarised boxplot, "summary" or as a more detailed scatter plot, "detail". See Details and the examples. |
sample.reps |
a vector grouping the samples (see Details). Overrides |
feature.reps |
a vector grouping the features according to which are replicates. Per default |
log |
logical, should the results be converted into log10 values. |
add.featurenames |
logical, if |
ylab |
character, the label of the y-axis. |
n.col |
integer, if |
... |
further arguments passed to |
It is often useful to examine the data to determine if some samples are inherently more variable than other, or if the concordance between replicates on each qPCR card is acceptable. Using type="summary"
generates a boxplot with all the variation values, either across genes (if sample.reps
is set) or with each samples (default, or if feature.reps
is set). That way the general distribution of variation or standard deviation values can be compared quickly.
If it looks like there's an unacceptable (or interesting) difference in the variation, this can be further investigated using type="detail"
. This will generate multiple sub-plots, containing a single scatterplot of variation versus mean for each gene (if sample.reps
is set) or each sample (default, or if feature.reps
is set). Including the mean in the plot can be used to assess heteroskedasticity in the data.
A plot is created on the current graphics device. The variation and mean across each type of replicate is returned invisibly in a list with "Var" and "Mean" slots.
Heidi Dvinge
plotCtReps
for cases where the qPCR card only contains two replicates of each feature. plotCVBoxes
for other ways of plotting variation within different groups.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # Load some example data
data(qPCRraw)
# Detailed summary of variation versus mean Ct value for replicated features within each sample
plotCtVariation(qPCRraw, type="detail", log=TRUE)
plotCtVariation(qPCRraw, type="detail")
# Add feature names to see which the highly varying replicates are.
plotCtVariation(qPCRraw, type="detail", add.featurenames=TRUE, pch=" ", cex=0.8)
# Use different information to indicate which features are replicates
plotCtVariation(qPCRraw, type="detail", feature.reps=paste("test", rep(1:96, each=4)))
# Examine variation across samples for the first 9 features
plotCtVariation(qPCRraw[1:9,], type="detail", sample.reps=paste("mutant", rep(1:3,2)), add.featurenames=TRUE)
# Examine the output
test <- plotCtVariation(qPCRraw, variation="sd")
names(test)
head(test[["Var"]])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.