Create a table of most frequent taxa in a data.frame

createTaxonTable(dat, n = 10)

Arguments

dat

data.frame produced by importBugSigDB, subsetted as desired

n

number of taxa to return (if sig.type=="both", this is the number of taxa to return for each direction)

Value

kable table with increased and decreased taxa and a binomial test based on total number of studies in the data.frame

Examples

full.dat <- bugsigdbr::importBugSigDB()
#> Using cached version from 2025-01-30 21:57:36
createTaxonTable(full.dat, n=20)
#> # A tibble: 20 × 15
#>    `Taxon Name`       `Taxonomic Level` total_signatures increased_signatures
#>    <chr>              <chr>                        <int>                <int>
#>  1 Prevotella         genus                          520                  276
#>  2 Streptococcus      genus                          481                  299
#>  3 Bacteroides        genus                          458                  198
#>  4 Lactobacillus      genus                          428                  259
#>  5 Lachnospiraceae    family                         399                  155
#>  6 Bacillota          phylum                         366                  169
#>  7 Bifidobacterium    genus                          364                  179
#>  8 Faecalibacterium   genus                          346                  119
#>  9 Veillonella        genus                          312                  195
#> 10 Oscillospiraceae   family                         304                  137
#> 11 Pseudomonadota     phylum                         299                  184
#> 12 Actinomycetota     phylum                         291                  159
#> 13 Clostridium        genus                          279                  143
#> 14 Blautia            genus                          277                  115
#> 15 Fusobacterium      genus                          266                  157
#> 16 Bacteroidota       phylum                         264                  128
#> 17 Haemophilus        genus                          257                   98
#> 18 Ruminococcus       genus                          245                   94
#> 19 Enterobacteriaceae family                         245                  170
#> 20 Eubacteriales      order                          244                  107
#> # ℹ 11 more variables: decreased_signatures <int>, `Binomial Test pval` <dbl>,
#> #   kingdom <chr>, phylum <chr>, class <chr>, order <chr>, family <chr>,
#> #   genus <chr>, species <chr>, n_signatures <int>, metaphlan_name <fct>