美文网首页
GEO数据挖掘(三):log2数值的转换

GEO数据挖掘(三):log2数值的转换

作者: 佳名 | 来源:发表于2024-01-08 12:35 被阅读0次

提取表达矩阵

如果是getGEO函数导入的,exprs函数提取表达矩阵

eSet <- readRDS(file = "eSet.rds")
exprset<-exprs(eSet[[1]])

如果是read_tsv函数导入

exprset<-as.data.frame(exprset)

查看数据分布

par(mar=c(6,4,2,1))
title <- "GSE23610"
boxplot(exprset, main=title, las=2)
log2转换前

对数值进行log2转换

ex <- exprset
qx <- as.numeric(quantile(ex, c(0., 0.25, 0.5, 0.75, 0.99, 1.0), na.rm=T))
LogC <- (qx[5] > 100) ||
  (qx[6]-qx[1] > 50 && qx[2] > 0) ||
  (qx[2] > 0 && qx[2] < 1 && qx[4] > 1 && qx[4] < 2)

if (LogC) { ex[which(ex <= 0)] <- NaN
exprSet <- log2(ex)
print("log2 transform finished")}else{print("log2 transform not needed")}

查看数值分布

boxplot(exprSet, main=title, las=2)
log2转换后
plotDensities(exprset, legend=T)

相关文章

网友评论

      本文标题:GEO数据挖掘(三):log2数值的转换

      本文链接:https://www.haomeiwen.com/subject/jcgnndtx.html