filterByCPM.DGEList | R Documentation |
Filter lowly expressed genes by CPM in DGEList
## S3 method for class 'DGEList'
filterByCPM(
obj,
minCPM = 1,
minCount = minGroupCount(obj),
lib.size = NULL,
...
)
obj |
A |
minCPM |
Numeric, the minimum CPM accepted as expressed in one sample |
minCount |
Integer, how many samples must have CPM larger than
|
lib.size |
Integers of library size, or |
... |
Not used |
Another DGEList
object, with lowly expressed genes removed.
The original counts and gene annotation can be found in
counts.unfiltered
and genes.unfiltered
fields, respectively.
The logical vector of the filter is saved in the cpmFilter
field.
set.seed(1887)
mat <- rbind(matrix(rbinom(150, 5, 0.25), nrow=25), rep(0, 6))
d <- DGEList(mat, group=rep(1:3, each=2),
genes=data.frame(Gene=sprintf("Gene%d", 1:nrow(mat))))
df <- filterByCPM(d)
nrow(df$counts.unfiltered) ## 26
nrow(df$counts) ## 25
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.