TCGA FPKM 转化为 TPM

FPKM 一般来说不太好用,转为TPM进行后续的分析比较合适。下面是FPKM转化为TPM的R实现:

#download FPKM data
FPKMquery <- GDCquery(project = "TCGA-LUAD",
                      data.category = "Transcriptome Profiling",
                      data.type = "Gene Expression Quantification",
                      workflow.type = "HTSeq - FPKM-UQ")

GDCdownload(FPKMquery, method = "api")
FPKMdat <- GDCprepare(query = FPKMquery)
# FPKMdat = readRDS("LUAD_FPKMdat.RDS")
FPKMexpdat = assay(FPKMdat)

#def func
FPKM2TPM <- function(fpkm){
  exp(log(fpkm) - log(sum(fpkm)) + log(1e6))
}
#exec
TPMs <- apply(FPKMexpdat ,2,FPKM2TPM)

参考: RNA-Seq的Counts和FPKM数据如何转换成TPM?

你可能感兴趣的:(TCGA FPKM 转化为 TPM)