Learn R Programming

rnaseqcomp (version 1.0.0)

plotCAT: CAT Plots of Differential Express Features

Description

For each pipeline, 2 biological conditions (cell lines) each with 2 quantification replicates are compared and fold changes of each replicate are calculated. Then, CAT plots between replicates (precision) or between mean of replicates and other technology (accuracy).

Usage

plotCAT(dat1, dat2, constant = NULL, otherFC = NULL, infinity = FALSE, step = 5L, type = "l", lwd = 2, col = NULL, lty = 1, xlim = c(20L, 500L), ylim = c(0, 1), xlab = "Size of List", ylab = "Proportion in Common", cex.leg = 0.6, ...)

Arguments

dat1,dat2
rnaseqcomp S4 class objects for two conditions. dat1 and dat2 should have the same size of slot quantData and the same repInfo.
constant
A numeric constant that can be added to quantifications before fold changes calculation (default: NULL).
otherFC
A numeric vector of fold changes by other independent technology such as microarray, with each elements corresponding to rows of quantData slot in dat1 or dat2. Missing data NA allowed. (default: NULL)
infinity
A logical indicator that specify if fold change of infinity should be considered. Functional only if constant is not a positive number. (default: FALSE)
step
Plot steps on x-axis (default: 5).
type
Plot types (default: 'l').
lwd
Plot line weights (default: 2).
col
Plot colors (default: NULL, colors are assigned by package RColorBrewer).
lty
Plot line styles (default: 1).
xlim
Plot limits of x-axis (default: c(20, 500)).
ylim
Plot limits of y-axis (default: c(0, 1)).
xlab
Plot label of x-axis (default: 'Size of List').
ylab
Plot label of y-axis (default: 'Proportion in Common').
cex.leg
Legend size (default: 0.6).
...
Other parameters for base function plot.

Value

CAT plot
CAT plots for all the quantification pipelines.
Precision or Accuracy
A numeric vector of pipeline precision or accuracy, depending on whether otherFC is provided.

Examples

Run this code
data(encodeCells)
evaluationFeature <- encodeCells$genemeta$type == "protein_coding"
calibrationFeature <- encodeCells$genemeta$housekeeping
unitReference <- grepl("Cufflinks",encodeCells$repInfo)
dat1 <- matrixFilter(encodeCells$gm12878,encodeCells$repInfo,
    evaluationFeature,calibrationFeature,unitReference)
dat2 <- matrixFilter(encodeCells$k562,encodeCells$repInfo,
    evaluationFeature,calibrationFeature,unitReference)

plotCAT(dat1,dat2)
plotCAT(dat1,dat2,infinity=TRUE)

genes <- encodeCells$genemeta[encodeCells$genemeta$type ==
    "protein_coding", 1]
otherFC <- encodeCells$arrayFC[match(genes,names(encodeCells$arrayFC))]
plotCAT(dat2,dat1,otherFC=otherFC)
plotCAT(dat2,dat1,constant=1,otherFC=otherFC)

Run the code above in your browser using DataLab