Obtain a data.frame of ordered taxa abundances at a given level
Source:R/get_top_taxa.R
get_top_taxa.Rd
This function takes a MultiAssayExperiment
object and returns a
data.frame of the present taxa at a user-supplied taxonomy level,
and outputs the average abundances of the taxa.
Arguments
- dat
A
MultiAssayExperiment
object specially formatted as an animalcules output.- taxon_level
Character string indicating the level of taxonomy to aggregate the counts data. Must be the name of a column in
MultiAssayExperiment::rowData(dat)
.
Examples
in_dat <- system.file("extdata/MAE_small.RDS", package = "LegATo") |> readRDS()
out <- get_top_taxa(in_dat, "genus")
out
#> taxon allmeans
#> 1 Acinetobacter 4.393573e-01
#> 2 Corynebacterium 1.787561e-01
#> 3 Staphylococcus 9.218562e-02
#> 4 Noviherbaspirillum 6.755399e-02
#> 5 Kocuria 6.213396e-02
#> 6 Pseudomonas 2.661071e-02
#> 7 Brucella 2.273844e-02
#> 8 Alkalihalophilus 2.191473e-02
#> 9 Weissella 1.575164e-02
#> 10 Listeria 1.569116e-02
#> 11 Moraxella 1.527953e-02
#> 12 Streptococcus 1.295274e-02
#> 13 Enterobacter 8.513321e-03
#> 14 Other 8.108827e-03
#> 15 Haemophilus 5.898783e-03
#> 16 Aeromonas 3.512574e-03
#> 17 Paracoccus 1.746868e-03
#> 18 Dolosigranulum 5.219494e-04
#> 19 Mycoplasma 3.750489e-04
#> 20 Delftia 2.991494e-04
#> 21 Cutibacterium 7.156670e-05
#> 22 Escherichia 2.596714e-05