分析測序數(shù)據(jù)時滚躯,常常需要將counts數(shù)據(jù)轉(zhuǎn)換為TPM格式掸掏,而這個轉(zhuǎn)變過程就需要涉及每個基因的長度,幸好有專業(yè)人士已經(jīng)幫我們處理好這個東東愿待,我們可以一鍵進(jìn)行操作仍侥。
首先來認(rèn)識下這個牛氣沖天的R包IOBR(Immuno-Oncology Biological Research):
IOBR is an R package to perform comprehensive analysis of tumor microenvironment and signatures for immuno-oncology.
提供8種計算免疫細(xì)胞浸潤的方法厨幻,收錄255種構(gòu)建的signature,這么強(qiáng)大的功能咱們以后慢慢學(xué),這次先學(xué)習(xí)下
count2tpm
功能。
#devtools::install_github("IOBR/IOBR",ref="master")
rm(list = ls())
library(IOBR)
library(UCSCXenaTools)
help("count2tpm")
eset_prad<-XenaGenerate(subset = XenaCohorts =="GDC TCGA Prostate Cancer (PRAD)") %>%
XenaFilter(filterDatasets = "TCGA-PRAD.htseq_counts.tsv") %>%
XenaQuery() %>%
XenaDownload() %>%
XenaPrepare()
eset_prad$Ensembl_ID <- substring(eset_prad$Ensembl_ID,1,15)
eset_prad <- column_to_rownames(eset_prad,var = "Ensembl_ID")
eset_prad<-(2^eset_prad)-1
eset_prad <- count2tpm(countMat = eset_prad,idType = "Ensembl",source = "default")
參考鏈接:
IOBR: 一步完成RNAseq: counts到TPM的轉(zhuǎn)化