0.緣起
很多文章中用到GEPIA這個網頁工具來進行TCGA和GTEx表達量的聯(lián)合比較,但在此之前我不知道要怎樣在R語言中實現(xiàn)。?這個GEPIA的文章里說:
The imbalance between the tumor and normal data can cause inefficiency in various differential analyses. Fortunately, the GTEx project produced RNA-Seq data for over 8000 normal samples, albeit from unrelated donors. Such data cannot be directly combined for integrated analysis due to many differences in aspects like data processing pipelines and gene models. To make data from different sources more compatible, the UCSC Xena project (http://xena.ucsc.edu/) has recomputed all expression raw data based on a standard pipeline to** minimize differences from distinct sources**, thus allowing for the formation of the most comprehensive expression data up to date.
在xena上面可以看到,TCGA和GTex、Target數(shù)據庫的測序數(shù)據已經被重新計算整合到了一起,提供了各種格式的文件。

這里上游分析使用的是RSEM,而不是featurecout,導致得到的數(shù)據并不是標準的count值,是非整數(shù)。
1.RSEM 對應的差異分析包是EBSeq
RSEM (RNA-Seq by Expectation-Maximization)
關于它的下游分析,官網建議使用的R包是EBSeq:
EBSeq:http://www.bioconductor.org/packages/devel/bioc/html/EBSeq.html
但市面上公認最好的差異分析R包是DESeq2,limma,edgeR。有沒有辦法將RSEM的counts矩陣交給三大R包來處理呢?
2.能不能用limma和edgeR
這個問題剛好是關于TCGA的RSEM數(shù)據,
https://support.bioconductor.org/p/63981/#64004
limma的作者親自回答了:
The RSEM expected counts from the TCGA project will work fine with either limma-voom or edgeR. However, with such a large number of samples, limma-voom is easily the best choice from a computational point of view.
limma-voom是更好的選擇。
關于expected_count和norm_count在這里也有討論,即edgeR只能用expected,vomm理論上可以使用norm_count(只是可以不是必須)。
3.能不能用Deseq2
https://support.bioconductor.org/p/94003/#94028

作者說最好的辦法是用tximport進行轉換,其次就是四舍五入對矩陣進行取整,然后用 DESeqDataSetFromMatrix去導入即可。
4.tximport是Deseq2作者寫的R包
tximport:將各種上游分析軟件得到的數(shù)據轉換給三大R包使用。
其中講了如何將ERR格式的數(shù)據導入R,并生成矩陣。DESeq2 和edgeR除了需要count矩陣,還需要一個length矩陣,而limma則是需要經過一步 "scaledTPM" 或"lengthScaledTPM"轉換,需要另外一個矩陣來做校正。在xena中的數(shù)據我們只能拿到一個count矩陣,因此這個暫時用不上,但不妨礙它是個好東西。
5.胰腺癌的RSEM數(shù)據TCGA+GTEx聯(lián)合分析
用三大R包差異分析分別做出的火山圖和熱圖:

他們的結果取交集:

這個代碼我已經上傳到了github,https://github.com/xjsun1221/RSEM_with_limma_edgeR_Deseq2
。因為是根據作者的回復自己摸索的,受目前水平影響不能保證完全正確,以后也可能會進行修改,不建議作為標準答案來學習,供參考,如果發(fā)現(xiàn)有問題請發(fā)郵件到xjsun1221@163.com來反饋,提前感謝啦!我將在簡書中更新。
另外github上有另外兩人貢獻的代碼:
RSEM對接limma:https://github.com/NabilaRahman/RNA-Seq-Pipeline
RSEM對接DESeq2:https://github.com/yh154/rnaseq-rsem-star-deseq2-gsea