Get Prevalence and Taxonomy

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

Value

A tibble with prevalence and taxonomy

Details

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

References

Author

Sudarshan A. Shetty

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)
#>    Taxa prevalence           Family         Genus
#> 1  ASV4  0.9881154  Lachnospiraceae       Blautia
#> 2 ASV17  0.9847199 Streptococcaceae Streptococcus
#> 3 ASV85  0.7758913  Lachnospiraceae     Roseburia
#> 4 ASV83  0.7045840   Bacteroidaceae   Bacteroides