plotCtLines {HTqPCR} | R Documentation |
This function is for displaying a set of features from a qPCRset across multiple samples, such as a timeseries or different treatments. Values for each feature are connected by lines, and the can be averaged across groups rather than shown for individual smaples.
plotCtLines(q, genes, groups, col = brewer.pal(10, "Spectral"), xlab = "Sample", ylab = "Ct", legend = TRUE, lwd = 2, lty, pch, xlim, ...)
q |
object of class qPCRset. |
genes |
numeric or character vector, selected genes to make the plot for. |
groups |
vector, the different groups that the samples in |
col |
vector, colours to use for the lines. |
xlab |
character string, label for the x-axis. |
ylab |
character string, label for the y-axis. |
legend |
logical, whether to include a colour legend or not. |
lwd |
numeric, the width of the lines. |
lty |
vector, line types to use. See |
pch |
vector, if |
xlim |
vector of length two, the limits for the x-axis. Mainly used for adjusting the position of the legend. |
... |
any other arguments will be passed to the |
The default plot shows the Ct values across all samples in q
, with lines connecting the samples. However, if groups
is set the Ct values will be averaged within groups. Lines connect these averages, but the individual values are shown with different point types, as chosen in pch
.
A plot is created on the current graphics device.
Heidi Dvinge
# Load some example data data(qPCRraw) samples <- exFiles <- read.delim(file.path(system.file("exData", package="HTqPCR"), "files.txt")) # Draw dfferent plots plotCtLines(qPCRraw, genes=1:10) plotCtLines(qPCRraw, genes=1:10, groups=samples$Treatment, xlim=c(0,3)) feat <- as.numeric(as.factor(featureType(qPCRraw)[1:10])) plotCtLines(qPCRraw, genes=1:10, col=feat)