plot_network: plot_network

View source: R/plot.R

plot_networkR Documentation

plot_network

Description

plotting the network of metabolites and OTU. Orange nodes represent the OTU, while the other color represent the metabolite. Same color metabolites nodes are constructed in the same modules.

Usage

plot_network(net, corr, seed = 123, return = FALSE, interaction = TRUE)

Arguments

net

result of function 'coExpress'

corr

result of function 'corr.test'

seed

set seed for layout in interaction ploting

return

whether return the igraph

interaction

plot method

Value

igraph or graph

Author(s)

Congcong Gong

Examples

library(data.table)
path <- system.file('extdata', 'metabolites_and_genera.rda', package = 'mbOmic')
load(path)
names(genera)[1] <- 'rn'
names(metabolites)[1] <- 'rn'
b <- bSet(b = genera)
m <- mSet(m = metabolites)
res <- corr(m, b, method = 'spearman')
net <- coExpress(m, minN = 2, power = 9, message = FALSE)
plot_network(net, res[abs(rho)>=0.85])

gongcongcong/mbOmic documentation built on July 1, 2023, 1:47 p.m.