Dear R users,
I want to perform a GSEA on RNA-seq data, I use the filterbyexp() function in the DGELlist in edgeR.
I am not sure about hte arguments I use : I would like to keep all genes with an expression of at least 10 cpm in 10% of samples.
filterbyexp(DGElistobject, min.count = 10, min.prop = 0.1)
It keeps almost the same number of gene sthan the default filter which is I think min.count = 10, min.prop = 0.7
min.count is a threshold for actual counts rather than cpm. If you want to filter genes based on their cpm values, you may need to take into account the library sizes and get an equivalent cut-off for min.count. E.g., if the average library size of all the samples is about 20 million, then 10 cpm would be equivalent to min.count = 200.
The arguments are already set to optimal values for differential expression analyses so you don't need to change them at all.
The only thing you need to do is to make sure that you specify the design of your experiment, either by setting the group variable of your DGEList or specifying the design or group arguments to filterByExpr().