plotGenes: Plotting Ct values from qPCR across multiple samples.

Description Usage Arguments Details Value Author(s) See Also Examples

Description

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.

Usage

1
plotCtLines(q, genes, groups, col = brewer.pal(10, "Spectral"), xlab = "Sample", ylab = "Ct", legend = TRUE, lwd = 2, lty, pch, xlim, ...)

Arguments

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 q belong to. See details.

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 par or lines for details.

pch

vector, if groups is set, the point types that will be used for each feature in genes.

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 matplot function.

Details

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.

Value

A plot is created on the current graphics device.

Author(s)

Heidi Dvinge

See Also

matplot

Examples

1
2
3
4
5
6
7
8
# 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)

Example output

Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colMeans, colSums, colnames, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
    setdiff, sort, table, tapply, union, unique, unsplit, which,
    which.max, which.min

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: RColorBrewer
Loading required package: limma

Attaching package: 'limma'

The following object is masked from 'package:BiocGenerics':

    plotMA

Warning message:
In read.dcf(con) :
  URL 'http://bioconductor.org/BiocInstaller.dcf': status was 'Couldn't resolve host name'

HTqPCR documentation built on Nov. 1, 2018, 2:23 a.m.