Hello,
Rory Stark I have a question regarding the 3 scenarios in which lfcShrink is applied in DiffBind package. The source code looks like this
if(shrink) {
if(contrast$contrastType=="byname") {
res$de <- suppressMessages(DESeq2::lfcShrink(pv$DESeq2$DEdata,
coef=contrast$contrast,
lfcThreshold=lfc,
res=res$de,type="apeglm"))
} else if(contrast$contrastType=="results1") {
res$de <- suppressMessages(DESeq2::lfcShrink(pv$DESeq2$DEdata,
coef=contrast$contrast[[1]],
lfcThreshold=lfc,
res=res$de,type="apeglm"))
} else {
res$de <- suppressMessages(DESeq2::lfcShrink(pv$DESeq2$DEdata,
contrast=contrast$contrast,
lfcThreshold=lfc,
res=res$de,type="ashr"))
}
In the above code, what do contrast$contrastType=="byname" and contrast$contrastType=="results1" mean? Could you explain what these three scenarios are?
Further, can the lfcShrink function be turned off so that fold values are calculated as condition1 - condition2 for DESeq2? Is there a scenario where that is possible in DiffBind? I deeply appreciate your help and suggestions. Thank you so much!
Priyanka