summary function when applying lfcThreshold gives a different result than when operating on the result of the same
1
0
Entering edit mode
JaneDoe • 0
@a3d1cc8e
Last seen 2.4 years ago
Spain

Hello,

So I have filtered the results of my DeSEq2 using the lfcThreshold parameter so that I can preserve the meaning of the FDR/padj. The code is as follows:

Code should be placed in three backticks as shown below


# using the lfcthreshold
res1=results(dds,name="a_vs_b",alpha = 0.05, lfcThreshold = 0.585)
summary(res1)

out of 16397 with nonzero total read count
adjusted p-value < 0.05
LFC > 0.58 (up)    : 242, 1.5%
LFC < -0.58 (down) : 290, 1.8%
outliers [1]       : 1, 0.0061%
low counts [2]     : 0, 0%
(mean count < 3)

sessionInfo( )

but when I check the dimension of the res1 it is larger 16397 X 6 (not containing genes corresponding to the lfcThreshold and alpha).

So, I tried to use the filtering on res1 , using


# using the lfcthreshold
nrow(subset(res1,res1$log2FoldChange >=1.5,padj <= 0.05))
[1] 114

This is less than the 242 genes which seem to have met the criteria, How do i fetch the result using the lfc value as specified in the summary function?

DESeq2 • 915 views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 6 days ago
United States

See the DESeq2 paper or vignette. lfcThreshold is doing more than filtering on log2FoldChange > X.

ADD COMMENT
0
Entering edit mode

Hello,

I do understand the lfcthreshold is doing more than the filtering, I am trying to understand how I can access the genes which are output when I run :

summary(results(dds,name="testcimparison",alpha = 0.05, lfcThreshold = 0.585,altHypothesis="greaterAbs"))

out of 16397 with nonzero total read count
adjusted p-value < 0.05
LFC > 0.58 (up)    : 242, 1.5%
LFC < -0.58 (down) : 290, 1.8%
outliers [1]       : 1, 0.0061%
low counts [2]     : 0, 0%
(mean count < 3)

So I just want to output the 242 genes in a seperate list. If i save the results of:

test_result=results(dds,name="STAG2_result_wt_vs_mut",alpha = 0.05, lfcThreshold = 0.585,altHypothesis="greaterAbs") 

dim(test_result)

16397     6

So my results already has the calculated value of the test which i provided i.e lfcthreshold and althypothesis? because the test_results has all the genes.

So should do post filtering on my DESeq2 object test which shows the result? Is this different from the post filtering which many people do (minus the lfcThreshold argument)

Thanks

ADD REPLY
1
Entering edit mode

results doesn't filter the table. You should filter using subset on the padj.

ADD REPLY

Login before adding your answer.

Traffic: 478 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6