deAna: Differential expression analysis between two sample groups

Description Usage Arguments Value Author(s) See Also Examples

View source: R/deAna.R

Description

The function carries out a differential expression analysis between two sample groups. Resulting fold changes and derived p-values are returned. Raw p-values are corrected for multiple testing.

Usage

1
2
deAna(expr, grp = NULL, blk = NULL, de.method = c("limma", "edgeR",
  "DESeq"), padj.method = "BH", stat.only = FALSE, min.cpm = 2)

Arguments

expr

Expression data. A numeric matrix. Rows correspond to genes, columns to samples. Alternatively, this can also be an object of class SummarizedExperiment.

grp

*BINARY* group assignment for the samples. Use '0' and '1' for unaffected (controls) and affected (cases) samples, respectively. If NULL, this is assumed to be defined via a column named 'GROUP' in the colData slot if 'expr' is a SummarizedExperiment.

blk

Optional. For paired samples or sample blocks. This can also be defined via a column named 'BLOCK' in the colData slot if 'expr' is a SummarizedExperiment.

de.method

Differential expression method. Use 'limma' for microarray and RNA-seq data. Alternatively, differential expression for RNA-seq data can be also calculated using edgeR ('edgeR') or DESeq2 ('DESeq'). Defaults to 'limma'.

padj.method

Method for adjusting p-values to multiple testing. For available methods see the man page of the stats function p.adjust. Defaults to 'BH'.

stat.only

Logical. Should only the test statistic be returned? This is mainly for internal use, in order to carry out permutation tests on the DE statistic for each gene. Defaults to FALSE.

min.cpm

In case of RNA-seq data: should genes not satisfying a minimum counts-per-million (cpm) threshold be excluded from the analysis? This is typically recommended. See the edgeR vignette for details. The default filter is to exclude genes with cpm < 2 in more than half of the samples.

Value

A DE-table with measures of differential expression for each gene/row, i.e. a two-column matrix with log2 fold changes in the 1st column and derived p-values in the 2nd column. If 'expr' is a SummarizedExperiment, the DE-table will be automatically appended to the rowData slot.

Author(s)

Ludwig Geistlinger <[email protected]>

See Also

readSE for reading expression data from file, normalize for normalization of expression data, voom for preprocessing of RNA-seq data, p.adjust for multiple testing correction, eBayes for DE analysis with limma, glmFit for DE analysis with edgeR, and DESeq for DE analysis with DESeq.

Examples

1
2
3
4
5
6
7
8
9
    # (1) microarray data: intensity measurements
    maSE <- makeExampleData(what="SE", type="ma")
    maSE <- deAna(maSE)
    rowData(maSE, use.names=TRUE)
    
    # (2) RNA-seq data: read counts
    rseqSE <- makeExampleData(what="SE", type="rseq")
    rseqSE <- deAna(rseqSE, de.method="DESeq")
    rowData(rseqSE, use.names=TRUE)

EnrichmentBrowser documentation built on Aug. 10, 2018, 6 p.m.