deSpikein: Runs a spike-in differential expression analysis.

Description Usage Arguments Value Examples

View source: R/function.diff.R

Description

Runs a differential expression analysis and compares it to real differences between spike-in mixes. Sleuth is handled in a different function (see sleuthWrapper) A warning is given if the specified/expected mix distribution does not match the observed one.

Usage

1
2
3
deSpikein(dat, method = "edgeR", norm = "TMM", quantification = "",
  homogenize.mixes = TRUE, saveResults = FALSE, savePlot = FALSE,
  mix1 = NULL)

Arguments

dat

The counts matrix or data.frame, with gene symbols or transcript Refseq IDs as row.names, and sample names as column headers.

method

The differential expression method to use. Either 'edgeR', 'DESeq', 'DESeq2', 'EBSeq', 'voom', 't' (t-test), or 'logt' (t-test on log-transformed values). A string indicating the unit of the expression matrix (either "FPKM", "TPM" or "COUNTS").

norm

The normalization method to use (either "linear", or any of the methods supported by edgeR's calcNormFactors. Defaults to 'TMM'.

quantification

A string indicating the name of the analysis/pipeline form which the quantification comes. Will be used in filenames, plot titles, etc.

homogenize.mixes

logical, whether the two spike-in mixes should be homogenized for the purpose of calculating normalization factors.

saveResults

Logical, whether to save the results of the DEA in the current working directory (default FALSE).

savePlot

Logical, whether to save the plot in the current working directory (default FALSE).

mix1

A character vector indicating the column names of 'dat' that have been spiked with mix 1. If you are using the SEQC data or the dataset at the basis of this package, leave this to NULL.

Value

A data.frame with the results of the differential expression analysis, as well as a plot.

Examples

1
2
3
data(exampledata)
res <- deSpikein(exampleGeneLevel, method="edgeR", norm="TMM", 
  quantification="Tophat-featureCounts")

plger/RNAontheBENCH documentation built on May 25, 2019, 8:22 a.m.