You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear Team,
We noticed a strange behavior of the DESeq2 module when used inside the NFcore differentialabundance pipeline. DESeq2 allows to testing for differential expression with null hypothesis logFC=0, but it also allows to test for diff. expression with respect to a user-define min threshold of logFC via the parameter lfc_threshold. This parameter is implemented in the NFCore DESeq2 module. We expected testing for diff. expression was wrt. lfc_threshold even when using lfcShrink, but this is not the case. In the current implementation (as can be seen from the source code references in this issue) the result of the diff. test comp.results is overwritten with those coming from the function lfcShrink whose call neglects the user-set parameter lfc_threshold hence providing diff. expression results always with the null hypothesis logFC=0 regardless of if the user has set the parameter lfc_threshold otherwise.
I've investigated this case and found that in older version of DEseq2 (1.16, 1.18) the function lfcShrink simply didn't offer to specific lfc_threshold. See here a blog discussion with Michael Love on that matter: https://support.bioconductor.org/p/103692/
I checked the version of DESeq2 that gets used with the latest NFcore differentialabundace pipeline which is DESeq2 v 1.34.0. In that version of DESEq2 the function lfcShrink allows the user to set the lfc_threshold and the result is shrunken logFCs and adapted p-/q-values for the test of diff. expression with respect to null hypothesis abs(logFC)<lfc_threshold. Here is a link to the function lfcShrink although not of version 1.34.0 https://rdrr.io/bioc/DESeq2/man/lfcShrink.html . Still, even in version 1.34.0 this parameter lfcThreshold was already introduced.
I'd like to see the NFcore module DESeq2 to get adapted here using the user provided lfc_threshold even in cases when the user wants tp shrink logFCs. Right now, I find no documentation that the stat. test for diff. expression is done always with respect to null hypothesis logFC=0 as soon as the user has defined shrink_lfc=true regardless of if the user also defined lfc_threshold.
The text was updated successfully, but these errors were encountered:
The improvement/fix could be referencing the user specified parameter, too.
if (opt\$shrink_lfc){
comp.results <- lfcShrink(dds,
type = 'ashr',
contrast = c(
contrast_variable,
c(opt\$target_level, opt\$reference_level)
),
lfcThreshold=opt\$lfc_threshold
)
}
aghr
changed the title
Improvement/Bugfix: Update usage of lfcShrink for testing for diff. expression with given lfc threshold
Improvement/Bugfix: Update usage of lfcShrink for testing for diff. expression with user-specified lfc_threshold
Oct 16, 2024
Dear Team,
We noticed a strange behavior of the DESeq2 module when used inside the NFcore differentialabundance pipeline. DESeq2 allows to testing for differential expression with null hypothesis logFC=0, but it also allows to test for diff. expression with respect to a user-define min threshold of logFC via the parameter lfc_threshold. This parameter is implemented in the NFCore DESeq2 module. We expected testing for diff. expression was wrt. lfc_threshold even when using lfcShrink, but this is not the case. In the current implementation (as can be seen from the source code references in this issue) the result of the diff. test
comp.results
is overwritten with those coming from the function lfcShrink whose call neglects the user-set parameter lfc_threshold hence providing diff. expression results always with the null hypothesis logFC=0 regardless of if the user has set the parameter lfc_threshold otherwise.I've investigated this case and found that in older version of DEseq2 (1.16, 1.18) the function lfcShrink simply didn't offer to specific lfc_threshold. See here a blog discussion with Michael Love on that matter: https://support.bioconductor.org/p/103692/
I checked the version of DESeq2 that gets used with the latest NFcore differentialabundace pipeline which is DESeq2 v 1.34.0. In that version of DESEq2 the function lfcShrink allows the user to set the lfc_threshold and the result is shrunken logFCs and adapted p-/q-values for the test of diff. expression with respect to null hypothesis abs(logFC)<lfc_threshold. Here is a link to the function lfcShrink although not of version 1.34.0 https://rdrr.io/bioc/DESeq2/man/lfcShrink.html . Still, even in version 1.34.0 this parameter lfcThreshold was already introduced.
I'd like to see the NFcore module DESeq2 to get adapted here using the user provided lfc_threshold even in cases when the user wants tp shrink logFCs. Right now, I find no documentation that the stat. test for diff. expression is done always with respect to null hypothesis logFC=0 as soon as the user has defined shrink_lfc=true regardless of if the user also defined lfc_threshold.
The text was updated successfully, but these errors were encountered: