Get Prevalence and Taxonomy
getPrevalence(
x,
return_rank = rank_names(x),
return_taxa = taxa_names(x),
sort = TRUE,
...
)
A phyloseq object
Specify which taxonomic ranks to include in output.
Must be a character vector phyloseq::rank_names()
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
Logical. Sort by prevalence value from higher to lower (Default=TRUE)
Option to pass microbiome::prevalence
A tibble with prevalence and taxonomy
Get the prevalence of taxa in phyloseq
objects
along with taxonomic classification.
A Salonen et al. (2012) The adult intestinal core microbiota is determined by analysis depth and health status. Clinical Microbiology and Infection, 18(S4):16 20. https://doi.org/10.1111/j.1469-0691.2012.03855.x
Lahti L, Shetty S (2012-2019). microbiome R package. statistical aspects of the study of the microbiome. BioConductor. https://doi.org/doi:10.18129/B9.bioc.microbiome
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