Question: [DESeq2] Extracting results based on set thresholds
0
8 months ago by
nelson.s.garcia0 wrote:

Hello,

After running DESeq and filtering using alpha = 0.05 and lfcThreshold = 1

> dds <- DESeq(dds)
> res.05_1 <- results(dds, alpha = 0.05, lfcThreshold = 1)
> summary(res.05_1)

out of 33402 with nonzero total read count
LFC > 1.00 (up)    : 964, 2.9%
LFC < -1.00 (down) : 1228, 3.7%
outliers [1]       : 5, 0.015%
low counts [2]     : 4484, 13%
(mean count < 1)
[1] see 'cooksCutoff' argument of ?results
[2] see 'independentFiltering' argument of ?results

How do I extract the 964 upregulated and 1228 downregulated genes? Also, how do I find the information on which sample is the gene expression up or down?

Thank you very much

Nelson

deseq2 • 263 views
modified 8 months ago by Michael Love23k • written 8 months ago by nelson.s.garcia0
Answer: [DESeq2] Extracting results based on set thresholds
1
8 months ago by
Michael Love23k
United States
Michael Love23k wrote:

The object returned by results() is a DESeqResults object, built on top of a DataFrame. It acts a lot like a simple data.frame in R.

First take a look at the column names:

res

You will also notice when you print the object like this, that it tells you at the top of the table which sample is in the numerator and which sample is in the denominator of the LFC (log2 fold change).

If you want the upregulated gene rows:

res[which(res$log2FoldChange > 0 & res$padj < .05),]

Thanks Michael!

In my case:

log2 fold change (MLE): Mo17M vs CMLM

Wald test p-value: Mo17M vs CMLM

This means that the genes with l2fc positive values are upregulated in the sample Mo17M.

Is this correct?

1

Yes. If log(X/Y) > 0 then X/Y > 1 and X > Y