This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to generate a dataframe of deseq2 result excluding 'low counts' and 'outliers' ?

In the following analysis using deseq2

dds_out <- DESeq(dds)
res <- results(dds_out)
summary(res)
out of 19287 with nonzero total read count
adjusted p-value < 0.1
LFC > 0 (up)       : 3502, 18%
LFC < 0 (down)     : 4187, 22%
outliers [1]       : 0, 0%
low counts [2]     : 2992, 16%
(mean count < 1)
[1] see 'cooksCutoff' argument of ?results
[2] see 'independentFiltering' argument of ?results

How can I save the res output without the 'outliers' and 'low counts'? Since I need to get the whole set of genes that are analyzed to generate the DE genes as the background gene set in my subsequent GO enrichment analysis using goseq2

deseq2 rna-seq

I think the p-value or FDR or both for those should be set to NA. There are no outliers in your example.

1 answer

Please follow the advice given in the output:

[1] see 'cooksCutoff' argument of ?results

[2] see 'independentFiltering' argument of ?results

By the way, I would get out of the habit of running results() like that unless you are absolutely certain of the contrast that is being performed. In doing it this way, you are also avoiding the log fold-change shrinkage step.

Kevin

Log in to answer this question.