##
上篇文章提到了可以用TPMCalculator从bam file中直接计算TPM, 但是发现每个sample计算得到的基因数量不一样,没法进行下游visualization。所以这里提供另外一种方法 (R environment)
install.packages("DGEobj.utils")
library(DGEobj.utils)
Allgene <- read.csv("clipboard",header = TRUE,sep = "\t") #column1 is gene enzemble ID; column2 is geneLength
rownames(Allgene) <- Allgene$Geneid
allgeneexpression <- Allgene[,3:9]
geneLength <- Allgene$Length
tpmMatrix <- convertCounts(as.matrix(allgeneexpression),unit = "TPM",geneLength = geneLength,log = F,
normalize = "none",prior.count = NULL)
tpmMatrix1 <- as.data.frame(tpmMatrix) # 该data.frame可以继续进行下游分析。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。