limma_dge: Using 'limma_dge' for 'raw' and 'fpkm' counts

Description Usage Arguments Value Note See Also Examples

Description

limma_dge uses the limma package for DGE analysis on fpkm_counts and raw_counts object, and optionally also directly on an ExpressionSet object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
limma_dge(x, ...)

## Default S3 method:
limma_dge(x, ...)

## S3 method for class 'ExpressionSet'
limma_dge(x, design, contrast, voom = FALSE, ...)

## S3 method for class 'fpkm_counts'
limma_dge(x, design, contrast, voom = FALSE, ...)

## S3 method for class 'raw_counts'
limma_dge(x, design, contrast, voom = TRUE, ...)

Arguments

x

An object of class fpkm_counts, raw_counts or ExpressionSet.

...

Additional arguments.

design

A design matrix. See construct_design.

contrast

Contrast to compute DGE for. See construct_contrasts.

voom

Logical. If TRUE, applies voom transformation. Default is FALSE. Only relevant for limma_dge method.

Value

An object of class dge consisting of top tables from running the corresponding limma_dge method.

Note

The term differential gene expression or DGE is not used in a restrictive manner and applies to genomic features in general, i.e., genes, transcripts, exons etc.

See Also

rnaseq, gather_counts show_counts edger_dge construct_design construct_contrasts write_dge as.dgelist as.eset volcano_plot density_plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
path = system.file("tests", package="ganalyse")

# ----- fpkm ----- # 
fpkm_path = file.path(path, "fpkm", "annotation.txt")
fpkm_obj = rnaseq(fpkm_path, format="fpkm", experiment="sample")
fpkm_counts = gather_counts(fpkm_obj, by="gene-id", log_base=2L)
fpkm_design = construct_design(fpkm_counts, ~ 0 + condition)
fpkm_contrasts = construct_contrasts(
                     design = fpkm_design, 
                     treatA.vs.control = conditiontreatA-conditioncontrol, 
                     treatB.vs.control = conditiontreatB-conditioncontrol
                 )
# DE genes between treatA and control
limma_dge(fpkm_counts, design=fpkm_design, 
             contrast=fpkm_contrasts[, "treatA.vs.control"])
# DE genes between treatB vs control
limma_dge(fpkm_counts, design=fpkm_design, 
             contrast=fpkm_contrasts[, "treatB.vs.control"])
# DE genes between any of the treatments
limma_dge(fpkm_counts, design=fpkm_design, contrast=fpkm_contrasts)

# ----- raw ----- # 
raw_path = file.path(path, "raw", "annotation.txt")
raw_obj = rnaseq(raw_path, format="raw", experiment="sample")
raw_counts = gather_counts(raw_obj, by="gene-id", threshold=1L)
raw_design = construct_design(raw_counts, ~ 0 + condition)
raw_contrasts = construct_contrasts(
                     design = raw_design, 
                     treatA.vs.control = conditiontreatA-conditioncontrol, 
                     treatB.vs.control = conditiontreatB-conditioncontrol
                 )
# DE genes between treatA and control
limma_dge(raw_counts, design=raw_design, 
             contrast=raw_contrasts[, "treatA.vs.control"])
# DE genes between treatB and control
limma_dge(raw_counts, design=raw_design, 
             contrast=raw_contrasts[, "treatB.vs.control"])
# DE genes between any of the treatments
limma_dge(raw_counts, design=raw_design, contrast=raw_contrasts)

asrinivasan-oa/ganalyse documentation built on May 12, 2019, 5:38 a.m.