ancomloop: ANCOM-BC analysis for multiple groups

ancomloopR Documentation

ANCOM-BC analysis for multiple groups

Description

This function is a wrapper of ancombc. When having multiple groups to compare, it allows the user to automatically loop over them and computes all possible combinations. Along with ancombc results, it appends to each table the taxonomy classification.

Usage

ancomloop(
  input_object_phyloseq,
  grouping,
  ancom.options,
  out.unclassified = FALSE,
  tax.level = NULL
)

Arguments

input_object_phyloseq

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

grouping

Character string. This is used as metadata variable for reordering factors (which allows the function to loop over groups). It is also passed to group and formula arguments in ancombc function.

ancom.options

Further arguments to be passed to ancombc. They should be included as a list (see more information in examples)

out.unclassified

Whether to filter out unclassified taxa (taxa level indicated with argument tax.level). Default is FALSE

tax.level

Character string. Must be a value from 'taxonomyRanks(). Indicates at which level taxa should be filtered out if are unclassified and at which taxonomical level ANCOMBC will be applied.

Value

Returns a list with as many arguments as groups are contained in metadata "grouping" variable. Each element is named after the group which is compared with all others and correspond to a data frame that includes ancombc parameters and the bias-adjusted abundance. In the process, it prints the groups that are being compared (first group against others).

Examples


ancom_location<- ancomloop(location_phyloseq,grouping="location",
ancom.options=list(p_adj_method ="holm", n_cl=4),
out.unclassified=TRUE, tax.level="Genus")






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