Description Usage Arguments Details Value Author(s) Examples
View source: R/plotCtOverview.R
Function for high-throughput qPCR data, for showing the average Ct values for features in a barplot, either for individual samples or averaged across biological or technical groups. If Ct values are shown, error bars can be included, or the Ct values can be displayed relative to a calibrator sample.
1 |
q |
object of class qPCRset. |
cards |
integer, the cards (samples) to use. Defaults to all. |
genes |
vector selecting the features to show. See Details. |
groups |
vector with groups to average the samples across. If missing all the samples are displayed individually. See Details. |
calibrator |
the value in |
replicates |
logical, if should values from replicated features in each sample be collapsed or kept separate. |
col |
colours to use for each sample or group. Per default a maximum of 10 colours are used, so this parameter should be set if more than 10 groups are present. |
conf.int |
logical, should the 95 percent confidence interval be shown. See Details. |
legend |
logical, should a legend be included in the plot. |
... |
further arguments passed to |
If a calibrator is chosen all values will be displayed relative to this, i.e. as Ct(sample)-Ct(calibrator). If there is no calibrator, the full Ct values are shown, including 95% confidence interval if selected. For confidence intervals when there is a calibrator, it's the variation across Ct(sample)-average(Ct(calibrator)) that is shown.
When setting replicates=TRUE
it is often better to specify genes
by name rather than selecting for example the first 10 features using 1:10. This literally only takes the first 10 rows of the data, although some of these features might be replicated elsewhere in the data.
The purpose of group
is to tell plotCtOverview if any of the samples should be treated as biological replicates, in addition to the technical replicates that might be present on each plate. With e.g. 4 samples and groups=c("A", "B", "C", "D")
they're each treated individually, and only replicates features on each plate are considered. However, groups=c("WT", "WT", "WT", "mutant")
means that the first 3 are treated as biological replicates; hence for each gene in the barplot there'll be one bar for WT and one for mutant.
A figure is produced in the current graphics device.
Heidi Dvinge
1 2 3 4 5 6 7 8 9 10 11 12 13 | # Load example data
data(qPCRraw)
exPath <- system.file("exData", package="HTqPCR")
samples <- read.delim(file.path(exPath, "files.txt"))
# Show all samples for the first 10 genes
g <- featureNames(qPCRraw)[1:10]
plotCtOverview(qPCRraw, genes=g, xlim=c(0,90))
plotCtOverview(qPCRraw, genes=g, xlim=c(0,50), groups=samples$Treatment)
plotCtOverview(qPCRraw, genes=g, xlim=c(0,60), groups=samples$Treatment, conf.int=TRUE, ylim=c(0,55))
# Relative to a calibrator sample
plotCtOverview(qPCRraw, genes=g, groups=samples$Treatment, calibrator="Control")
plotCtOverview(qPCRraw, genes=g, groups=samples$Treatment, calibrator="Control", conf.int=TRUE, ylim=c(-0.5,0.5))
plotCtOverview(qPCRraw, genes=g, groups=samples$Treatment, calibrator="LongStarve")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.