**0**wrote:

Hello,

I'm using the new version of DESeq2, which does not shrink the fold changes per default. Instead the lfcShrink() function can be apply after running the analysis to shrink the fold changes for plotting or filtering. My question is: what is the different between using lfcShrink() with the coef argument and using lfcShrink() with the contrast argument? Initially I thought they are equivalent, but just running the example given in the help page of lfcShrink() produces different results.

dds <- makeExampleDESeqDataSet(betaSD=1) dds <- DESeq(dds, betaPrior=FALSE) res <- results(dds) res.shr <- lfcShrink(dds=dds, coef=2, res=res) res.shr.cont <- lfcShrink(dds=dds, contrast=c("condition","B","A"), res=res) head(res.shr) log2 fold change (MAP): condition B vs A Wald test p-value: condition B vs A DataFrame with 6 rows and 5 columns baseMean log2FoldChange stat pvalue padj <numeric> <numeric> <numeric> <numeric> <numeric> gene1 1.539217 0.2418910 0.4246533 0.671089437 NA gene2 14.206946 -1.1832313 -2.4932582 0.012657677 0.04613252 gene3 12.249593 0.5484835 1.0014503 0.316609151 0.48819803 gene4 13.125013 1.0215280 2.0246106 0.042907369 0.11680339 gene5 13.609617 -1.2724563 -2.7665855 0.005664672 0.02367887 gene6 274.992445 0.5002084 1.8845139 0.059495502 0.14617001 head(res.shr.cont) log2 fold change (MAP): condition B vs A Wald test p-value: condition B vs A DataFrame with 6 rows and 5 columns baseMean log2FoldChange stat pvalue padj <numeric> <numeric> <numeric> <numeric> <numeric> gene1 1.539217 0.3696340 0.4246533 0.671089437 NA gene2 14.206946 -1.3004096 -2.4932582 0.012657677 0.04613252 gene3 12.249593 0.6338487 1.0014503 0.316609151 0.48819803 gene4 13.125013 1.1425842 2.0246106 0.042907369 0.11680339 gene5 13.609617 -1.3879464 -2.7665855 0.005664672 0.02367887 gene6 274.992445 0.5126470 1.8845139 0.059495502 0.14617001 I'm using R 3.4.1 and DESeq2 version 1.16.1

Thanks for any help in advance!

**25k**• written 2.2 years ago by Anke Busch •

**0**