View source: R/ArtifClusterG.R
ArtifCluster | R Documentation |
Manually specify coordinates to display the network
ArtifCluster(cor = cor, nodeGroup = netClu, r = r, da = da)
cor |
Correlation matrix |
nodeGroup |
Classification information of network nodes.Group according to actual requirements, see example |
r |
Radius of each submodule |
da |
The coordinates of each submodule |
list which contains node position coordinates
Contact: Tao Wen taowen@njau.edu.cn Penghao Xie 2019103106@njau.edu.cn yongxin liu yxliu@genetics.ac.cn Jun Yuan junyuan@njau.edu.cn
Tao Wen#, Penghao Xie#, Shengdie Yang, Guoqing Niu, Xiaoyu Liu, Zhexu Ding, Chao Xue, Yong-Xin Liu *, Qirong Shen, Jun Yuan* ggClusterNet: an R package for microbiome network analysis and modularity-based multiple network layouts iMeta 2022,DOI: doi: 10.1002/imt2.32
data(ps)
result = corMicro (ps = ps,N = 100,r.threshold=0.8,p.threshold=0.05,method = "pearson")
#Extract correlation matrix
cor = result[[1]]
# Extract taxonomy table
ps_net = result[[3]]
# set group of experimental
netClu = data.frame(ID = row.names(tax_table),group =rep(1:5,length(row.names(tax_table)))[1:length(row.names(tax_table))] )
netClu$group = as.factor(netClu$group)
tax_table = ps_net %>% vegan_tax() %>%
as.data.frame()
xs = as.data.frame(table(netClu$group))
# set the radicus
r = rep(4,length(xs$Freq))
# Set the coordinates manually
ax1 = c(120,0)
ax2 = c(130,-30)
ax3 = c(140,-70)
ax4 = c(130,-110)
ax5 = c(120,-140)
da = rbind(ax1,ax2,ax3,ax4,ax5)
# Calculate network layout
result2 = ArtifCluster(cor = cor,nodeGroup =netClu,r = r,da =da)
node = result2[[1]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.