mia implements tools
for microbiome analysis based on the SummarizedExperiment
(Morgan et al. 2020),
SingleCellExperiment (Amezquita et
al. 2020) and TreeSummarizedExperiment (Huang 2021) infrastructure. Data wrangling and
analysis are the main scope of this package.
To install mia, install BiocManager first,
if it is not installed. Afterwards use the install function
from BiocManager.
The table below lists the functions of mia by use case.
Most analysis functions come in pairs: get*() returns the
result, and add*() stores it in the object, e.g. in
colData, rowData, reducedDim or
metadata. Each function has a help page with examples, and
the Orchestrating Microbiome
Analysis (OMA) book shows them in complete workflows. Functions that
are being removed are listed in ?mia::deprecate.
| Functions | Purpose |
|---|---|
importBIOM(), importQIIME2(),
importQZA(), importMothur(),
importMetaPhlAn(), importHUMAnN(),
importTaxpasta() |
Import results of common pipelines as a
TreeSummarizedExperiment (TreeSE) |
convertFromPhyloseq(),
convertFromBIOM(), convertFromDADA2() |
Convert phyloseq, BIOM and DADA2 objects to TreeSE |
convertToPhyloseq(),
convertToBIOM() |
Convert TreeSE to phyloseq or BIOM |
convertToMAE(),
convertToTreeSE() |
Convert a TreeSE with alternative experiments to a
MultiAssayExperiment and back |
exportQIIME2(),
exportMothur(), exportRaw() |
Write data to files for QIIME 2, Mothur or as plain tables |
meltSE() |
Convert assay and metadata into a long (tidy)
data.frame |
mergeSEs() |
Merge several objects into one |
| Functions | Purpose |
|---|---|
subsetBy() |
Subset features or samples by conditions on the data, optionally collapsing the rest into “Other” |
agglomerateByRank(),
agglomerateByRanks() |
Sum features to a taxonomic rank, or to all ranks as alternative experiments |
agglomerateByVariable() |
Sum features or samples by a grouping variable |
agglomerateBySet(),
applyBySet() |
Summarise or apply a function by feature or sample sets |
splitOn(), unsplitOn() |
Split an object by a grouping variable and combine it back |
splitByRanks(),
unsplitByRanks() |
Split by taxonomic ranks and combine back |
getReducedDimAttribute() |
Get attributes, e.g. explained variance, of an ordination |
| Functions | Purpose |
|---|---|
taxonomyRanks(),
getTaxonomyRanks(), setTaxonomyRanks() |
Get or set the taxonomic ranks that mia recognises |
taxonomyRankEmpty(),
checkTaxonomy() |
Check the taxonomy table |
getTaxonomyLabels() |
Create feature labels from the taxonomy |
mapTaxonomy() |
Look up taxa and their higher ranks |
getHierarchyTree(),
addHierarchyTree() |
Create a tree from the taxonomy |
IdTaxaToDataFrame() |
Convert DECIPHER::IdTaxa() results to a
taxonomy table |
parseTaxonomy() |
Split taxonomy strings such as
"k__Bacteria; p__Firmicutes" into ranks |
| Functions | Purpose |
|---|---|
transformAssay() |
Relative abundance, CLR, rCLR, log, Hellinger, PA, z-score and other transformations |
rarefyAssay() |
Subsample counts to an equal library size |
| Functions | Purpose |
|---|---|
summary() |
Summary statistics of samples and features |
getQC(), addQC() |
Quality control metrics per sample and feature |
isContaminant(),
isNotContaminant(), addContaminantQC(),
addNotContaminantQC() |
Identify contaminants with the decontam package |
getPrevalence(),
addPrevalence() |
Prevalence of each feature |
getPrevalent(), getRare(),
getPrevalentAbundance(),
addPrevalentAbundance() |
Prevalent and rare features, and the total abundance of prevalent features per sample |
getTop(), getUnique() |
Most abundant features, and the unique taxa of a rank |
getDominant(), addDominant(),
summarizeDominance() |
The dominant feature of each sample |
getAbundant(),
getLowAbundant(),
getConditionallyLowAbundant(),
getPermanentlyLowAbundant(),
getAbundanceClass(), addAbundanceClass() |
Classify features as abundant or rare |
| Functions | Purpose |
|---|---|
getAlpha(), addAlpha() |
Diversity, richness, evenness, dominance and rarity indices |
getDivergence(),
addDivergence() |
Divergence of samples from a reference |
getDysbiosis(),
addDysbiosis() |
Dysbiosis scores |
| Functions | Purpose |
|---|---|
getDissimilarity(),
addDissimilarity() |
Dissimilarities, e.g. Bray-Curtis, Aitchison, UniFrac, JSD and overlap |
getMDS(), addMDS() |
Multi-dimensional scaling (PCoA) |
getNMDS(), addNMDS(),
calculateNMDS(), runNMDS() |
Non-metric MDS |
getPCA(), addPCA() |
Principal component analysis |
getRPCA(), addRPCA() |
Robust PCA |
getDPCoA(), addDPCoA(),
calculateDPCoA(), runDPCoA() |
Double principal coordinate analysis |
getCCA(), addCCA(),
getRDA(), addRDA(),
calculateCCA(), runCCA(),
calculateRDA(), runRDA() |
Constrained ordination (CCA, RDA and db-RDA) |
getNMF(), addNMF(),
getLDA(), addLDA() |
Non-negative matrix factorisation and latent Dirichlet allocation |
| Functions | Purpose |
|---|---|
getCluster(),
addCluster() |
Cluster samples or features with any
bluster method, including Dirichlet-multinomial
mixtures |
calculateDMNgroup(),
performDMNgroupCV() |
Dirichlet-multinomial mixture classification |
| Functions | Purpose |
|---|---|
getPERMANOVA(),
addPERMANOVA() |
PERMANOVA with a test for homogeneity of dispersion |
getCrossAssociation() |
Correlations or other associations between two assays or experiments |
getMediation(),
addMediation() |
Mediation analysis with features, assays or ordination components as mediators |
| Functions | Purpose |
|---|---|
getJointRPCA(),
addJointRPCA() |
Joint robust PCA of several experiments |
getCrossAssociation(),
convertToMAE(), mergeSEs() |
Associations and data integration across experiments |
GlobalPatterns, enterotype,
esophagus, peerj13075,
Tengeler2020, HintikkaXOData,
Tito2024QMP, ibdmdb and dmn_se
can be loaded with data(),
e.g. data(GlobalPatterns, package = "mia"). See
?mia::"mia-datasets". Larger datasets are available in the
microbiomeDataSets package.
TreeSummarizedExperiment objectA few example datasets are available via mia. For this
vignette the GlobalPatterns dataset is loaded first.
## class: TreeSummarizedExperiment
## dim: 19216 26
## metadata(0):
## assays(1): counts
## rownames(19216): 549322 522457 ... 200359 271582
## rowData names(7): Kingdom Phylum ... Genus Species
## colnames(26): CL3 CC1 ... Even2 Even3
## colData names(7): X.SampleID Primer ... SampleType Description
## reducedDimNames(0):
## mainExpName: NULL
## altExpNames(0):
## rowLinks: a LinkDataFrame (19216 rows)
## rowTree: 1 phylo tree(s) (19216 leaves)
## colLinks: NULL
## colTree: NULL
One of the main topics for analysing microbiome data is the application of taxonomic data to describe features measured. The interest lies in the connection between individual bacterial species and their relation to each other.
mia does not rely on a specific object type to hold
taxonomic data, but uses specific columns in the rowData of
a TreeSummarizedExperiment object.
taxonomyRanks can be used to construct a
character vector of available taxonomic levels. This can be
used, for example, for subsetting.
## [1] "Kingdom" "Phylum" "Class" "Order" "Family" "Genus" "Species"
## [1] "Kingdom" "Phylum" "Class" "Order" "Family" "Genus" "Species"
## DataFrame with 19216 rows and 7 columns
## Kingdom Phylum Class Order Family
## <character> <character> <character> <character> <character>
## 549322 Archaea Crenarchaeota Thermoprotei NA NA
## 522457 Archaea Crenarchaeota Thermoprotei NA NA
## 951 Archaea Crenarchaeota Thermoprotei Sulfolobales Sulfolobaceae
## 244423 Archaea Crenarchaeota Sd-NA NA NA
## 586076 Archaea Crenarchaeota Sd-NA NA NA
## ... ... ... ... ... ...
## 278222 Bacteria SR1 NA NA NA
## 463590 Bacteria SR1 NA NA NA
## 535321 Bacteria SR1 NA NA NA
## 200359 Bacteria SR1 NA NA NA
## 271582 Bacteria SR1 NA NA NA
## Genus Species
## <character> <character>
## 549322 NA NA
## 522457 NA NA
## 951 Sulfolobus Sulfolobusacidocalda..
## 244423 NA NA
## 586076 NA NA
## ... ... ...
## 278222 NA NA
## 463590 NA NA
## 535321 NA NA
## 200359 NA NA
## 271582 NA NA
The columns are recognized case insensitive. Additional functions are available to check for validity of taxonomic information or generate labels based on the taxonomic information.
##
## FALSE TRUE
## 1413 17803
## [1] "Class:Thermoprotei" "Class:Thermoprotei_1"
## [3] "Species:Sulfolobusacidocaldarius" "Class:Sd-NA"
## [5] "Class:Sd-NA_1" "Class:Sd-NA_2"
For more details see the man page ?taxonomyRanks.
Agglomeration of data based on these taxonomic descriptors can be
performed using functions implemented in mia. In addition
to the aggValue functions provide by
TreeSummarizedExperiment agglomerateByRank is
available. agglomerateByRank does not require tree data to
be present.
agglomerateByRank constructs a factor to
guide merging from the available taxonomic information. For more
information on merging have a look at the man page via
?agglomerateByRank.
# agglomerate at the Family taxonomic rank
x1 <- agglomerateByRank(tse, rank = "Family")
## How many taxa before/after agglomeration?
nrow(tse)## [1] 19216
## [1] 341
By default, the tree is removed, as it does not match the agglomerated data.
## NULL
The tree can also be agglomerated alongside the data with
update.tree = TRUE. Each group is collapsed into the most
recent common ancestor of its features. This requires that groups are
monophyletic, i.e., each group forms its own subtree. Otherwise, the
tree is removed with a warning. Here, the tree is agglomerated at the
Kingdom rank.
##
## Phylogenetic tree with 2 tips and 1 internal node.
##
## Tip labels:
## 0.858.4, 1.000.21479
## Node label:
##
##
## Rooted; includes branch length(s).
For agglomerateByRank to work, taxonomic data must be
present. Even though only one rank is available for the
enterotype dataset, agglomeration can be performed
effectively de-duplicating entries for the genus level.
## [1] "Genus"
## class: TreeSummarizedExperiment
## dim: 551 280
## metadata(0):
## assays(1): counts
## rownames(551): Prosthecochloris Chloroflexus ... Syntrophococcus
## Mogibacterium
## rowData names(1): Genus
## colnames(280): AM.AD.1 AM.AD.2 ... TS98_V2 TS99.2_V2
## colData names(9): Enterotype Sample_ID ... Age ClinicalStatus
## reducedDimNames(0):
## mainExpName: NULL
## altExpNames(0):
## rowLinks: NULL
## rowTree: NULL
## colLinks: NULL
## colTree: NULL
To keep data tidy, the agglomerated data can be stored as an alternative experiment in the object of origin. With this synchronized sample subsetting becomes very easy.
Keep in mind, that if you set empty.rm = TRUE, rows with
NA or similar value (defined via the
empty.fields argument) will be removed. Depending on these
settings different number of rows will be returned.
x1 <- agglomerateByRank(tse, rank = "Species", empty.rm = TRUE)
altExp(tse,"species") <- agglomerateByRank(
tse, rank = "Species", empty.rm = FALSE)
dim(x1)## [1] 944 26
## [1] 2307 26
For convenience the function agglomerateByRanks is
available, which agglomerates data on all ranks selected.
By default all available ranks will be used. The output is compatible to
be stored as alternative experiments.
## class: TreeSummarizedExperiment
## dim: 19216 26
## metadata(0):
## assays(1): counts
## rownames(19216): 549322 522457 ... 200359 271582
## rowData names(7): Kingdom Phylum ... Genus Species
## colnames(26): CL3 CC1 ... Even2 Even3
## colData names(7): X.SampleID Primer ... SampleType Description
## reducedDimNames(0):
## mainExpName: NULL
## altExpNames(9): family species ... Genus Species
## rowLinks: a LinkDataFrame (19216 rows)
## rowTree: 1 phylo tree(s) (19216 leaves)
## colLinks: NULL
## colTree: NULL
## [1] "family" "species" "Kingdom" "Phylum" "Class" "Order" "Family"
## [8] "Genus" "Species"
Constructing a taxonomic tree from taxonomic data stored in
rowData is quite straightforward and uses mostly functions
implemented in TreeSummarizedExperiment.
taxa <- rowData(altExp(tse,"Species"))[,taxonomyRanks(tse)]
taxa_res <- resolveLoop(as.data.frame(taxa))
taxa_tree <- toTree(data = taxa_res)
taxa_tree$tip.label <- getTaxonomyLabels(altExp(tse,"Species"))
rowNodeLab <- getTaxonomyLabels(altExp(tse,"Species"), make.unique = FALSE)
altExp(tse,"Species") <- changeTree(
altExp(tse,"Species"),
rowTree = taxa_tree,
rowNodeLab = rowNodeLab)Transformation of count data stored in assays is also a
main task when work with microbiome data. transformAssay
can be used for this and offers a few choices of available
transformations. A modified object is returned and the transformed
counts are stored in a new assay.
## [1] "counts"
## [1] "counts" "log10"
For more details have a look at the man page
?transformAssay.
Sub-sampling to equal number of counts per sample. Also known as rarefying.
data(GlobalPatterns, package = "mia")
tse.subsampled <- rarefyAssay(
GlobalPatterns,
sample = 60000,
name = "subsampled",
replace = TRUE,
seed = 1938)
tse.subsampled## class: TreeSummarizedExperiment
## dim: 12371 25
## metadata(0):
## assays(2): counts subsampled
## rownames(12371): 549322 244423 ... 535321 200359
## rowData names(7): Kingdom Phylum ... Genus Species
## colnames(25): CL3 CC1 ... Even2 Even3
## colData names(7): X.SampleID Primer ... SampleType Description
## reducedDimNames(0):
## mainExpName: NULL
## altExpNames(0):
## rowLinks: a LinkDataFrame (12371 rows)
## rowTree: 1 phylo tree(s) (19216 leaves)
## colLinks: NULL
## colTree: NULL
Alternatively, one can save both original TreeSE and subsampled TreeSE within a MultiAssayExperiment object.
library(MultiAssayExperiment)
mae <- MultiAssayExperiment(
c("originalTreeSE" = GlobalPatterns,
"subsampledTreeSE" = tse.subsampled))
mae## A MultiAssayExperiment object of 2 listed
## experiments with user-defined names and respective classes.
## Containing an ExperimentList class object of length 2:
## [1] originalTreeSE: TreeSummarizedExperiment with 19216 rows and 26 columns
## [2] subsampledTreeSE: TreeSummarizedExperiment with 12371 rows and 25 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
## class: TreeSummarizedExperiment
## dim: 12371 25
## metadata(0):
## assays(2): counts subsampled
## rownames(12371): 549322 244423 ... 535321 200359
## rowData names(7): Kingdom Phylum ... Genus Species
## colnames(25): CL3 CC1 ... Even2 Even3
## colData names(7): X.SampleID Primer ... SampleType Description
## reducedDimNames(0):
## mainExpName: NULL
## altExpNames(0):
## rowLinks: a LinkDataFrame (12371 rows)
## rowTree: 1 phylo tree(s) (19216 leaves)
## colLinks: NULL
## colTree: NULL
In the field of microbiome ecology several indices to describe samples and community of samples are available. In this vignette we just want to give a very brief introduction.
Functions for calculating alpha and beta diversity indices are
available. Using addAlpha multiple diversity indices are
calculated by default and results are stored automatically in
colData. Selected indices can be calculated individually by
setting index = "shannon" for example.
## [1] "shannon"
Beta diversity indices are used to describe inter-sample connections.
Technically they are calculated as dist object and reduced
dimensions can be extracted using cmdscale. This is wrapped
up in the runMDS function of the scater
package, but can be easily used to calculated beta diversity indices
using the established functions from the vegan package or
any other package using comparable inputs.
library(scater)
altExp(tse,"Genus") <- runMDS(
altExp(tse,"Genus"),
FUN = getDissimilarity,
method = "bray",
name = "BrayCurtis",
ncomponents = 5,
assay.type = "counts",
keep_dist = TRUE)getDissimilarity() also calculates, e.g., JSD
(method = "jsd") and UniFrac
(method = "unifrac", which uses the rowTree).
addMDS() combines both steps, and addNMDS(),
addPCA(), addRDA() and addDPCoA()
provide other ordination methods. For more details see
?getDissimilarity and ?addMDS.
tse_phylum <- agglomerateByRank(GlobalPatterns, rank = "Phylum")
tse_phylum <- transformAssay(tse_phylum, method = "relabundance")
tse_phylum <- addMDS(
tse_phylum, assay.type = "relabundance", method = "bray", name = "MDS_bray")
head(reducedDim(tse_phylum, "MDS_bray")[, 1:2])## [,1] [,2]
## CL3 0.2332392 0.19365489
## CC1 0.2189401 0.16923903
## SV1 0.1845316 0.13668094
## M31Fcsw -0.5242987 -0.03888072
## M11Fcsw -0.2541713 -0.14448349
## M31Plmr -0.2615676 0.03896672
getPERMANOVA() tests whether a variable explains
differences in community composition, and checks the homogeneity of
dispersion between the groups.
set.seed(1)
res <- getPERMANOVA(
tse_phylum, assay.type = "relabundance", method = "bray",
formula = x ~ SampleType, permutations = 99)
res$permanova## Permutation test for adonis under reduced model
## Marginal effects of terms
## Permutation: free
## Number of permutations: 99
##
## adonis2(formula = formula, data = data, permutations = 99, by = by, na.action = na.action)
## Df SumOfSqs R2 F Pr(>F)
## SampleType 8 3.7257 0.79927 8.4611 0.01 **
## Residual 17 0.9357 0.20073
## Total 25 4.6614 1.00000
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
addAlpha() also calculates indices of richness,
evenness, dominance and rarity. Each index is stored in its own
colData column.
tse_phylum <- addAlpha(
tse_phylum, assay.type = "counts",
index = c("observed_richness", "pielou", "gini_dominance"))
head(colData(tse_phylum)[, c("observed_richness", "pielou", "gini_dominance")])## DataFrame with 6 rows and 3 columns
## observed_richness pielou gini_dominance
## <numeric> <numeric> <numeric>
## CL3 46 0.460961 0.931763
## CC1 45 0.500392 0.923509
## SV1 39 0.549947 0.915079
## M31Fcsw 27 0.249869 0.968889
## M11Fcsw 28 0.294179 0.968366
## M31Plmr 31 0.427536 0.949460
addCluster() clusters samples or features with methods
from the bluster package and stores the clusters in
colData or rowData.
library(bluster)
tse_phylum <- addCluster(
tse_phylum, assay.type = "relabundance", by = "samples",
BLUSPARAM = HclustParam(
metric = "bray", dist.fun = vegan::vegdist, cut.dynamic = FALSE,
cut.params = list(k = 3)))
table(tse_phylum$cluster, tse_phylum$SampleType)##
## Feces Freshwater Freshwater (creek) Mock Ocean Sediment (estuary) Skin Soil
## 1 0 0 0 0 3 3 1 3
## 2 4 0 0 3 0 0 2 0
## 3 0 2 3 0 0 0 0 0
##
## Tongue
## 1 1
## 2 1
## 3 0
To make migration and adoption as easy as possible several utility functions are available.
Functions to load data from biom files,
QIIME2 output, DADA2 objects (Callahan et al. 2016) or phyloseq
objects are available.
## phyloseq-class experiment-level object
## otu_table() OTU Table: [ 58 taxa and 3 samples ]
## phy_tree() Phylogenetic Tree: [ 58 tips and 57 internal nodes ]
## class: TreeSummarizedExperiment
## dim: 58 3
## metadata(0):
## assays(1): counts
## rownames(58): 59_8_22 59_5_13 ... 65_9_9 59_2_6
## rowData names(0):
## colnames(3): B C D
## colData names(0):
## reducedDimNames(0):
## mainExpName: NULL
## altExpNames(0):
## rowLinks: a LinkDataFrame (58 rows)
## rowTree: 1 phylo tree(s) (58 leaves)
## colLinks: NULL
## colTree: NULL
For more details have a look at the man page, for examples
?convert.
Row-wise or column-wise assay data subsetting.
## CL3 CC1 SV1 M31Fcsw M11Fcsw M31Plmr M11Plmr F21Plmr M31Tong M11Tong
## 522457 0 0 0 0 0 0 0 0 0 0
## LMEpi24M SLEpi20M AQC1cm AQC4cm AQC7cm NP2 NP3 NP5 TRRsed1 TRRsed2
## 522457 0 0 0 2 6 0 0 0 0 0
## TRRsed3 TS28 TS29 Even1 Even2 Even3
## 522457 0 0 0 0 0 0
## CC1
## 549322 0
## 522457 0
## 951 0
## 244423 0
## 586076 0
## 246140 0
subsetBy() subsets features or samples by conditions on
the data. With collapse = TRUE, the features that are left
out are summed into one feature called “Other”.
tse_sub <- subsetBy(
tse_phylum, rows = rowMeans(relabundance) > 0.01, collapse = TRUE)
rownames(tse_sub)## [1] "Acidobacteria" "Actinobacteria" "Bacteroidetes" "Cyanobacteria"
## [5] "Firmicutes" "Fusobacteria" "Planctomycetes" "Proteobacteria"
## [9] "Verrucomicrobia" "Other"
## [1] 66 20
summary() gives summary statistics of the samples and
features.
## $samples
## # A tibble: 1 × 6
## total_counts min_counts max_counts median_counts mean_counts stdev_counts
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 28215995 58631 2357124 1106823 1085231. 650159.
##
## $features
## # A tibble: 1 × 3
## total singletons per_sample_avg
## <int> <int> <dbl>
## 1 66 0 38
getTop returns a vector of the most top
abundant feature IDs.
data(esophagus, package = "mia")
top_taxa <- getTop(
esophagus,
method = "mean",
top = 5,
assay.type = "counts")
top_taxa## [1] "59_2_6" "59_7_6" "59_8_22" "59_5_19" "65_6_2"
getPrevalent() returns the features that exceed a
detection limit in a given fraction of the samples, and
addPrevalence() stores the prevalence of each feature in
rowData.
## [1] "Actinobacteria" "Bacteroidetes" "Cyanobacteria" "Firmicutes"
## [5] "Proteobacteria"
tse_phylum <- addPrevalence(
tse_phylum, assay.type = "relabundance", detection = 0.01)
head(sort(rowData(tse_phylum)$prevalence, decreasing = TRUE))## Bacteroidetes Proteobacteria Actinobacteria Cyanobacteria Firmicutes
## 1.0000000 0.9230769 0.8461538 0.6153846 0.5769231
## Verrucomicrobia
## 0.4615385
getDominant() gives the most abundant feature of each
sample.
##
## Actinobacteria Bacteroidetes Cyanobacteria Firmicutes Proteobacteria
## 1 3 4 8 10
To generate tidy data as used and required in most of the tidyverse,
meltSE can be used. A data.frame in the long
format will be returned.
## # A tibble: 499,616 × 18
## FeatureID SampleID counts Kingdom Phylum Class Order Family Genus Species
## <fct> <fct> <dbl> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
## 1 549322 CL3 0 Archaea Crenarcha… Ther… <NA> <NA> <NA> <NA>
## 2 549322 CC1 0 Archaea Crenarcha… Ther… <NA> <NA> <NA> <NA>
## 3 549322 SV1 0 Archaea Crenarcha… Ther… <NA> <NA> <NA> <NA>
## 4 549322 M31Fcsw 0 Archaea Crenarcha… Ther… <NA> <NA> <NA> <NA>
## 5 549322 M11Fcsw 0 Archaea Crenarcha… Ther… <NA> <NA> <NA> <NA>
## 6 549322 M31Plmr 0 Archaea Crenarcha… Ther… <NA> <NA> <NA> <NA>
## 7 549322 M11Plmr 0 Archaea Crenarcha… Ther… <NA> <NA> <NA> <NA>
## 8 549322 F21Plmr 0 Archaea Crenarcha… Ther… <NA> <NA> <NA> <NA>
## 9 549322 M31Tong 0 Archaea Crenarcha… Ther… <NA> <NA> <NA> <NA>
## 10 549322 M11Tong 0 Archaea Crenarcha… Ther… <NA> <NA> <NA> <NA>
## # ℹ 499,606 more rows
## # ℹ 8 more variables: X.SampleID <fct>, Primer <fct>, Final_Barcode <fct>,
## # Barcode_truncated_plus_T <fct>, Barcode_full_length <fct>,
## # SampleType <fct>, Description <fct>, shannon <dbl>
## R version 4.6.2 (2026-10-29)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 26.04.1 LTS
##
## Matrix products: default
## BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.32.so; LAPACK version 3.12.0
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
##
## time zone: Etc/UTC
## tzcode source: system (glibc)
##
## attached base packages:
## [1] stats4 stats graphics grDevices utils datasets methods
## [8] base
##
## other attached packages:
## [1] phyloseq_1.57.0 bluster_1.23.1
## [3] scater_1.41.3 ggplot2_4.0.4
## [5] scuttle_1.23.2 mia_1.21.37
## [7] TreeSummarizedExperiment_2.21.0 Biostrings_2.81.9
## [9] XVector_0.53.0 SingleCellExperiment_1.35.2
## [11] MultiAssayExperiment_1.39.1 SummarizedExperiment_1.43.0
## [13] Biobase_2.73.2 GenomicRanges_1.65.4
## [15] Seqinfo_1.3.2 IRanges_2.47.5
## [17] S4Vectors_0.51.10 BiocGenerics_0.59.13
## [19] generics_0.1.4 MatrixGenerics_1.25.0
## [21] matrixStats_1.5.0 BiocStyle_2.41.0
##
## loaded via a namespace (and not attached):
## [1] Rdpack_2.6.6 DBI_1.3.0
## [3] gridExtra_2.3.1 permute_0.10-1
## [5] rlang_1.3.0 magrittr_2.0.5
## [7] ade4_1.7-24 otel_0.3.0
## [9] compiler_4.6.2 mgcv_1.9-5
## [11] DelayedMatrixStats_1.35.0 vctrs_0.7.3
## [13] reshape2_1.4.5 stringr_1.6.0
## [15] pkgconfig_2.0.3 crayon_1.5.3
## [17] fastmap_1.2.0 utf8_1.2.6
## [19] rmarkdown_2.32 ggbeeswarm_0.7.3
## [21] DirichletMultinomial_1.55.1 purrr_1.2.2
## [23] xfun_0.62 cachem_1.1.0
## [25] beachmat_2.29.3 jsonlite_2.0.0
## [27] biomformat_1.41.0 DelayedArray_0.39.8
## [29] BiocParallel_1.47.0 irlba_2.4.1
## [31] parallel_4.6.2 cluster_2.1.8.3
## [33] R6_2.6.1 bslib_0.12.0
## [35] stringi_1.8.9 RColorBrewer_1.1-3
## [37] jquerylib_0.1.4 iterators_1.0.14
## [39] Rcpp_1.1.2 knitr_1.52
## [41] DECIPHER_3.9.6 splines_4.6.2
## [43] Matrix_1.7-6 igraph_2.3.4
## [45] tidyselect_1.2.1 abind_1.4-8
## [47] yaml_2.3.12 viridis_0.6.5
## [49] vegan_2.7-8 codetools_0.2-20
## [51] lattice_0.23-1 tibble_3.3.1
## [53] plyr_1.8.9 withr_3.0.3
## [55] treeio_1.37.1 S7_1.0.0
## [57] evaluate_1.0.5 survival_3.8-12
## [59] pillar_1.11.1 BiocManager_1.30.27
## [61] foreach_1.5.2 sparseMatrixStats_1.25.0
## [63] scales_1.4.0 tidytree_0.4.9
## [65] glue_1.8.1 lazyeval_0.2.3
## [67] maketools_1.3.2 tools_4.6.2
## [69] data.table_1.18.6.1 BiocNeighbors_2.7.3
## [71] sys_3.4.3 ScaledMatrix_1.21.0
## [73] buildtools_1.0.0 fs_2.1.0
## [75] grid_4.6.2 tidyr_1.3.2
## [77] ape_5.8-1 rbibutils_2.4.1
## [79] nlme_3.1-172 beeswarm_0.4.0
## [81] BiocSingular_1.29.3 vipor_0.4.7
## [83] cli_3.6.6 rsvd_2.0.0
## [85] rappdirs_0.3.4 S4Arrays_1.13.3
## [87] viridisLite_0.4.3 dplyr_1.2.1
## [89] gtable_0.3.6 yulab.utils_0.2.6
## [91] sass_0.5.0 digest_0.6.39
## [93] SparseArray_1.13.5 ggrepel_0.9.8
## [95] decontam_1.33.0 farver_2.1.2
## [97] multtest_2.69.0 htmltools_0.5.9
## [99] lifecycle_1.0.5 MASS_7.3-66