WGCNA:使用模擬數(shù)據(jù)來評(píng)估不同的模塊檢測(cè)方法和基因篩選方法

原文鏈接:Simulated-07-Membership.pdf (ucla.edu)

7. 模塊成員甩恼、模塊內(nèi)連通性和篩選模塊內(nèi)hub基因

7a.模塊內(nèi)連通性

(In network literature, connectivity is often referred to as ”degree”.)

 intramodularConnectivity 

是用來計(jì)算整個(gè)網(wǎng)絡(luò)的連通性kTotal,和每一個(gè)模塊內(nèi)的連通性kWithin,

kOut=kTotal-kWithin
kDiff=kIn-kOut=2*kIN-kTotal
ADJ1=abs(cor(datExpr,use="p"))^6
Alldegrees1=intramodularConnectivity(ADJ1, colorh1)
head(Alldegrees1)

參考例子的計(jì)算結(jié)果如下:

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之間的關(guān)系

繪制gene significance和intramodular connectivity關(guān)系圖

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 的相關(guān)性更高少欺。


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 讓模塊內(nèi)所有基因的連接度泛化

intramodular connectivity 這個(gè)概念只是對(duì)給出的模塊間的基因進(jìn)行定義叔扼,但在實(shí)際的生物過程中基因如何連接其他的生物學(xué)模塊是非常重要的玲销。因此,他們定義了一個(gè)基于特征基因連通性模塊的測(cè)量方法來解釋基因表達(dá)和模塊特征基因的相關(guān)性( 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模塊里涨椒。
他們?yōu)槊總€(gè)模塊都構(gòu)建了module membership(MM)的值,過去他們把這個(gè)值稱作kME谴餐。

datKME=signedKME(datExpr, datME, outputColumnName="MM.")
# Display the first few rows of the data frame
head(datKME)

輸出為:



每個(gè)基因在每一個(gè)module里面都會(huì)有一個(gè)對(duì)應(yīng)的值。

7d 在感興趣的模塊中挖掘具有高gene significance和高intramodular connectivity的基因

在確定 了與特定trait高相關(guān)的棕色module之后呆抑,接下來我們需要找到在棕色module中高gene significance和高intramodular connectivity的基因总寒。

在這里設(shè)定的篩選值分別為0.2和0.8。

FilterGenes= abs(GS1)> .2 & abs(datKME$MM.brown)>.8
table(FilterGenes)

結(jié)果如下:

查看過濾掉的基因名稱

dimnames(data.frame(datExpr))[[2]][FilterGenes]

7e module membership measures (e.g. MM.turquoise) 和intramodular connectivity之間的關(guān)系

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")

結(jié)果如下


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是具有高度相關(guān)性的理肺?對(duì)每個(gè)module都是這樣。

7e 基于詳細(xì)定義module membership的基因篩選方法

這個(gè)包是基于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和這種標(biāo)準(zhǔn)的篩選方法妹萨。有多少基因是干擾基因。

# 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得到了一個(gè)噪音基因數(shù)量較少的前100名名單乎完。我們現(xiàn)在將基于WGCNA的篩選(基于p.Weighted)與標(biāo)準(zhǔn)篩選進(jìn)行比較,通過評(píng)估噪音基因的比例 在通過對(duì)p值進(jìn)行排序而產(chǎn)生的基因列表中的噪音基因比例品洛。

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的篩選方法有更少的噪音基因树姨。
在進(jìn)行下一步之前,需要?jiǎng)h除一些大的數(shù)據(jù)集:

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.
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末桥状,一起剝皮案震驚了整個(gè)濱河市帽揪,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌辅斟,老刑警劉巖转晰,帶你破解...
    沈念sama閱讀 221,888評(píng)論 6 515
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場(chǎng)離奇詭異,居然都是意外死亡查邢,警方通過查閱死者的電腦和手機(jī)蔗崎,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 94,677評(píng)論 3 399
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來扰藕,“玉大人缓苛,你說我怎么就攤上這事〉松睿” “怎么了未桥?”我有些...
    開封第一講書人閱讀 168,386評(píng)論 0 360
  • 文/不壞的土叔 我叫張陵,是天一觀的道長(zhǎng)庐完。 經(jīng)常有香客問我钢属,道長(zhǎng),這世上最難降的妖魔是什么门躯? 我笑而不...
    開封第一講書人閱讀 59,726評(píng)論 1 297
  • 正文 為了忘掉前任淆党,我火速辦了婚禮,結(jié)果婚禮上讶凉,老公的妹妹穿的比我還像新娘染乌。我一直安慰自己,他們只是感情好懂讯,可當(dāng)我...
    茶點(diǎn)故事閱讀 68,729評(píng)論 6 397
  • 文/花漫 我一把揭開白布荷憋。 她就那樣靜靜地躺著,像睡著了一般褐望。 火紅的嫁衣襯著肌膚如雪勒庄。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 52,337評(píng)論 1 310
  • 那天瘫里,我揣著相機(jī)與錄音实蔽,去河邊找鬼。 笑死谨读,一個(gè)胖子當(dāng)著我的面吹牛局装,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播劳殖,決...
    沈念sama閱讀 40,902評(píng)論 3 421
  • 文/蒼蘭香墨 我猛地睜開眼铐尚,長(zhǎng)吁一口氣:“原來是場(chǎng)噩夢(mèng)啊……” “哼!你這毒婦竟也來了哆姻?” 一聲冷哼從身側(cè)響起宣增,我...
    開封第一講書人閱讀 39,807評(píng)論 0 276
  • 序言:老撾萬榮一對(duì)情侶失蹤,失蹤者是張志新(化名)和其女友劉穎填具,沒想到半個(gè)月后统舀,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體匆骗,經(jīng)...
    沈念sama閱讀 46,349評(píng)論 1 318
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 38,439評(píng)論 3 340
  • 正文 我和宋清朗相戀三年誉简,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了碉就。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 40,567評(píng)論 1 352
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡闷串,死狀恐怖瓮钥,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情烹吵,我是刑警寧澤碉熄,帶...
    沈念sama閱讀 36,242評(píng)論 5 350
  • 正文 年R本政府宣布,位于F島的核電站肋拔,受9級(jí)特大地震影響锈津,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜凉蜂,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,933評(píng)論 3 334
  • 文/蒙蒙 一琼梆、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧窿吩,春花似錦茎杂、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,420評(píng)論 0 24
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至轧邪,卻和暖如春刽脖,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背忌愚。 一陣腳步聲響...
    開封第一講書人閱讀 33,531評(píng)論 1 272
  • 我被黑心中介騙來泰國(guó)打工曾棕, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人菜循。 一個(gè)月前我還...
    沈念sama閱讀 48,995評(píng)論 3 377
  • 正文 我出身青樓,卻偏偏與公主長(zhǎng)得像申尤,于是被迫代替她去往敵國(guó)和親癌幕。 傳聞我的和親對(duì)象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 45,585評(píng)論 2 359

推薦閱讀更多精彩內(nèi)容