Filter a MultiAssayExperiment to a top percentage of taxa and label the rest as "Other"
Source:R/filter_animalcules_MAE.R
filter_animalcules_MAE.Rd
This function takes an animalcules-formatted MultiAssayExperiment
(MAE) object and identifies all taxa at the "genus" level that represent
<filter_prop
average relative abundance across all samples in the MAE.
After identification at the genus level, taxa across the genus and species
levels are then consolidated into the category "Other".
Arguments
- dat
A
MultiAssayExperiment
object specially formatted as an animalcules output.- filter_prop
A double strictly between 0 and 1, representing the proportion of relative abundance at which to filter. Default is 0.001.
Examples
in_dat <- system.file("extdata/MAE_small.RDS", package = "LegATo") |> readRDS()
filter_animalcules_MAE(in_dat, 0.01)
#> A MultiAssayExperiment object of 1 listed
#> experiment with a user-defined name and respective class.
#> Containing an ExperimentList class object of length 1:
#> [1] MicrobeGenetics: SummarizedExperiment with 86 rows and 50 columns
#> Functionality:
#> experiments() - obtain the ExperimentList instance
#> colData() - the primary/phenotype DataFrame
#> sampleMap() - the sample coordination DataFrame
#> `$`, `[`, `[[` - extract colData columns, subset, or experiment
#> *Format() - convert into a long or wide DataFrame
#> assays() - convert ExperimentList to a SimpleList of matrices
#> exportClass() - save data to flat files