Hi everyone,
I was performing a comparison using DESeq2. Considering it is relevant for the case, I used a code I found here (DESeq2 baseMean values for each sample) to find the mean counts for each condition.
So, looking at a gene where both groups have zero counts, I obtained a significant p-value (quite small even, 5.7E-6). Since I had a warning about convergence, I also checked and it did converge.
Is this possible? I understand that the independentFiltering
maintains the gene, since it has reads for other conditions but, considering the counts, it should be at least non-significant no?
The code is rather straightforward:
baseMeanPerLvl <- sapply( levels(dds_sub$CellType), function(lvl)
rowMeans(counts(dds_sub,normalized=TRUE)[,dds_sub$CellType == lvl, drop=F] ) )
resultsNames(dds_sub)
res1<-results(dds_sub,name = "CellType_Neutrophils_vs_Eosinophil", alpha = 0.05)
res1<-lfcShrink(dds_sub,coef = "CellType_Neutrophils_vs_Eosinophil", type = "apeglm",res = res1)
Thanks in advance
It indeed solved the problem, now the genes in question get a p-value of 1 and log2FC. However, what does this means for lfcshrink, should I keep the usage of
coef
forapeglm
?Yes, you can keep use of
coef
in apeglm.And note that in apeglm you can specify
svalue=TRUE
or anlfcThreshold
even if you want to find a set of genes with large posterior LFC.