View source: R/co_occurrence_network.R
co_occurrence_network | R Documentation |
Inputs a phyloseq-class
object and
creates a network from the co-occurrence. The co-occurrence can either be
input, or it will be calculated with the Spearman-rank correlation. Also,
the layout of the graph can be given as an argument as well for reproducibility.
co_occurrence_network(phyloseq_obj, classification = NULL,
treatment = NULL, subset = NULL, co_occurrence_table = NULL, layout = NULL,
nodes_of_interest = NULL, node_colors = 'default',
negative_positive_colors = c('tomato3', 'gray22'),
cluster = FALSE, cluster_colors = '#979aaa', buffer = 0.5)
phyloseq_obj |
A |
classification |
Column name as a string or number in the
|
treatment |
Column name as a string or number in the
|
subset |
A factor within the |
co_occurrence_table |
Table of the co-occurrence of taxa/genes in the
|
layout |
(optional) an igraph layout of the network, for reproducibility.
Can be created with |
nodes_of_interest |
A vector of names of classes within the
|
node_colors |
Name of a color set from the RColorBrewer package or a vector palette of R accepted colors. |
negative_positive_colors |
colors to use for the edges to represent negative and positive correlations. |
cluster |
if |
cluster_colors |
Name of a color set from the RColorBrewer package or a vector palette of R accepted colors to use for the clusters. |
buffer |
Amount of space beyond the points to extend the cluster ( aesthetic argument). |
ggplot-object
#co_occurrence_network(soil_column, treatment = c('Matrix', 'Treatment'),
#subset = 'Soil Amended', co_occurrence_table = NULL, layout = NULL,
#classification = 'Phylum')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.