PolygonModsquareG: Construct a network layout. Arrange network nodes to...

View source: R/PolygonModsquareG.R

PolygonModsquareGR Documentation

Construct a network layout. Arrange network nodes to different locations according to grouping

Description

Construct a network layout. Arrange network nodes to different locations according to grouping

Usage

PolygonModsquareG(cor = cor, nodeGroup = netClu, r1 = 1, N = 1.1, cut = 3)

Arguments

cor

Correlation matrix

nodeGroup

Classification information of network nodes.Group according to actual requirements, see example

r1

big cluster r

N

break of each cluster

cut

line need to cut off

Value

result2 Which contains 2 lists.Result2[[1]], consists of OTU and its corresponding coordinates. Result2[[2]], consists of the network center coordinates of each group

Author(s)

Contact: Tao Wen 2018203048@njau.edu.cn Jun Yuan junyuan@njau.edu.cn Penghao Xie 2019103106@njau.edu.cn

References

Yuan J, Zhao J, Wen T, Zhao M, Li R, Goossens P, Huang Q, Bai Y, Vivanco JM, Kowalchuk GA, Berendsen RL, Shen Q Root exudates drive the soil-borne legacy of aboveground pathogen infection Microbiome 2018,DOI: doi: 10.1186/s40168-018-0537-x

Examples

data
data(ps)
result = corMicro (ps = ps,N = 100,r.threshold=0.8,p.threshold=0.05,method = "pearson")
#Extract correlation matrix
cor = result[[1]]
# building the node group
netClu = data.frame(ID = row.names(cor),group =rep(1:3,length(row.names(cor)))[1:length(row.names(cor))] )
netClu$group = as.factor(netClu$group)
result2 = PolygonModsquareG(cor = cor,nodeGroup =netClu,r1 = 1,N = 1.1,cut = 3,line = FALSE)



taowenmicro/ggClusterNet documentation built on March 29, 2024, 1:32 a.m.