getCounts: Extract Specified Component of a DGEList Object

Description Usage Arguments Value Author(s) See Also Examples

View source: R/getCounts.R

Description

getCounts(y) returns the matrix of read counts y$counts.

getOffset(y) returns offsets for the log-linear predictor account for sequencing depth and possibly other normalization factors. Specifically it returns the matrix y$offset if it is non-null, otherwise it returns the log product of lib.size and norm.factors from y$samples.

getDispersion(y) returns the most complex dispersion estimates (common, trended or genewise) found in y.

Usage

1
2
3

Arguments

y

DGEList object containing (at least) the elements counts (table of raw counts), group (factor indicating group) and lib.size (numeric vector of library sizes)

Value

getCounts returns the matrix of counts. getOffset returns a numeric matrix or vector. getDispersion returns vector of dispersion values.

Author(s)

Mark Robinson, Davis McCarthy, Gordon Smyth

See Also

DGEList-class

Examples

1
2
3
4
5
6
7
# generate raw counts from NB, create list object
y <- matrix(rnbinom(20,size=5,mu=10),5,4)
d <- DGEList(counts=y, group=c(1,1,2,2), lib.size=1001:1004)
getCounts(d)
getOffset(d)
d <- estimateCommonDisp(d)
getDispersion(d)

Example output

Loading required package: limma
  Sample1 Sample2 Sample3 Sample4
1      10      10      10       4
2      27      13      12       6
3      12       5      16       6
4      26      15       9      11
5      14      12       7      12
[1] 6.908755 6.909753 6.910751 6.911747
[1] 0.1014825
attr(,"type")
[1] "common"

edgeR documentation built on Jan. 16, 2021, 2:03 a.m.