createTaxonTable.Rd
Create a table of most frequent taxa in a data.frame
createTaxonTable(dat, n = 10)
data.frame produced by importBugSigDB, subsetted as desired
number of taxa to return (if sig.type=="both", this is the number of taxa to return for each direction)
kable table with increased and decreased taxa and a binomial test based on total number of studies in the data.frame
full.dat <- bugsigdbr::importBugSigDB()
#> Using cached version from 2022-03-31 12:35:22
createTaxonTable(full.dat, n=20)
#> # A tibble: 20 × 15
#> `Taxon Name` `Taxonomic Level` total_signatures increased_signatures
#> <chr> <chr> <int> <int>
#> 1 Streptococcus genus 221 140
#> 2 Prevotella genus 191 100
#> 3 Bacteroides genus 179 66
#> 4 Lactobacillus genus 171 99
#> 5 Firmicutes phylum 155 66
#> 6 Bacteroidetes phylum 152 72
#> 7 Lachnospiraceae family 144 60
#> 8 Bifidobacterium genus 138 61
#> 9 Faecalibacterium genus 121 36
#> 10 Veillonella genus 121 76
#> 11 Clostridium genus 120 69
#> 12 Proteobacteria phylum 118 83
#> 13 Actinobacteria phylum 114 59
#> 14 Enterobacteriaceae family 114 84
#> 15 Oscillospiraceae family 102 41
#> 16 Ruminococcus genus 100 43
#> 17 Eubacteriales order 97 42
#> 18 Lactobacillaceae family 95 51
#> 19 Roseburia genus 95 30
#> 20 Blautia genus 94 44
#> # … with 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>