PairwiseAdonisFun: Pairwise multilevel comparison using adonis over multiple...

View source: R/pairwiseAdonisFun.R

PairwiseAdonisFunR Documentation

Pairwise multilevel comparison using adonis over multiple distance metrics

Description

This is a wrapper function of pairwise.adonis. It takes a phyloseq-class object and calculates various distance matrices. Then, with pairwise.adonis it performs an ANOVA analysis making use of adonis and computes pairwise comparisons if more than two groups are provided.

Usage

PairwiseAdonisFun(
  data,
  formula,
  distances,
  pval,
  p.adjust.m = "BH",
  pw.options,
  type = "samples",
  ...
)

Arguments

data

phyloseq-class. For more details, check distance funtion.

formula

Column name of metadata to be passed to factors argument from pairwise.adonis.

distances

Character string including multiple distance methods to be used. Further details to be found in distance.

pval

p-value threshold to filter results.

p.adjust.m

Method selected to adjust the p-values for multiple comparisons. See pairwise.adonis for more detailes about methods and abbreviations. Default is set to Benjamini-Hochberg adjustment ("BH")

pw.options

Further arguments to be passed to pairwise.adonis. They should be included as a list (see examples).

type

character string with the type of comparison to used (sample-wise or taxa-wise, with default c(anova.cca"Samples")). Check distance for further details.

...

Further arguments to be passed to distance function from package phyloseq.

Value

Returns a data frame with pairwise.adonis results for all pairwise comparisons, performed on each distance .For further details on parameters, check pairwise.adonis.

Examples


#With no further arguments
pairwise_location<- PairwiseAdonisFun(normalized_phyloseq,distances = c("bray",
"unifrac", "wunifrac"),p.adjust.m="BH", formula = "location", pval=0.05)

#With further arguments
pairwise_location<- PairwiseAdonisFun(normalized_phyloseq,distances = c("bray",
"unifrac", "wunifrac"),p.adjust.m="BH", formula = "location", pval=0.05,
pw.options=list(perm=220))




nuriamw/micro4all documentation built on May 2, 2024, 9:18 a.m.