先加载fpkm的表达数据
load("D:/桌面/downstream_analyse/12_thca/fpkm/thca_fpkm.Rdata")
fpkmToTpm <- function(fpkm)
{
exp(log(fpkm) - log(sum(fpkm)) + log(1e6))
}
class(dat)
rownames(dat) <- dat$gene_id
dat[,1] <- NULL
par(1,2)
boxplot(dat[,1:20],las=2)
tpms <- apply(dat,2,fpkmToTpm)
tpms[1:3,]
boxplot(tpms[,1:20],las=2)
colSums(tpms)
library(patchwork)
boxplot(dat[,1:10],las=2)
boxplot(tpms[,1:10],las=2)
网友评论