getPrevalence: Get Prevalence and Taxonomy

View source: R/getPrevalence.R

getPrevalenceR Documentation

Get Prevalence and Taxonomy

Description

Get Prevalence and Taxonomy

Usage

getPrevalence(
  x,
  return_rank = rank_names(x),
  return_taxa = taxa_names(x),
  sort = TRUE,
  ...
)

Arguments

x

A phyloseq object

return_rank

Specify which taxonomic ranks to include in output. Must be a character vector phyloseq::rank_names()

return_taxa

A specific list of taxa for which the values should be returned. This can be used if user is not interested in all the taxa in input phyloseq. Default is NULL which returns all taxa. This list must match rows names if otu_table in phyloseq has taxa_are_rows=TRUE or columns names if otu_table in phyloseq has taxa_are_rows=FALSE

sort

Logical. Sort by prevalence value from higher to lower (Default=TRUE)

...

Option to pass microbiome::prevalence

Details

Get the prevalence of taxa in phyloseq objects along with taxonomic classification.

Value

A tibble with prevalence and taxonomy

Author(s)

Sudarshan A. Shetty

References

Examples

library(biomeUtils)
data("FuentesIliGutData")
prev_tib <- getPrevalence(FuentesIliGutData,
  return_rank = c("Family", "Genus"),
  return_taxa = c("ASV4", "ASV17", "ASV85", "ASV83"),
  sort = TRUE
)
head(prev_tib)

RIVM-IIV-Microbiome/biomeUtils documentation built on July 20, 2023, 10:29 a.m.