Identify dominant taxa in each sample and give overview.

dominant_taxa(x, level = NULL, group = NULL)

Arguments

x

phyloseq-class object

level

Taxonomic level uses microbiome::aggregate_taxa

group

Provide overview by groups. Default=NULL

Value

A list of two data frames/tibbles

Details

Identifies the dominant taxa in each sample and gives an overview of frequency and percent sample that are dominated by each taxon. Can be group wise or overall.

Examples

library(microbiomeutilities)
library(dplyr)
data("zackular2014")
p0 <- zackular2014
x.d <- dominant_taxa(p0, level = "Genus", group = "DiseaseState")
head(x.d$dominant_overview)
#> # A tibble: 6 × 5
#> # Groups:   DiseaseState [3]
#>   DiseaseState dominant_taxa      n rel.freq rel.freq.pct
#>   <fct>        <chr>          <int>    <dbl> <chr>       
#> 1 H            g__Bacteroides    15     50   50%         
#> 2 nonCRC       g__Blautia        13     46.4 46%         
#> 3 CRC          g__Bacteroides     9     30   30%         
#> 4 CRC          g__Blautia         9     30   30%         
#> 5 H            g__Blautia         7     23.3 23%         
#> 6 nonCRC       g__Bacteroides     6     21.4 21%