Using non-default thresholds into results call vs subset only (post-results call)
1
1
Entering edit mode
@rodrigoguarischi-9942
Last seen 7.6 years ago

Hi Michael

 

I would like to focus only on genes with fold-change greater than 2 and I also would like to decrease FDR a bit, to 5%. I initially tried: 

> res <- results( dds );
> subset( res , padj <= 0.05 & abs(log2FoldChange) >= 1 );

but than I tried adding alpha and lfcThreshold into to results function:

> res <- results( object = dds, alpha = 0.05, lfcThreshold = 1 );
> subset( res , padj <= 0.05 & abs(log2FoldChange) >= 1 )

I was expecting both to give the same result but I was shocked when I figure out that my gene list decreased from 696 to 153 genes.  Is it because fold-change filter is integrate into p-values calculation? I guess you recommend using the second option once this thresholds will also be incorporated in the independent filtering step, right?

 

Thanks

 

 

 

 

 

deseq2 • 898 views
ADD COMMENT
3
Entering edit mode
@mikelove
Last seen 1 day ago
United States

"Is it because fold-change filter is integrate into p-values calculation?"

Yes. For more details, see ?results, vignette("DESeq2") or the DESeq2 paper.

We recommend using lfcThreshold instead of abs(res$log2FoldChange) > x.

ADD COMMENT
0
Entering edit mode

Thank you so much for the response. This was really quick!

ADD REPLY

Login before adding your answer.

Traffic: 647 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