plotFC: Estimate And Plot Fold Change Accuracy

Description Usage Arguments Value Examples

View source: R/plotFC.R

Description

For each pipeline, differential expression is estimated by fold change on mean signals across replicates of cell lines. For features that are truely differential expressed, their fold changes levels are summarized based on different levels of detrended logsignals.

Usage

1
2
plotFC(dat, positive, fcsign, constant = 0.5, loessspan = 1/3,
  thresholds = c(1, 6), ...)

Arguments

dat

A rnaseqcomp S4 class object.

positive

A logical vector with length equivalent to row number of matrices in dat@quantData. TRUE means true differential and FALSE means true non-differential, while missing value NA means unknown.

fcsign

A numeric vector with length equivalent to row number of matrices in dat@quantData. Only values 1, -1, 0, NA are allowed. 1 means upregulated in second cell line, -1 means downregulated in second cell line, and 0 means no change. If elements in fcsign is NA or correspond to NA in positive, these elements will be ignored in estimation.

constant

A numeric constant that is added to quantifications before fold changes calculation. (default: 0.5)

loessspan

A numeric number indicating span used for loess smooth. Details see loess.smooth function. (Default: 1/3)

thresholds

A numeric vector defining cutoffs on fold changes as the points to make threshold averaging on ROC curves. (default: seq(12, 0, len = 300))

...

Parameters for base function plot.

Value

plot

Fold change plots for all the quantification pipelines.

list

A list of two numeric vectors indicating median and standard error of fold changes in three different levels of detrended logsignals.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(simdata)
condInfo <- factor(simdata$samp$condition)
repInfo <- factor(simdata$samp$replicate)
evaluationFeature <- rep(TRUE, nrow(simdata$meta))
calibrationFeature <- simdata$meta$house & simdata$meta$chr == 'chr1'
unitReference <- 1
dat <- signalCalibrate(simdata$quant, condInfo, repInfo, evaluationFeature,
calibrationFeature, unitReference, calibrationFeature2 = calibrationFeature)
## only select the true differential that have exact fold changes
simdata$meta$fcsign[simdata$meta$fcstatus == "off.on"] <- NA
plotFC(dat,simdata$meta$positive,simdata$meta$fcsign)

Example output

$med
      rsem fluxcapacitor
A<=1  0.53          0.39
1<A<6 0.96          0.77
A>=6  0.93          0.85

$se
       rsem fluxcapacitor
A<=1  0.012         0.016
1<A<6 0.012         0.021
A>=6  0.007         0.013

rnaseqcomp documentation built on Nov. 8, 2020, 8:04 p.m.