我尝试使用 RCytoscape 包将网络从 R 导出到 cytoscape。我试图遵循文档但失败了。以下是我使用的命令:
data(liver.toxicity)
X <- liver.toxicity$gene
Y <- liver.toxicity$clinic
toxicity.spls <- spls(X, Y, ncomp = 3, keepX = c(50, 50, 50), keepY = c(10, 10, 10))
result<-network(toxicity.spls, comp = 1:3, threshold = 0.8,
X.names = NULL, Y.names = NULL, keep.var = TRUE,
color.node = c("mistyrose", "lightcyan"),
shape.node = c("rectangle", "circle"),
color.edge = c("red", "blue"),
lty.edge = c("solid", "solid"), lwd.edge = c(1, 1),
show.edge.labels = FALSE, interactive = FALSE)
library(RCytoscape)
cw <- CytoscapeWindow ("result", graph=makeSimpleGraph())
displayGraph (cw)
而不是导入 42 个顶点和 78 条边,它只导入文档中显示的这三个边和节点。我没有意识到 whee 犯了错误。