network_layout_ps: Create an layout_igraph object of the co-occurrence from a...

network_layout_psR Documentation

Create an layout_igraph object of the co-occurrence from a phyloseq object. Function from the phylosmith-package.

Description

Create an layout_igraph object of the co-occurrence from a phyloseq object. This can be input into the co_occurrence_network function, or used for other network creating scripts. The purpose is to be able to create reproducible and comparable graphics.

Usage

network_layout_ps(phyloseq_obj,
treatment = NULL, subset = NULL, co_occurrence_table = NULL,
algorithm = 'fr')

Arguments

phyloseq_obj

A phyloseq-class object. It must contain sample_data()) with information about each sample, and it must contain tax_table()) with information about each taxa/gene.

treatment

Column name as a string or number in the sample_data. This can be a vector of multiple columns and they will be combined into a new column.

subset

A factor within the treatment. This will remove any samples that to not contain this factor. This can be a vector of multiple factors to subset on.

co_occurrence_table

Table of the co-occurrence of taxa/genes in the phyloseq_obj, computed using co_occurrence. If no table is given, it will be computed with the phyloseq_obj, using the given treatment and p = 0.05.

algorithm

Supported igraph::layout_() algorithm.

Value

layout_igraph object

Examples

network_layout_ps(soil_column, treatment = c('Matrix', 'Treatment'),
subset = 'Soil Amended', algorithm = 'kk')

schuyler-smith/phylosmith documentation built on Aug. 17, 2024, 10:19 a.m.