permute_rho: Permutes the pair-wise Spearman rank co-occurrence, to...

View source: R/permute_rho.R

permute_rhoR Documentation

Permutes the pair-wise Spearman rank co-occurrence, to determine a significant rho-cutoff. Function from the phylosmith-package.

Description

Permutes the pair-wise Spearman rank co-occurrence, to determine a significant rho-cutoff.

Usage

permute_rho(phyloseq_obj, treatment = NULL, subset = NULL,
replicate_samples = NULL, permutations = 10, method = 'spearman',
cores = 1)

Arguments

phyloseq_obj

A phyloseq-class object.

treatment

Column name as a string or numeric 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.

replicate_samples

Column name as a string or numeric in the sample_data that indicates which samples are non-independent of each other.

permutations

numeric Number of iterations to compute.

method

Which correlation method to calculate, "pearson", "spearman".

cores

numeric Number of CPU cores to use for the pair-wise permutations. Default (0) uses max cores available. Parallelization not available for systems running MacOS without openMP configuration.

Value

table

See Also

co_occurrence

Examples

permute_rho(soil_column, treatment = c('Matrix', 'Treatment'),
subset = 'Amended', replicate_samples = 'Day', permutations = 1,  cores = 0)

schuyler-smith/phyloschuyler documentation built on March 27, 2024, 4:29 p.m.