Skip to contents

Visualize a correlation result as a network

Usage

correlationNetwork(
  object,
  correlationCoefThreshold = 0.5,
  pValueThreshold = 0.05,
  ...
)

# S4 method for ComputeResult
correlationNetwork(
  object,
  correlationCoefThreshold = 0.5,
  pValueThreshold = 0.05,
  ...
)

# S4 method for data.frame
correlationNetwork(
  object,
  correlationCoefThreshold = 0.5,
  pValueThreshold = 0.05,
  bipartiteNetwork = c(FALSE, TRUE)
)

Arguments

object

A ComputeResult or data.frame

correlationCoefThreshold

threshold to filter edges by correlation coefficient. Edges with correlation coefficients below this threshold will be removed. Default is .5

pValueThreshold

threshold to filter edges by p-value. Edges with p-values above this threshold will be removed. Default is .05

...

additional arguments

bipartiteNetwork

Should the network use a bipartite or unipartite layout? Defaults to unipartite.

Examples

correlationOutput <- MicrobiomeDB::correlation(
     getCollection(
  microbiomeData::DiabImmune, 
  "16S (V4) Genus (Relative taxonomic abundance analysis)", 
  continuousMetadataOnly = TRUE), 
     method='spearman', 
     verbose=FALSE
)
correlationNetwork(correlationOutput) ## renders html widget