Entering edit mode
Hi everyone,
In DESeq2, we can optimize the independent filtering step in calculating the results by changing alpha. Is there a way to perform that as well for lfcshrink?
Thanks!
Hi everyone,
In DESeq2, we can optimize the independent filtering step in calculating the results by changing alpha. Is there a way to perform that as well for lfcshrink?
Thanks!
The way we wrote it, the extra arguments for lfcShrink() are passed to the shrinkage methods, but if you want to specify arguments to results(), you can just pass the results table yourself:
res <- results(dds, ...) res <- lfcShrink(dds, res=res, ...)
This way you have controlled the generation of the results table.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Hello Michael Love l! @mikelove I have 3 questions about filtering and lfcShrink.
1-what's the risk of turn off the filtering
2- If I have applied the
independentFiltering = F
tores
, I should not have filtering whenlfcShrink
, as below,right?3- I have 2 conditions, and 2 groups per condition, now if I run first for the interaction of cond1 and cond2
without any contrast, and then for the first condition cond1
and I want to apply the
lfcShrink
function likeI have no problem with the interaction, but then when running
I have an error,
Error in lfcShrink(dds, res = res_g, coef = "cond1_g1_vs_g2" , type = "apeglm") : 'coef' should specify same coefficient as in results 'res'
,and asapeglm
does not work withcontrast
, and neither I can usecoef
to generateres_g
, I am stocked here, any suggestions how to specify the same coeficients? What I want is to havelfcShrink
results for a contrast without filtering out any gene, and having allpadj
!=NA
Thanks!Without filtering, you are including genes with low power so the multiple testing burden is higher. See: Bourgon 2010 or Ignatiadis 2016.
This is fine, you can do your own filtering at the top of the script with e.g. a common rule is:
Where you choose X to be the minimum number of samples with a count of 10 or more.
lfcShrink
does not have a filtering argument. It does not perform this operation.Sorry Michael, I rephrase. Which option passed to
lfcShrink
function, allow me to not have ANYpadj=NA
in the shrunken results? using theapeglm
algorithmI apply a filter to keep genes that are present in 80% of the samples of at least one experimental group (n per group =10), no matter number of counts, what do you think? I should apply something similar to what you suggest in addition to mine?
Thanks
At least one of the 3 options you give in the below post works for me, Thanks Dealing with genes that have Padj=NA
Are the cases where the padj is NA also where the pvalue is NA? In that case see the vignette section that explains the NA values.
Only padj is NA, I don't have any p value=NA, so I solved adjusting manually as
res$padj <- p.adjust(res$pvalue, method="BH")
Thanks Michael, problem solved!
I solved question 3 using the shrink
type="ashr"
algorithm and giving onlyres
and nocoef
orcontrast