原文链接:Simulated-07-Membership.pdf (ucla.edu)
7. 模块成员、模块内连通性和筛选模块内hub基因
7a.模块内连通性
(In network literature, connectivity is often referred to as ”degree”.)
intramodularConnectivity
是用来计算整个网络的连通性kTotal,和每一个模块内的连通性kWithin,
kOut=kTotal-kWithin
kDiff=kIn-kOut=2*kIN-kTotal
ADJ1=abs(cor(datExpr,use="p"))^6
Alldegrees1=intramodularConnectivity(ADJ1, colorh1)
head(Alldegrees1)
参考例子的计算结果如下:
head(Alldegrees1)
kTotal kWithin kOut kDiff
Gene1 31.80186 28.37595 3.425906 24.95005
Gene2 28.88249 26.47896 2.403522 24.07544
Gene3 25.38600 23.11852 2.267486 20.85103
Gene4 24.01574 22.12962 1.886122 20.24350
Gene5 24.93663 21.69175 3.244881 18.44687
Gene6 25.91260 23.92613 1.986469 21.93966
7b gene significance 和 intramodular connectivity之间的关系
绘制gene significance和intramodular connectivity关系图
colorlevels=unique(colorh1)
sizeGrWindow(9,6)
par(mfrow=c(2,as.integer(0.5+length(colorlevels)/2)))
par(mar = c(4,5,3,1))
for (i in c(1:length(colorlevels)))
{
whichmodule=colorlevels[[i]];
restrict1 = (colorh1==whichmodule);
verboseScatterplot(Alldegrees1$kWithin[restrict1],
GeneSignificance[restrict1], col=colorh1[restrict1],
main=whichmodule,
xlab = "Connectivity", ylab = "Gene Significance", abline = TRUE)
}
由图中可以看出绿色和棕色模块gene significance 和 connectivity 的相关性更高。
Figure 1: Gene significance (y-axis) vs. intramodular connectivity (x-axis) plotted separately for each module in the simulated data set. For the green and the brown module we observe that intramodular hub genes tend to have high gene significance. The opposite is true in the turquoise module.
7c 让模块内所有基因的连接度泛化
intramodular connectivity 这个概念只是对给出的模块间的基因进行定义,但在实际的生物过程中基因如何连接其他的生物学模块是非常重要的。因此,他们定义了一个基于特征基因连通性模块的测量方法来解释基因表达和模块特征基因的相关性( Toward this end, we define a module eigengene-based connectivity measure for each gene as the correlation between a the gene expression and the module eigengene.)。
xi is the gene expression profile of gene i and MEbrown is the module eigengene of the brown module.
note:在这里基因i不一定在brown模块里。
他们为每个模块都构建了module membership(MM)的值,过去他们把这个值称作kME。
datKME=signedKME(datExpr, datME, outputColumnName="MM.")
# Display the first few rows of the data frame
head(datKME)
输出为:
每个基因在每一个module里面都会有一个对应的值。
7d 在感兴趣的模块中挖掘具有高gene significance和高intramodular connectivity的基因
在确定 了与特定trait高相关的棕色module之后,接下来我们需要找到在棕色module中高gene significance和高intramodular connectivity的基因。
在这里设定的筛选值分别为0.2和0.8。
FilterGenes= abs(GS1)> .2 & abs(datKME$MM.brown)>.8
table(FilterGenes)
结果如下:
查看过滤掉的基因名称
dimnames(data.frame(datExpr))[[2]][FilterGenes]
7e module membership measures (e.g. MM.turquoise) 和intramodular connectivity之间的关系
sizeGrWindow(8,6)
par(mfrow=c(2,2))
# We choose 4 modules to plot: turquoise, blue, brown, green.
# For simplicity we write the code out explicitly for each module.
which.color="turquoise";
restrictGenes=colorh1==which.color
verboseScatterplot(Alldegrees1$kWithin[ restrictGenes],
(datKME[restrictGenes, paste("MM.", which.color, sep="")])^6,
col=which.color,
xlab="Intramodular Connectivity",
ylab="(Module Membership)^6")
which.color="blue";
restrictGenes=colorh1==which.color
verboseScatterplot(Alldegrees1$kWithin[ restrictGenes],
(datKME[restrictGenes, paste("MM.", which.color, sep="")])^6,
col=which.color,
xlab="Intramodular Connectivity",
ylab="(Module Membership)^6")
which.color="brown";
restrictGenes=colorh1==which.color
verboseScatterplot(Alldegrees1$kWithin[ restrictGenes],
(datKME[restrictGenes, paste("MM.", which.color, sep="")])^6,
col=which.color,
xlab="Intramodular Connectivity",
ylab="(Module Membership)^6")
which.color="green";
restrictGenes=colorh1==which.color
verboseScatterplot(Alldegrees1$kWithin[ restrictGenes],
(datKME[restrictGenes, paste("MM.", which.color, sep="")])^6,
col=which.color,
xlab="Intramodular Connectivity",
ylab="(Module Membership)^6")
结果如下
Figure 2: Module membership raised to power 6 (y-axis) vs. intramodular connectivity (x-axis) plotted separately for selected modules in the simulated data set. After raising the module membership to a power of 6, it is highly correlated with the intramodular connectivity (kWithin)
所以module membership和intramodular connectivity是具有高度相关性的?对每个module都是这样。
7e 基于详细定义module membership的基因筛选方法
这个包是基于gene significance 和 module membership基因筛选的。
NS1=networkScreening(y=y, datME=datME, datExpr=datExpr,
oddPower=3, blockSize=1000, minimumSampleSize=4,
addMEy=TRUE, removeDiag=FALSE, weightESy=0.5)
接下来我们比较一下detailed network screening analysis和这种标准的筛选方法。有多少基因是干扰基因。
# network screening analysis
mean(NoiseGeneIndicator[rank(NS1$p.Weighted,ties.method="first")<=100])
# standard analysis based on the correlation p-values (or Student T test)
mean(NoiseGeneIndicator[rank(NS1$p.Standard,ties.method="first")<=100])
在这里, network screening analysis得到了一个噪音基因数量较少的前100名名单。我们现在将基于WGCNA的筛选(基于p.Weighted)与标准筛选进行比较,通过评估噪音基因的比例 在通过对p值进行排序而产生的基因列表中的噪音基因比例。
topNumbers=c(10,20,50,100)
for (i in c(1:length(topNumbers)) )
{
print(paste("Proportion of noise genes in the top", topNumbers[i], "list"))
WGCNApropNoise=mean(NoiseGeneIndicator[rank(NS1$p.Weighted,ties.method="first")<=topNumbers[i]])
StandardpropNoise=mean(NoiseGeneIndicator[rank(NS1$p.Standard,ties.method="first")<=topNumbers[i]])
print(paste("WGCNA, proportion of noise=", WGCNApropNoise,
", Standard, prop. noise=", StandardpropNoise))
if (WGCNApropNoise< StandardpropNoise) print("WGCNA wins")
if (WGCNApropNoise==StandardpropNoise) print("both methods tie")
if (WGCNApropNoise>StandardpropNoise) print("standard screening wins")
}
我们可以看到WGCNA的筛选方法有更少的噪音基因。
在进行下一步之前,需要删除一些大的数据集:
rm(dissTOM); collectGarbage()
7g. 比较weighted correlation和standard Pearson correlation
#Form a data frame containing standard and network screening results
CorPrediction1=data.frame(GS1,NS1$cor.Weighted)
cor.Weighted=NS1$cor.Weighted
# Plot the comparison
sizeGrWindow(8, 6)
verboseScatterplot(cor.Weighted, GS1,
main="Network-based weighted correlation versus Pearson correlation\n",
col=truemodule, cex.main = 1.2)
abline(0,1)
Figure 3: Trait-based gene significance in the training set (y-axis) plotted against the network-based significance
(x-axis). WGCNA amplifies correlations of genes that are members of outcome related modules. The standard
method (simple Pearson correlation) ignores module membership information.
网友评论