getCoreTaxa: List core taxa across groups

View source: R/getCoreTaxa.R

getCoreTaxaR Documentation

List core taxa across groups

Description

List the indices of all taxa that occur at least min.occ times in each group.

Usage

getCoreTaxa(
  x,
  groups = c(),
  min.occ = 1,
  min.groupnum = length(unique(groups)),
  consecutive = FALSE
)

Arguments

x

an abundance matrix where rows are taxa and columns samples

groups

group membership vector with as many entries as abundances has samples

min.occ

minimal occurrence to count a taxon as present in each group

min.groupnum

minimum occurrence across groups (fulfilling selected criteria within each group), by default in all

consecutive

assumes samples in each group are ordered by time, if true, minimal occurrence has to be consecutive

Value

indices of core taxa

Examples

data("floresgut_taxa")
data("floresgut_metadata")
groups=floresgut_metadata$host_subject_id
ct=getCoreTaxa(x=floresgut_taxa,groups=groups,consecutive=TRUE, min.occ=4)
rownames(floresgut_taxa)[ct]

hallucigenia-sparsa/seqgroup documentation built on July 6, 2022, 1:11 p.m.