改进qgraph包中大型网络图的可视化

时间:2014-10-07 09:07:35

标签: r neural-network correlation r-qgraph

我遇到了qgraph包,我很感激,因为我有很多美丽而丰富的情节。我目前正在使用一个更大的数据库,包括在2个时间点测量的15种细菌物种中的755种代谢物,这是一个我无法附上的巨大情节,因为我没有10个声望点。

我想看看代谢物之间如何相互关联,但我希望看到只有显着的相关性。因此,我使用了Sacha Epskam在其网站中提供的代码:

  oralnet<-read.csv2('net24h.csv',dec='.')##file with the 755 metabolites
  oralnet2<-oralnet[,2:756]##remove the first column with name of bacteria 
  namesnet<-read.csv2('netID.csv',dec='.') #file with the names of the bacteria
  nameschars <- as.character(t(namesnet)[2:nrow(t(namesnet)),])
  uniquechars <- unique(as.character(t(namesnet)[2:nrow(t(namesnet)),]))
  nameslist<-list("Carbon"  =which(nameschars==uniquechars[1]),
            "Nitrogen"=which(nameschars==uniquechars[2]),
            "PS"=which(nameschars==uniquechars[3]),
            "Nutrient"=which(nameschars==uniquechars[4]),
            "Peptide"=which(nameschars==uniquechars[5]))

  rownames(oralnet2)<-c("Aa","Fn","Pg","Pi","Tf","Smut","Ssob","An","Csput","Sgord",
  "Avisc","Ssal","Ssang","Vparv","Smitis")

  qgraph(cor(oralnet2, use="pairwise"),minimum=0.25,groups=nameslist,
  legend=TRUE,borders=FALSE,label.cex=0.4, labels=names(oralnet2),
  layout="spring",line = 2.5,legend.cex=0.5,label.scale=FALSE,
  graph="sig2",alpha=cc(0.0001,0.001))

正如我所提到的,有很多相关性,我想删除一些节点。我知道qgraph不允许你删除节点,因此我想知道是否有任何方法可以改善绘图的可视化。我真的很感激任何建议!!我再次感谢您的时间和考虑!

祝福,

艾玛

0 个答案:

没有答案