タンパク質相互作用ネットワークを題材に中心性指標とタンパク質の必須性の関係を調査します。具体的に,次のことを行います。
library(igraph)
次のパッケージを付け加えます: ‘igraph’
以下のオブジェクトは ‘package:stats’ からマスクされています:
decompose, spectrum
以下のオブジェクトは ‘package:base’ からマスクされています:
union
../data/ecoli_ppi_Hu_etal_2009.txt
# エッジリストの読み込み
d <- read.table("../data/ecoli_ppi_Hu_etal_2009.txt")
# グラフオブジェクトの作成
g <- simplify(graph_from_data_frame(d,directed=F),remove.multiple=T,remove.loops=T)
# 最大連結成分の取得
cls <- components(g,"weak")
g <- induced_subgraph(g, V(g)$name[cls$membership==which(cls$csize==max(cls$csize))[[1]]])
# 次数中心性(degree centrality)
degree <- degree(g)
# 固有ベクトル中心性(eigenvector centraliry)
eigen <- eigen_centrality(g)$vector
# PageRank
page <- page_rank(g)$vector
# 近接中心性(closeness centrality)
closen <- closeness(g)
# 媒介中心性(betweenness centrality)
between <- betweenness(g)
# サブグラフ中心性(subgraph centrality)
subgraph <- subgraph_centrality(g)
# データフレームにまとめる
nprop <- data.frame(V(g)$name,degree,eigen,page,closen,between,subgraph)
names(nprop)[[1]] <- "gene"
Baba T, Ara T, Hasegawa M, Takai Y, Okumura Y, Baba M, Datsenko KA, Tomita M, Wanner BL, Mori H. Construction of Escherichia coli K-12 in-frame, single-gene knockout mutants: the Keio collection. Mol Syst Biol. 2006;2:2006.0008. Epub 2006 Feb 21. doi: 10.1038/msb4100050
ess <- read.table("../data/ecoli_proteins_essentiality_Baba2006MSB.txt",header=T)
# 必須(E),非必須(N),不明(u)
# 中心性指標のデータと必須性のデータをマージする
d <- merge(ess, nprop,by="gene")
# unknownの遺伝子を除外する。
d <- d[d$essential!="u",]
layout(matrix(1:6, ncol=3))
# 次数中心性(degree centrality)
boxplot(log(d$degree)~d$essential,xlab="Essentiality",ylab="Degree")
# 固有ベクトル中心性(eigenvector centraliry)
boxplot(log(d$eigen)~d$essential,xlab="Essentiality",ylab="Eigenvector")
# PageRank
boxplot(log(d$page)~d$essential,xlab="Essentiality",ylab="PageRank")
# 近接中心性(closeness centrality)
boxplot(d$closen~d$essential,xlab="Essentiality",ylab="Closeness")
# 媒介中心性(betweenness centrality)
boxplot(log(d$between+1)~d$essential,xlab="Essentiality",ylab="Betweenness")
# サブグラフ中心性(subgraph centrality)
boxplot(log(d$subgraph)~d$essential,xlab="Essentiality",ylab="Subgraph")
# 必須タンパク質の中心性指標
ess_nprop <- d[d$essential=="E",]
# 非必須タンパク質の中心性指標
noness_nprop <- d[d$essential=="N",]
cat("次数中心性(degree centrality)
中央値 必須:",median(ess_nprop$degree),"非必須:",median(noness_nprop$degree),"\n")
次数中心性(degree centrality)
中央値 必須: 9 非必須: 2
wilcox.test(ess_nprop$degree, noness_nprop$degree)
Wilcoxon rank sum test with continuity correction
data: ess_nprop$degree and noness_nprop$degree
W = 171775, p-value < 2.2e-16
alternative hypothesis: true location shift is not equal to 0
cat("固有ベクトル中心性(eigenvector centraliry)
中央値 必須:",median(ess_nprop$eigen),"非必須:",median(noness_nprop$eigen),"\n")
固有ベクトル中心性(eigenvector centraliry)
中央値 必須: 0.04040747 非必須: 0.00491207
wilcox.test(ess_nprop$eigen, noness_nprop$eigen)
Wilcoxon rank sum test with continuity correction
data: ess_nprop$eigen and noness_nprop$eigen
W = 173696, p-value < 2.2e-16
alternative hypothesis: true location shift is not equal to 0
cat("PageRank
中央値 必須:",median(ess_nprop$page),"非必須:",median(noness_nprop$page),"\n")
PageRank
中央値 必須: 0.0008231837 非必須: 0.0002878847
wilcox.test(ess_nprop$page, noness_nprop$page)
Wilcoxon rank sum test with continuity correction
data: ess_nprop$page and noness_nprop$page
W = 168277, p-value < 2.2e-16
alternative hypothesis: true location shift is not equal to 0
cat("近接中心性(closeness centrality)
中央値 必須:",median(ess_nprop$closen),"非必須:",median(noness_nprop$closen),"\n")
近接中心性(closeness centrality)
中央値 必須: 0.0001693338 非必須: 0.0001446132
wilcox.test(ess_nprop$closen, noness_nprop$closen)
Wilcoxon rank sum test with continuity correction
data: ess_nprop$closen and noness_nprop$closen
W = 173099, p-value < 2.2e-16
alternative hypothesis: true location shift is not equal to 0
cat("媒介中心性(betweenness centrality)
中央値 必須:",median(ess_nprop$between),"非必須:",median(noness_nprop$between),"\n")
媒介中心性(betweenness centrality)
中央値 必須: 2453.932 非必須: 47.76135
wilcox.test(ess_nprop$between, noness_nprop$between)
Wilcoxon rank sum test with continuity correction
data: ess_nprop$between and noness_nprop$between
W = 166378, p-value < 2.2e-16
alternative hypothesis: true location shift is not equal to 0
cat("サブグラフ中心性(subgraph centrality)
中央値 必須:",median(ess_nprop$subgraph),"非必須:",median(noness_nprop$subgraph),"\n")
サブグラフ中心性(subgraph centrality)
中央値 必須: 6.05615e+11 非必須: 8949452569
wilcox.test(ess_nprop$subgraph, noness_nprop$subgraph)
Wilcoxon rank sum test with continuity correction
data: ess_nprop$subgraph and noness_nprop$subgraph
W = 173693, p-value < 2.2e-16
alternative hypothesis: true location shift is not equal to 0
# 必須なら1,非必須なら0とする。
ess_score <- ifelse(d$essential == "E",1,0)
# ROCカーブを書くためのパッケージを読み込む
library(pROC)
Type 'citation("pROC")' for a citation.
次のパッケージを付け加えます: ‘pROC’
以下のオブジェクトは ‘package:stats’ からマスクされています:
cov, smooth, var
layout(matrix(1:6, ncol=3))
# 次数中心性(degree centrality)
plot.roc(ess_score,d$degree,print.auc=T,main="Degree")
Setting levels: control = 0, case = 1
Setting direction: controls < cases
# 固有ベクトル中心性(eigenvector centraliry)
plot.roc(ess_score,d$eigen,print.auc=T,main="Eigenvector")
Setting levels: control = 0, case = 1
Setting direction: controls < cases
# PageRank
plot.roc(ess_score,d$page,print.auc=T,main="PageRank")
Setting levels: control = 0, case = 1
Setting direction: controls < cases
# 近接中心性(closeness centrality)
plot.roc(ess_score,d$closen,print.auc=T,main="Closeness")
Setting levels: control = 0, case = 1
Setting direction: controls < cases
# 媒介中心性(betweenness centrality)
plot.roc(ess_score,d$between,print.auc=T,main="Betweenness")
Setting levels: control = 0, case = 1
Setting direction: controls < cases
# サブグラフ中心性(Subgraph centrality)
plot.roc(ess_score,d$subgraph,print.auc=T,main="Subgraph")
Setting levels: control = 0, case = 1
Setting direction: controls < cases
../data/yeast_ppi_Batada_etal_2006.txt
../data/yeast_proteins_essentiality_OGEE.txt