0

我遇到了 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 不允许您删除节点,因此我想知道是否有任何方法可以改善绘图的可视化。我将非常感谢任何建议!再次感谢您的时间和考虑!

最好的祝愿,

艾玛

4

0 回答 0