Hi,
I am performing a differential RNAseq analysis, where I have 3 different groups (cell lines say A,B,C) and in each group there are 2 treatment conditions (Trt1 & Trt2). I am interested in a particular case: finding the DE genes between Trt1 and Trt2 in cell line A. I have two or more replicates in each treatment condition across all groups. I included all my samples in my design matrix, called DESEQ2 with default settings. Using contrast I obtained the results. I have around a total of ~ 1300 DE genes (padj < 0.05).
Initially I performed the DE analysis only with samples which I was interested (Cell line A, Trt 1 & Trt2 samples. Later I came to know that this is not ideal way of doing it and in order to improve the dispersion estimate one should include all the samples). In this case I have around 1600 DE genes (padj < 0.05)
So I was comparing the results between these two scenarios. From my understanding, the log2fold change of the genes should not change much. Mainly the p-value and number of outliers would be different between the first analysis (calling it complete sample analysis) and second (subsetted analysis). I plotted a scatter plot of the log2fold changes of all the genes in these two comparisons. Nearly almost all the genes lie in 45 degree line (Figure 1). But there are 10 genes that have significantly different log2foldchange. In some cases, the difference is very huge like complete analysis log2foldchange = 16 and subsetted log2foldchange = 3. I am concerned about this because out of these 10 genes, 3 of the genes are top DE genes in the complete analysis case (FDR <= 0.05) and these genes are not significant in subsetted case. (Figure 2: shows scatter plot for these 10 genes). Comparing between these two cases may be not a perfect thing to do, still I am wondering whether this (these 3 genes) is a false positive case or not. (Given the FDR = 0.05 on an average I would expect ~60 false positives). I made sure that size factor is not contributing to this difference by providing the sizefactor value of subsetted analysis to complete sample analysis. Also when I checked the normalized read counts for both cases, which are very similar in values. Any insights would be greatly helpful.
Thanks,
Thomas
> sessionInfo() R version 3.4.0 (2017-04-21) DESeq2_1.16.1
0
amalthomas111
1 minute ago by
amalthomas111 • 0
Hi Michael,
Thanks for prompt reply. From a quick look into the new analysis: Including the outlier replacement for the complete analysis did not change change anything (at least the number of DE genes). For the subsetted case, the number of DE genes slightly changed. Those 3 genes are still significant in complete case with very high LFC difference as compared to the latter where they are not significant (padj <0.05).
Just to give you an idea about the magnitude of the LFC change for these 3 genes.
LFC complete case LFC subsetted case
gene1 16.95 3.99
gene2 15.08 2.13
gene2 13.76 0.69
I should also add that, in the subsetted case, these three genes have padj = NA. They didn't pass the filter threshold. Similar was the case before without the (minReplicatesForReplace=Inf).
The log fold change should be basically identical if you turn off outlier replacement, regardless of what other groups are included. Can you show all your code? And you might want to look at plotCounts() for these genes.
plotCounts for genes (that shows high difference) do not agree with the high reported LFC. See the figures in markdown PDF file.
Markdown PDF can be found at link.
Complete code: link
Outlier replacement is on in this code. Can you confirm there is a LFC difference after subsetting with outlier replacement off?
With outlier replacement off:
For subsetted analysis: ( If I filter the count tables with df[rowSums(df) > 1,] )
If no filtering of count tables using df[rowSums(df) > 1,], then for subsetted case:
For complete case:
Yes raw read counts are same in both.
Normalized read counts:
subsetted case:
Could the zero read counts in both 50H and 50HR (one of the groups(50H group in my contrast) ) causing some issue)? But that still doesn't explain huge LFC difference between both cases.
Thanks again Michael. I am bit confused about how to do the filtering. In my data, the two groups :50brai vs 50H in my contrast (under my condition tissue), have very low expression for these 10 genes but there are other samples with enough reads for this genes. If I am using the entire samples for better dispersion estimate how would I do the filtering?
Filtering based on rowSums(df) might not work right, since other samples have reasonable read counts for this gene?
Do you mean for each contrast first find those genes with at least 10 counts in more than two samples. Then estimate the dispersion of these genes using all samples and the do the contrast? For e.g. say for the contrast 50brai vs 50H
Thanks
Thank you very much Michael!