1. Anatomy of a MPSE

MicrobiotaProcess introduces MPSE S4 class. This class inherits the SummarizedExperiment(Morgan et al. 2021) class. Here, the assays slot is used to store the rectangular abundance matrices of features for a microbiome experimental results. The colData slot is used to store the meta-data of sample and some results about samples in the downstream analysis. The rowData is used to store the meta-data of features and some results about the features in the downstream analysis. Compared to the SummarizedExperiment object, MPSE introduces the following additional slots:

The structure of the MPSE class.

The structure of the MPSE class.

2. Overview of the design of MicrobiotaProcess package

With this data structure, MicrobiotaProcess will be more interoperable with the existing computing ecosystem. For example, the slots inherited SummarizedExperiment can be extracted via the methods provided by SummarizedExperiment. The taxatree and otutree can also be extracted via mp_extract_tree, and they are compatible with ggtree(Yu et al. 2017), ggtreeExtra(Xu et al. 2021), treeio(Wang et al. 2020) and tidytree(Yu 2021) ecosystem since they are all treedata class, which is a data structure used directly by these packages.

Moreover, the results of upstream analysis of microbiome based some tools, such as qiime2(Bolyen et al. 2019), dada2(Callahan et al. 2016) and MetaPhlAn(Beghini et al. 2021) or other classes (SummarizedExperiment(Morgan et al. 2021), phyloseq(McMurdie and Holmes 2013) and TreeSummarizedExperiment(Huang et al. 2021)) used to store the result of microbiome can be loaded or transformed to the MPSE class.

In addition, MicrobiotaProcess also introduces a tidy microbiome data structure paradigm and analysis grammar. It provides a wide variety of microbiome analysis procedures under a unified and common framework (tidy-like framework). We believe MicrobiotaProcess can improve the efficiency of related researches, and it also bridges microbiome data analysis with the tidyverse(Wickham et al. 2019).

The Overview of the design of MicrobiotaProcess package

The Overview of the design of MicrobiotaProcess package

3. MicrobiotaProcess profiling

3.1 bridges other tools

MicrobiotaProcess provides several functions to parsing the output of upstream analysis tools of microbiome, such as qiime2(Bolyen et al. 2019), dada2(Callahan et al. 2016) and MetaPhlAn(Beghini et al. 2021), and return MPSE object. Some bioconductor class, such as phyloseq(McMurdie and Holmes 2013), TreeSummarizedExperiment(Huang et al. 2021) and SummarizedExperiment(Morgan et al. 2021) can also be converted to MPSE via as.MPSE().

## # A MPSE-tibble (MPSE object) abstraction: 4,408 × 11
## # OTU=232 | Samples=19 | Assays=Abundance | Taxanomy=Kingdom, Phylum, Class, Order, Family, Genus, Species
##    OTU    Sample Abundance time  Kingdom Phylum Class Order Family Genus Species
##    <chr>  <chr>      <int> <chr> <chr>   <chr>  <chr> <chr> <chr>  <chr> <chr>  
##  1 OTU_1  F3D0         579 Early k__Bac… p__Ba… c__B… o__B… f__Mu… g__u… s__un_…
##  2 OTU_2  F3D0         345 Early k__Bac… p__Ba… c__B… o__B… f__Mu… g__u… s__un_…
##  3 OTU_3  F3D0         449 Early k__Bac… p__Ba… c__B… o__B… f__Mu… g__u… s__un_…
##  4 OTU_4  F3D0         430 Early k__Bac… p__Ba… c__B… o__B… f__Mu… g__u… s__un_…
##  5 OTU_5  F3D0         154 Early k__Bac… p__Ba… c__B… o__B… f__Ba… g__B… s__un_…
##  6 OTU_6  F3D0         470 Early k__Bac… p__Ba… c__B… o__B… f__Mu… g__u… s__un_…
##  7 OTU_7  F3D0         282 Early k__Bac… p__Ba… c__B… o__B… f__Mu… g__u… s__un_…
##  8 OTU_8  F3D0         184 Early k__Bac… p__Ba… c__B… o__B… f__Ri… g__A… s__un_…
##  9 OTU_9  F3D0          45 Early k__Bac… p__Ba… c__B… o__B… f__Mu… g__u… s__un_…
## 10 OTU_10 F3D0         158 Early k__Bac… p__Ba… c__B… o__B… f__Mu… g__u… s__un_…
## # … with 4,398 more rows
## # A MPSE-tibble (MPSE object) abstraction: 12,006 × 32
## # OTU=138 | Samples=87 | Assays=Abundance | Taxanomy=Kingdom, Phylum, Class, Order, Family, Genus, Speies
##    OTU    Sample Abundance Sample_Name_s BarcodeSequence LinkerPrimerSeq… Subject
##    <chr>  <chr>      <dbl> <chr>         <chr>           <chr>            <chr>  
##  1 OTU_1  ERR13…       901 LR53          AGTGTCGATTCG    TATGGTAATTGT     Patient
##  2 OTU_2  ERR13…       877 LR53          AGTGTCGATTCG    TATGGTAATTGT     Patient
##  3 OTU_3  ERR13…       239 LR53          AGTGTCGATTCG    TATGGTAATTGT     Patient
##  4 OTU_4  ERR13…       201 LR53          AGTGTCGATTCG    TATGGTAATTGT     Patient
##  5 OTU_5  ERR13…       168 LR53          AGTGTCGATTCG    TATGGTAATTGT     Patient
##  6 OTU_6  ERR13…       115 LR53          AGTGTCGATTCG    TATGGTAATTGT     Patient
##  7 OTU_7  ERR13…       107 LR53          AGTGTCGATTCG    TATGGTAATTGT     Patient
##  8 OTU_8  ERR13…        84 LR53          AGTGTCGATTCG    TATGGTAATTGT     Patient
##  9 OTU_9  ERR13…        67 LR53          AGTGTCGATTCG    TATGGTAATTGT     Patient
## 10 OTU_10 ERR13…        67 LR53          AGTGTCGATTCG    TATGGTAATTGT     Patient
## # … with 11,996 more rows, and 25 more variables: Sex <chr>, Age <int>, Pittsburgh <chr>, Bell <dbl>,
## #   BMI <dbl>, sCD14ugml <dbl>, LBPugml <dbl>, LPSpgml <dbl>, IFABPpgml <dbl>,
## #   Physical_functioning <dbl>, Role_physical <dbl>, Role_emotional <dbl>,
## #   Energy_fatigue <dbl>, Emotional_well_being <dbl>, Social_functioning <dbl>,
## #   Pain <dbl>, General_health <dbl>, Description <lgl>, Kingdom <chr>,
## #   Phylum <chr>, Class <chr>, Order <chr>, Family <chr>, Genus <chr>,
## #   Speies <chr>
## # A MPSE-tibble (MPSE object) abstraction: 5,260 × 11
## # OTU=263 | Samples=20 | Assays=Abundance | Taxanomy=Kingdom, Phylum, Class, Order, Family, Genus
##    OTU    Sample  Abundance group taxid  Kingdom Phylum Class Order Family Genus
##    <chr>  <chr>       <dbl> <chr> <chr>  <chr>   <chr>  <chr> <chr> <chr>  <chr>
##  1 s__Me… GupDM_…     0.596 testA 2157|… k__Arc… p__Eu… c__M… o__M… f__Me… g__M…
##  2 s__Ac… GupDM_…     0     testA 2|201… k__Bac… p__Ac… c__A… o__A… f__Ac… g__A…
##  3 s__Ac… GupDM_…     0     testA 2|201… k__Bac… p__Ac… c__A… o__A… f__Ac… g__A…
##  4 s__Ac… GupDM_…     0     testA 2|201… k__Bac… p__Ac… c__A… o__A… f__Ac… g__A…
##  5 s__Bi… GupDM_…     0.948 testA 2|201… k__Bac… p__Ac… c__A… o__B… f__Bi… g__B…
##  6 s__Bi… GupDM_…     0     testA 2|201… k__Bac… p__Ac… c__A… o__B… f__Bi… g__B…
##  7 s__Bi… GupDM_…     0     testA 2|201… k__Bac… p__Ac… c__A… o__B… f__Bi… g__B…
##  8 s__Bi… GupDM_…     0     testA 2|201… k__Bac… p__Ac… c__A… o__B… f__Bi… g__B…
##  9 s__Bi… GupDM_…     0     testA 2|201… k__Bac… p__Ac… c__A… o__B… f__Bi… g__B…
## 10 s__Bi… GupDM_…     0     testA 2|201… k__Bac… p__Ac… c__A… o__B… f__Bi… g__B…
## # … with 5,250 more rows
## phyloseq-class experiment-level object
## otu_table()   OTU Table:         [ 99 taxa and 12 samples ]
## sample_data() Sample Data:       [ 12 samples by 2 sample variables ]
## tax_table()   Taxonomy Table:    [ 99 taxa by 7 taxonomic ranks ]
## # A MPSE-tibble (MPSE object) abstraction: 1,188 × 12
## # OTU=99 | Samples=12 | Assays=Abundance | Taxanomy=Kingdom, Phylum, Class, Order, Family, Genus, Species
##    OTU    Sample Abundance sample group Kingdom  Phylum Class Order Family Genus
##    <chr>  <chr>      <int> <fct>  <fct> <chr>    <chr>  <chr> <chr> <chr>  <chr>
##  1 OTU_1  B11         3995 B11    B     k__Bact… p__Fi… c__B… o__L… f__La… g__L…
##  2 OTU_10 B11          605 B11    B     k__Bact… p__Fi… c__B… o__L… f__La… g__L…
##  3 OTU_1… B11           57 B11    B     k__Bact… p__Fi… c__C… o__C… f__Ru… g__R…
##  4 OTU_1… B11            0 B11    B     k__Bact… p__Fi… c__C… o__C… f__Ru… g__I…
##  5 OTU_1… B11            5 B11    B     k__Bact… p__Fi… c__E… o__E… f__Er… g__E…
##  6 OTU_1… B11            1 B11    B     k__Bact… p__Fi… c__C… o__C… f__Ru… g__R…
##  7 OTU_1… B11            0 B11    B     k__Bact… p__Ba… c__B… o__B… f__Pr… g__P…
##  8 OTU_1… B11            0 B11    B     k__Bact… p__Fi… c__C… o__C… f__Ru… g__C…
##  9 OTU_1… B11            0 B11    B     k__Bact… p__Ba… c__B… o__S… f__Sp… g__S…
## 10 OTU_1… B11           34 B11    B     k__Bact… p__Fi… c__C… o__C… f__Ru… g__R…
## # … with 1,178 more rows, and 1 more variable: Species <chr>

3.2 alpha diversity analysis

Rarefaction, based on sampling technique, was used to compensate for the effect of sample size on the number of units observed in a sample(Siegel 2004). MicrobiotaProcess provided mp_cal_rarecurve and mp_plot_rarecurve to calculate and plot the curves based on rrarefy of vegan(Oksanen et al. 2019).

## # A MPSE-tibble (MPSE object) abstraction: 4,408 × 11
## # OTU=232 | Samples=19 | Assays=Abundance | Taxanomy=Kingdom, Phylum, Class, Order, Family, Genus, Species
##    OTU    Sample Abundance time  Kingdom Phylum Class Order Family Genus Species
##    <chr>  <chr>      <int> <chr> <chr>   <chr>  <chr> <chr> <chr>  <chr> <chr>  
##  1 OTU_1  F3D0         579 Early k__Bac… p__Ba… c__B… o__B… f__Mu… g__u… s__un_…
##  2 OTU_2  F3D0         345 Early k__Bac… p__Ba… c__B… o__B… f__Mu… g__u… s__un_…
##  3 OTU_3  F3D0         449 Early k__Bac… p__Ba… c__B… o__B… f__Mu… g__u… s__un_…
##  4 OTU_4  F3D0         430 Early k__Bac… p__Ba… c__B… o__B… f__Mu… g__u… s__un_…
##  5 OTU_5  F3D0         154 Early k__Bac… p__Ba… c__B… o__B… f__Ba… g__B… s__un_…
##  6 OTU_6  F3D0         470 Early k__Bac… p__Ba… c__B… o__B… f__Mu… g__u… s__un_…
##  7 OTU_7  F3D0         282 Early k__Bac… p__Ba… c__B… o__B… f__Mu… g__u… s__un_…
##  8 OTU_8  F3D0         184 Early k__Bac… p__Ba… c__B… o__B… f__Ri… g__A… s__un_…
##  9 OTU_9  F3D0          45 Early k__Bac… p__Ba… c__B… o__B… f__Mu… g__u… s__un_…
## 10 OTU_10 F3D0         158 Early k__Bac… p__Ba… c__B… o__B… f__Mu… g__u… s__un_…
## # … with 4,398 more rows
## # A MPSE-tibble (MPSE object) abstraction: 4,408 × 13
## # OTU=232 | Samples=19 | Assays=Abundance, RareAbundance | Taxanomy=Kingdom, Phylum, Class, Order, Family, Genus, Species
##    OTU    Sample Abundance RareAbundance time  RareAbundanceRarecurve
##    <chr>  <chr>      <int>         <int> <chr> <list>                
##  1 OTU_1  F3D0         579           214 Early <tibble [2,520 × 4]>  
##  2 OTU_2  F3D0         345           116 Early <tibble [2,520 × 4]>  
##  3 OTU_3  F3D0         449           179 Early <tibble [2,520 × 4]>  
##  4 OTU_4  F3D0         430           167 Early <tibble [2,520 × 4]>  
##  5 OTU_5  F3D0         154            54 Early <tibble [2,520 × 4]>  
##  6 OTU_6  F3D0         470           174 Early <tibble [2,520 × 4]>  
##  7 OTU_7  F3D0         282           115 Early <tibble [2,520 × 4]>  
##  8 OTU_8  F3D0         184            74 Early <tibble [2,520 × 4]>  
##  9 OTU_9  F3D0          45            16 Early <tibble [2,520 × 4]>  
## 10 OTU_10 F3D0         158            59 Early <tibble [2,520 × 4]>  
##    Kingdom     Phylum           Class          Order           
##    <chr>       <chr>            <chr>          <chr>           
##  1 k__Bacteria p__Bacteroidetes c__Bacteroidia o__Bacteroidales
##  2 k__Bacteria p__Bacteroidetes c__Bacteroidia o__Bacteroidales
##  3 k__Bacteria p__Bacteroidetes c__Bacteroidia o__Bacteroidales
##  4 k__Bacteria p__Bacteroidetes c__Bacteroidia o__Bacteroidales
##  5 k__Bacteria p__Bacteroidetes c__Bacteroidia o__Bacteroidales
##  6 k__Bacteria p__Bacteroidetes c__Bacteroidia o__Bacteroidales
##  7 k__Bacteria p__Bacteroidetes c__Bacteroidia o__Bacteroidales
##  8 k__Bacteria p__Bacteroidetes c__Bacteroidia o__Bacteroidales
##  9 k__Bacteria p__Bacteroidetes c__Bacteroidia o__Bacteroidales
## 10 k__Bacteria p__Bacteroidetes c__Bacteroidia o__Bacteroidales
##    Family            Genus                   Species                
##    <chr>             <chr>                   <chr>                  
##  1 f__Muribaculaceae g__un_f__Muribaculaceae s__un_f__Muribaculaceae
##  2 f__Muribaculaceae g__un_f__Muribaculaceae s__un_f__Muribaculaceae
##  3 f__Muribaculaceae g__un_f__Muribaculaceae s__un_f__Muribaculaceae
##  4 f__Muribaculaceae g__un_f__Muribaculaceae s__un_f__Muribaculaceae
##  5 f__Bacteroidaceae g__Bacteroides          s__un_g__Bacteroides   
##  6 f__Muribaculaceae g__un_f__Muribaculaceae s__un_f__Muribaculaceae
##  7 f__Muribaculaceae g__un_f__Muribaculaceae s__un_f__Muribaculaceae
##  8 f__Rikenellaceae  g__Alistipes            s__un_g__Alistipes     
##  9 f__Muribaculaceae g__un_f__Muribaculaceae s__un_f__Muribaculaceae
## 10 f__Muribaculaceae g__un_f__Muribaculaceae s__un_f__Muribaculaceae
## # … with 4,398 more rows
The rarefaction of samples or groups

The rarefaction of samples or groups

3.3 calculate alpha index and visualization

Alpha diversity can be estimated the species richness and evenness of some species communities. MicrobiotaProcess provides mp_cal_alpha to calculate alpha index (Observe, Chao1, ACE, Shannon, Simpson and J (Pielou’s evenness)) and the mp_plot_alpha to visualize the result.

## # A MPSE-tibble (MPSE object) abstraction: 4,408 × 19
## # OTU=232 | Samples=19 | Assays=Abundance, RareAbundance | Taxanomy=Kingdom, Phylum, Class, Order, Family, Genus, Species
##    OTU    Sample Abundance RareAbundance time  RareAbundanceRarec… Observe Chao1
##    <chr>  <chr>      <int>         <int> <chr> <list>                <dbl> <dbl>
##  1 OTU_1  F3D0         579           214 Early <tibble [2,520 × 4…     104  104.
##  2 OTU_2  F3D0         345           116 Early <tibble [2,520 × 4…     104  104.
##  3 OTU_3  F3D0         449           179 Early <tibble [2,520 × 4…     104  104.
##  4 OTU_4  F3D0         430           167 Early <tibble [2,520 × 4…     104  104.
##  5 OTU_5  F3D0         154            54 Early <tibble [2,520 × 4…     104  104.
##  6 OTU_6  F3D0         470           174 Early <tibble [2,520 × 4…     104  104.
##  7 OTU_7  F3D0         282           115 Early <tibble [2,520 × 4…     104  104.
##  8 OTU_8  F3D0         184            74 Early <tibble [2,520 × 4…     104  104.
##  9 OTU_9  F3D0          45            16 Early <tibble [2,520 × 4…     104  104.
## 10 OTU_10 F3D0         158            59 Early <tibble [2,520 × 4…     104  104.
## # … with 4,398 more rows, and 11 more variables: ACE <dbl>, Shannon <dbl>, Simpson <dbl>, J <dbl>,
## #   Kingdom <chr>, Phylum <chr>, Class <chr>, Order <chr>, Family <chr>,
## #   Genus <chr>, Species <chr>
The alpha diversity comparison

The alpha diversity comparison

Users can extract the result with mp_extract_sample() to extract the result of mp_cal_alpha and visualized the result manually, see the example of mp_cal_alpha.

3.4 The visualization of taxonomy abundance

MicrobiotaProcess provides the mp_cal_abundance, mp_plot_abundance to calculate and plot the composition of species communities. And the mp_extract_abundance can extract the abundance of specific taxonomy level. User can also extract the abundance table to perform external analysis such as visualize manually (see the example of mp_cal_abundance).

## # A MPSE-tibble (MPSE object) abstraction: 4,408 × 19
## # OTU=232 | Samples=19 | Assays=Abundance, RareAbundance | Taxanomy=Kingdom, Phylum, Class, Order, Family, Genus, Species
##    OTU    Sample Abundance RareAbundance time  RareAbundanceRarec… Observe Chao1
##    <chr>  <chr>      <int>         <int> <chr> <list>                <dbl> <dbl>
##  1 OTU_1  F3D0         579           214 Early <tibble [2,520 × 4…     104  104.
##  2 OTU_2  F3D0         345           116 Early <tibble [2,520 × 4…     104  104.
##  3 OTU_3  F3D0         449           179 Early <tibble [2,520 × 4…     104  104.
##  4 OTU_4  F3D0         430           167 Early <tibble [2,520 × 4…     104  104.
##  5 OTU_5  F3D0         154            54 Early <tibble [2,520 × 4…     104  104.
##  6 OTU_6  F3D0         470           174 Early <tibble [2,520 × 4…     104  104.
##  7 OTU_7  F3D0         282           115 Early <tibble [2,520 × 4…     104  104.
##  8 OTU_8  F3D0         184            74 Early <tibble [2,520 × 4…     104  104.
##  9 OTU_9  F3D0          45            16 Early <tibble [2,520 × 4…     104  104.
## 10 OTU_10 F3D0         158            59 Early <tibble [2,520 × 4…     104  104.
## # … with 4,398 more rows, and 11 more variables: ACE <dbl>, Shannon <dbl>, Simpson <dbl>, J <dbl>,
## #   Kingdom <chr>, Phylum <chr>, Class <chr>, Order <chr>, Family <chr>,
## #   Genus <chr>, Species <chr>
## # A MPSE-tibble (MPSE object) abstraction: 4,408 × 20
## # OTU=232 | Samples=19 | Assays=Abundance, RareAbundance, RelRareAbundanceBySample | Taxanomy=Kingdom, Phylum, Class, Order, Family, Genus, Species
##    OTU    Sample Abundance RareAbundance RelRareAbundanceBySample time  RareAbundanceRa…
##    <chr>  <chr>      <int>         <int>                    <dbl> <chr> <list>          
##  1 OTU_1  F3D0         579           214                    8.50  Early <tibble [2,520 …
##  2 OTU_2  F3D0         345           116                    4.61  Early <tibble [2,520 …
##  3 OTU_3  F3D0         449           179                    7.11  Early <tibble [2,520 …
##  4 OTU_4  F3D0         430           167                    6.63  Early <tibble [2,520 …
##  5 OTU_5  F3D0         154            54                    2.14  Early <tibble [2,520 …
##  6 OTU_6  F3D0         470           174                    6.91  Early <tibble [2,520 …
##  7 OTU_7  F3D0         282           115                    4.57  Early <tibble [2,520 …
##  8 OTU_8  F3D0         184            74                    2.94  Early <tibble [2,520 …
##  9 OTU_9  F3D0          45            16                    0.635 Early <tibble [2,520 …
## 10 OTU_10 F3D0         158            59                    2.34  Early <tibble [2,520 …
## # … with 4,398 more rows, and 13 more variables: Observe <dbl>, Chao1 <dbl>, ACE <dbl>,
## #   Shannon <dbl>, Simpson <dbl>, J <dbl>, Kingdom <chr>, Phylum <chr>,
## #   Class <chr>, Order <chr>, Family <chr>, Genus <chr>, Species <chr>
The relative abundance and abundance of top 20 phyla of all samples

The relative abundance and abundance of top 20 phyla of all samples

The relative abundance and abundance of top 20 phyla of groups

The relative abundance and abundance of top 20 phyla of groups

3.5 Beta diversity analysis

Beta diversity is used to quantify the dissimilarities between the communities (samples). Some distance indexes, such as Bray-Curtis index, Jaccard index, UniFrac (weighted or unweighted) index, are useful for or popular with the community ecologists. Many ordination methods are used to estimated the dissimilarities in community ecology. MicrobiotaProcess implements mp_cal_dist to calculate the common distance, and provided mp_plot_dist to visualize the result. It also provides several commonly-used ordination methods, such as PCA (mp_cal_pca), PCoA (mp_cal_pcoa), NMDS (mp_cal_nmds), DCA (mp_cal_dca), RDA (mp_cal_rda), CCA (mp_cal_cca), and a function (mp_envfit) fits environmental vectors or factors onto an ordination. Moreover, it also wraps several statistical analysis for the distance matrices, such as adonis (mp_adonis), anosim (mp_anosim), mrpp (mp_mrpp) and mantel (mp_mantel). All these functions are developed based on tidy-like framework, and provided unified grammar, we believe these functions will help users to do the ordination analysis more conveniently.

3.5.1 The distance between samples or groups

## # A MPSE-tibble (MPSE object) abstraction: 4,408 × 21
## # OTU=232 | Samples=19 | Assays=Abundance, RareAbundance, RelRareAbundanceBySample, hellinger | Taxanomy=Kingdom, Phylum, Class, Order, Family, Genus, Species
##    OTU    Sample Abundance RareAbundance RelRareAbundanceBySamp… hellinger time 
##    <chr>  <chr>      <int>         <int>                   <dbl>     <dbl> <chr>
##  1 OTU_1  F3D0         579           214                   8.50     0.298  Early
##  2 OTU_2  F3D0         345           116                   4.61     0.230  Early
##  3 OTU_3  F3D0         449           179                   7.11     0.262  Early
##  4 OTU_4  F3D0         430           167                   6.63     0.257  Early
##  5 OTU_5  F3D0         154            54                   2.14     0.154  Early
##  6 OTU_6  F3D0         470           174                   6.91     0.268  Early
##  7 OTU_7  F3D0         282           115                   4.57     0.208  Early
##  8 OTU_8  F3D0         184            74                   2.94     0.168  Early
##  9 OTU_9  F3D0          45            16                   0.635    0.0830 Early
## 10 OTU_10 F3D0         158            59                   2.34     0.156  Early
## # … with 4,398 more rows, and 14 more variables: RareAbundanceRarecurve <list>, Observe <dbl>,
## #   Chao1 <dbl>, ACE <dbl>, Shannon <dbl>, Simpson <dbl>, J <dbl>,
## #   Kingdom <chr>, Phylum <chr>, Class <chr>, Order <chr>, Family <chr>,
## #   Genus <chr>, Species <chr>
## # A MPSE-tibble (MPSE object) abstraction: 4,408 × 22
## # OTU=232 | Samples=19 | Assays=Abundance, RareAbundance, RelRareAbundanceBySample, hellinger | Taxanomy=Kingdom, Phylum, Class, Order, Family, Genus, Species
##    OTU    Sample Abundance RareAbundance RelRareAbundanceBySamp… hellinger time 
##    <chr>  <chr>      <int>         <int>                   <dbl>     <dbl> <chr>
##  1 OTU_1  F3D0         579           214                   8.50     0.298  Early
##  2 OTU_2  F3D0         345           116                   4.61     0.230  Early
##  3 OTU_3  F3D0         449           179                   7.11     0.262  Early
##  4 OTU_4  F3D0         430           167                   6.63     0.257  Early
##  5 OTU_5  F3D0         154            54                   2.14     0.154  Early
##  6 OTU_6  F3D0         470           174                   6.91     0.268  Early
##  7 OTU_7  F3D0         282           115                   4.57     0.208  Early
##  8 OTU_8  F3D0         184            74                   2.94     0.168  Early
##  9 OTU_9  F3D0          45            16                   0.635    0.0830 Early
## 10 OTU_10 F3D0         158            59                   2.34     0.156  Early
## # … with 4,398 more rows, and 15 more variables: RareAbundanceRarecurve <list>, Observe <dbl>,
## #   Chao1 <dbl>, ACE <dbl>, Shannon <dbl>, Simpson <dbl>, J <dbl>, bray <list>,
## #   Kingdom <chr>, Phylum <chr>, Class <chr>, Order <chr>, Family <chr>,
## #   Genus <chr>, Species <chr>
the distance between samples

the distance between samples

The distance between samples with group information

The distance between samples with group information

The comparison of distance among the groups

The comparison of distance among the groups

3.5.2 The PCoA analysis

The distance can be used to do the ordination analysis, such as PCoA, NMDS, etc. Here, we only show the example of PCoA analysis, other ordinations can refer to the examples and the usages of the corresponding functions.

## # A MPSE-tibble (MPSE object) abstraction: 4,408 × 25
## # OTU=232 | Samples=19 | Assays=Abundance, RareAbundance, RelRareAbundanceBySample, hellinger | Taxanomy=Kingdom, Phylum, Class, Order, Family, Genus, Species
##    OTU    Sample Abundance RareAbundance RelRareAbundanceBySamp… hellinger time 
##    <chr>  <chr>      <int>         <int>                   <dbl>     <dbl> <chr>
##  1 OTU_1  F3D0         579           214                   8.50     0.298  Early
##  2 OTU_2  F3D0         345           116                   4.61     0.230  Early
##  3 OTU_3  F3D0         449           179                   7.11     0.262  Early
##  4 OTU_4  F3D0         430           167                   6.63     0.257  Early
##  5 OTU_5  F3D0         154            54                   2.14     0.154  Early
##  6 OTU_6  F3D0         470           174                   6.91     0.268  Early
##  7 OTU_7  F3D0         282           115                   4.57     0.208  Early
##  8 OTU_8  F3D0         184            74                   2.94     0.168  Early
##  9 OTU_9  F3D0          45            16                   0.635    0.0830 Early
## 10 OTU_10 F3D0         158            59                   2.34     0.156  Early
## # … with 4,398 more rows, and 18 more variables: RareAbundanceRarecurve <list>, Observe <dbl>,
## #   Chao1 <dbl>, ACE <dbl>, Shannon <dbl>, Simpson <dbl>, J <dbl>, bray <list>,
## #   PCo1 (46.94%) <dbl>, PCo2 (13.37%) <dbl>, PCo3 (8.25%) <dbl>,
## #   Kingdom <chr>, Phylum <chr>, Class <chr>, Order <chr>, Family <chr>,
## #   Genus <chr>, Species <chr>
## 
## Call:
## vegan::adonis(formula = .formula, data = sampleda, permutations = permutations,      method = distmethod) 
## 
## Permutation: free
## Number of permutations: 9999
## 
## Terms added sequentially (first to last)
## 
##           Df SumsOfSqs MeanSqs F.Model      R2 Pr(>F)    
## time       1   0.58216 0.58216  13.431 0.44137  1e-04 ***
## Residuals 17   0.73683 0.04334         0.55863           
## Total     18   1.31899                 1.00000           
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
The PCoA result

The PCoA result

3.5.3 Hierarchical cluster analysis

The distance of samples can also be used to perform the hierarchical cluster analysis to estimated the dissimilarities of samples. MicrobiotaProcess presents mp_cal_clust to perform this analysis. It also is implemented with the tidy-like framework.

## # A MPSE-tibble (MPSE object) abstraction: 4,408 × 25
## # OTU=232 | Samples=19 | Assays=Abundance, RareAbundance, RelRareAbundanceBySample, hellinger | Taxanomy=Kingdom, Phylum, Class, Order, Family, Genus, Species
##    OTU    Sample Abundance RareAbundance RelRareAbundanceBySamp… hellinger time 
##    <chr>  <chr>      <int>         <int>                   <dbl>     <dbl> <chr>
##  1 OTU_1  F3D0         579           214                   8.50     0.298  Early
##  2 OTU_2  F3D0         345           116                   4.61     0.230  Early
##  3 OTU_3  F3D0         449           179                   7.11     0.262  Early
##  4 OTU_4  F3D0         430           167                   6.63     0.257  Early
##  5 OTU_5  F3D0         154            54                   2.14     0.154  Early
##  6 OTU_6  F3D0         470           174                   6.91     0.268  Early
##  7 OTU_7  F3D0         282           115                   4.57     0.208  Early
##  8 OTU_8  F3D0         184            74                   2.94     0.168  Early
##  9 OTU_9  F3D0          45            16                   0.635    0.0830 Early
## 10 OTU_10 F3D0         158            59                   2.34     0.156  Early
## # … with 4,398 more rows, and 18 more variables: RareAbundanceRarecurve <list>, Observe <dbl>,
## #   Chao1 <dbl>, ACE <dbl>, Shannon <dbl>, Simpson <dbl>, J <dbl>, bray <list>,
## #   PCo1 (46.94%) <dbl>, PCo2 (13.37%) <dbl>, PCo3 (8.25%) <dbl>,
## #   Kingdom <chr>, Phylum <chr>, Class <chr>, Order <chr>, Family <chr>,
## #   Genus <chr>, Species <chr>
## 'treedata' S4 object'.
## 
## ...@ phylo:
## 
## Phylogenetic tree with 19 tips and 18 internal nodes.
## 
## Tip labels:
##   F3D0, F3D1, F3D141, F3D142, F3D143, F3D144, ...
## 
## Rooted; includes branch lengths.
## 
## with the following features available:
##  'time', 'RareAbundanceRarecurve',   'Observe',  'Chao1',    'ACE',  'Shannon',
##  'Simpson',  'J',    'bray', 'PCo1 (46.94%)',    'PCo2 (13.37%)',    'PCo3 (8.25%)'.
## 
## # The associated data tibble abstraction: 37 × 15
## # The 'node', 'label' and 'isTip' are from the phylo tree.
##     node label  isTip time  RareAbundanceRa… Observe Chao1   ACE Shannon Simpson
##    <int> <chr>  <lgl> <chr> <list>             <dbl> <dbl> <dbl>   <dbl>   <dbl>
##  1     1 F3D0   TRUE  Early <tibble [2,520 …     104 104.  105.     3.88   0.965
##  2     2 F3D1   TRUE  Early <tibble [2,520 …      99 102   101.     3.97   0.971
##  3     3 F3D141 TRUE  Late  <tibble [2,520 …      74  74    74.2    3.41   0.950
##  4     4 F3D142 TRUE  Late  <tibble [2,520 …      48  48    48      3.12   0.939
##  5     5 F3D143 TRUE  Late  <tibble [2,520 …      56  56    56      3.29   0.946
##  6     6 F3D144 TRUE  Late  <tibble [2,520 …      47  47    47.2    2.98   0.930
##  7     7 F3D145 TRUE  Late  <tibble [2,520 …      71  73.1  74.0    3.12   0.937
##  8     8 F3D146 TRUE  Late  <tibble [2,520 …      83  84.5  83.8    3.60   0.956
##  9     9 F3D147 TRUE  Late  <tibble [2,520 …      97 107   106.     3.31   0.940
## 10    10 F3D148 TRUE  Late  <tibble [2,520 …      92  93.3  94.7    3.44   0.952
## # … with 27 more rows, and 5 more variables: J <dbl>, bray <list>,
## #   PCo1 (46.94%) <dbl>, PCo2 (13.37%) <dbl>, PCo3 (8.25%) <dbl>
The hierarchical cluster result of samples

The hierarchical cluster result of samples

Since the result of hierarchical cluster is treedata object, so it is very easy to display the result with associated data. For example, we can display the result of hierarchical cluster and the abundance of specific taxonomy level to check whether some biological pattern can be found.

## # A tibble: 190 × 7
##    Phyla             nodeClass Sample RareAbundance RelRareAbundanc… time  RareAbundanceBy…
##    <fct>             <chr>     <chr>          <int>            <dbl> <chr> <list>          
##  1 p__Actinobacteria Phylum    F3D0              15            0.596 Early <tibble [2 × 3]>
##  2 p__Actinobacteria Phylum    F3D1               0            0     Early <tibble [2 × 3]>
##  3 p__Actinobacteria Phylum    F3D141            11            0.437 Late  <tibble [2 × 3]>
##  4 p__Actinobacteria Phylum    F3D142            28            1.11  Late  <tibble [2 × 3]>
##  5 p__Actinobacteria Phylum    F3D143            10            0.397 Late  <tibble [2 × 3]>
##  6 p__Actinobacteria Phylum    F3D144            18            0.715 Late  <tibble [2 × 3]>
##  7 p__Actinobacteria Phylum    F3D145             6            0.238 Late  <tibble [2 × 3]>
##  8 p__Actinobacteria Phylum    F3D146             4            0.159 Late  <tibble [2 × 3]>
##  9 p__Actinobacteria Phylum    F3D147            15            0.596 Late  <tibble [2 × 3]>
## 10 p__Actinobacteria Phylum    F3D148            19            0.755 Late  <tibble [2 × 3]>
## # … with 180 more rows
The hierarchical cluster result of samples and the abundance of Phylum

The hierarchical cluster result of samples and the abundance of Phylum

3.6 Biomarker discovery

The MicrobiotaProcess presents mp_diff_analysis for the biomarker discovery based on tidy-like framework. The rule of mp_diff_analysis is similar with the LEfSe(Nicola Segata and Huttenhower 2011). First, all features are tested whether values in different classes are differentially distributed. Second, the significantly different features are tested whether all pairwise comparisons between subclass in different classes distinctly consistent with the class trend. Finally, the significantly discriminative features are assessed by LDA (linear discriminant analysis) or rf(randomForest). However, mp_diff_analysis is more flexible. The test method of two step can be set by user, and we used the general fold change(Wirbel et al. 2019) and wilcox.test(default) to test whether all pairwise comparisons between subclass in different classes distinctly consistent with the class trend. And the result is stored to the treedata object, which can be processed and displayed via treeio(Wang et al. 2020), tidytree(Yu 2021), ggtree(Yu et al. 2017) and ggtreeExtra(Xu et al. 2021).

## # A MPSE-tibble (MPSE object) abstraction: 4,408 × 25
## # OTU=232 | Samples=19 | Assays=Abundance, RareAbundance, RelRareAbundanceBySample, hellinger | Taxanomy=Kingdom, Phylum, Class, Order, Family, Genus, Species
##    OTU    Sample Abundance RareAbundance RelRareAbundanceBySample hellinger
##    <chr>  <chr>      <int>         <int>                    <dbl>     <dbl>
##  1 OTU_1  F3D0         579           214                    8.50     0.298 
##  2 OTU_2  F3D0         345           116                    4.61     0.230 
##  3 OTU_3  F3D0         449           179                    7.11     0.262 
##  4 OTU_4  F3D0         430           167                    6.63     0.257 
##  5 OTU_5  F3D0         154            54                    2.14     0.154 
##  6 OTU_6  F3D0         470           174                    6.91     0.268 
##  7 OTU_7  F3D0         282           115                    4.57     0.208 
##  8 OTU_8  F3D0         184            74                    2.94     0.168 
##  9 OTU_9  F3D0          45            16                    0.635    0.0830
## 10 OTU_10 F3D0         158            59                    2.34     0.156 
##    time  RareAbundanceRarec… Observe Chao1   ACE Shannon Simpson     J bray     
##    <chr> <list>                <dbl> <dbl> <dbl>   <dbl>   <dbl> <dbl> <list>   
##  1 Early <tibble [2,520 × 4…     104  104.  105.    3.88   0.965 0.835 <tibble …
##  2 Early <tibble [2,520 × 4…     104  104.  105.    3.88   0.965 0.835 <tibble …
##  3 Early <tibble [2,520 × 4…     104  104.  105.    3.88   0.965 0.835 <tibble …
##  4 Early <tibble [2,520 × 4…     104  104.  105.    3.88   0.965 0.835 <tibble …
##  5 Early <tibble [2,520 × 4…     104  104.  105.    3.88   0.965 0.835 <tibble …
##  6 Early <tibble [2,520 × 4…     104  104.  105.    3.88   0.965 0.835 <tibble …
##  7 Early <tibble [2,520 × 4…     104  104.  105.    3.88   0.965 0.835 <tibble …
##  8 Early <tibble [2,520 × 4…     104  104.  105.    3.88   0.965 0.835 <tibble …
##  9 Early <tibble [2,520 × 4…     104  104.  105.    3.88   0.965 0.835 <tibble …
## 10 Early <tibble [2,520 × 4…     104  104.  105.    3.88   0.965 0.835 <tibble …
## # … with 10 more variables: PCo1 (46.94%) <dbl>, PCo2 (13.37%) <dbl>, PCo3 (8.25%) <dbl>, Kingdom <chr>, Phylum <chr>, Class <chr>, Order <chr>,
## #   Family <chr>, Genus <chr>, Species <chr>
## # … with 4,398 more rows
## 'treedata' S4 object'.
## 
## ...@ phylo:
## 
## Phylogenetic tree with 232 tips and 218 internal nodes.
## 
## Tip labels:
##   OTU_58, OTU_67, OTU_231, OTU_188, OTU_150, OTU_207, ...
## Node labels:
##   r__root, k__Bacteria, p__Actinobacteria, p__Bacteroidetes, p__Cyanobacteria, p__Deinococcus-Thermus, ...
## 
## Rooted; no branch lengths.
## 
## with the following features available:
##  'nodeClass',    'nodeDepth',    'RareAbundanceBySample',    'RareAbundanceBytime',
##  'RelRareAbundanceBySampleBySample', 'LDAupper', 'LDAmean',  'LDAlower',
##  'Sign_time',    'pvalue',   'fdr'.
## 
## # The associated data tibble abstraction: 450 × 14
## # The 'node', 'label' and 'isTip' are from the phylo tree.
##     node label   isTip nodeClass nodeDepth RareAbundanceBySam… RareAbundanceByt…
##    <dbl> <chr>   <lgl> <chr>         <dbl> <list>              <list>           
##  1     1 OTU_58  TRUE  OTU               8 <tibble [19 × 4]>   <tibble [2 × 3]> 
##  2     2 OTU_67  TRUE  OTU               8 <tibble [19 × 4]>   <tibble [2 × 3]> 
##  3     3 OTU_231 TRUE  OTU               8 <tibble [19 × 4]>   <tibble [2 × 3]> 
##  4     4 OTU_188 TRUE  OTU               8 <tibble [19 × 4]>   <tibble [2 × 3]> 
##  5     5 OTU_150 TRUE  OTU               8 <tibble [19 × 4]>   <tibble [2 × 3]> 
##  6     6 OTU_207 TRUE  OTU               8 <tibble [19 × 4]>   <tibble [2 × 3]> 
##  7     7 OTU_5   TRUE  OTU               8 <tibble [19 × 4]>   <tibble [2 × 3]> 
##  8     8 OTU_80  TRUE  OTU               8 <tibble [19 × 4]>   <tibble [2 × 3]> 
##  9     9 OTU_163 TRUE  OTU               8 <tibble [19 × 4]>   <tibble [2 × 3]> 
## 10    10 OTU_1   TRUE  OTU               8 <tibble [19 × 4]>   <tibble [2 × 3]> 
## # … with 440 more rows, and 7 more variables:
## #   RelRareAbundanceBySampleBySample <list>, LDAupper <dbl>, LDAmean <dbl>,
## #   LDAlower <dbl>, Sign_time <chr>, pvalue <dbl>, fdr <dbl>
## # A tibble: 34 × 8
##    label  nodeClass LDAupper LDAmean LDAlower Sign_time   pvalue     fdr
##    <chr>  <chr>        <dbl>   <dbl>    <dbl> <chr>        <dbl>   <dbl>
##  1 OTU_4  OTU           6.41    6.38     6.36 Late      0.000444 0.00732
##  2 OTU_6  OTU           6.54    6.52     6.51 Late      0.000441 0.00732
##  3 OTU_7  OTU           6.18    6.17     6.15 Late      0.000237 0.00605
##  4 OTU_12 OTU           6.22    6.20     6.19 Late      0.000496 0.00732
##  5 OTU_46 OTU           5.75    5.71     5.67 Early     0.000161 0.00605
##  6 OTU_15 OTU           5.89    5.85     5.79 Early     0.000273 0.00605
##  7 OTU_26 OTU           5.79    5.76     5.73 Early     0.000263 0.00605
##  8 OTU_36 OTU           5.69    5.67     5.64 Early     0.000597 0.00851
##  9 OTU_56 OTU           5.67    5.62     5.57 Late      0.000344 0.00697
## 10 OTU_57 OTU           5.59    5.55     5.51 Early     0.000484 0.00732
## # … with 24 more rows
# Since taxa.tree is treedata object, it can be visualized by ggtree and ggtreeExtra
p1 <- ggtree(
        taxa.tree,
        layout="radial",
        size = 0.3
      ) +
      geom_point(
        data = td_filter(!isTip),
        fill="white",
        size=1,
        shape=21
      )
# display the high light of phylum clade.
p2 <- p1 +
      geom_hilight(
        #data = td_filter(nodeClass == "Phylum"), # This is supported by ggtree >=3.1.3
        mapping = aes(subset = nodeClass == "Phylum", 
                      node = node, 
                      fill = label)
      )
# display the relative abundance of features(OTU)
p3 <- p2 +
      ggnewscale::new_scale("fill") +
      geom_fruit(
         data = td_unnest(RareAbundanceBySample),
         geom = geom_star,
         mapping = aes(
                       x = fct_reorder(Sample, time, .fun=min),
                       size = RelRareAbundanceBySample,
                       fill = time,
                       subset = RelRareAbundanceBySample > 0
                   ),
         starshape = 13,
         starstroke = 0.25,
         offset = 0.04,
         pwidth = 0.8,
         grid.params = list(linetype=2)
      ) +
      scale_size_continuous(
         name="Relative Abundance (%)",
         range = c(1, 3)
      ) +
      scale_fill_manual(values=c("#1B9E77", "#D95F02"))
# display the tip labels of taxa tree
p4 <- p3 + geom_tiplab(size=2, offset=7.2)
# display the LDA of significant OTU.
p5 <- p4 +
      ggnewscale::new_scale("fill") +
      geom_fruit(
         geom = geom_col,
         mapping = aes(
                       x = LDAmean,
                       fill = Sign_time,
                       subset = !is.na(LDAmean)
                       ),
         orientation = "y",
         offset = 0.3,
         pwidth = 0.5,
         axis.params = list(axis = "x",
                            title = "Log10(LDA)",
                            title.height = 0.01,
                            title.size = 2,
                            text.size = 1.8,
                            vjust = 1),
         grid.params = list(linetype = 2)
      )

# display the significant (FDR) taxonomy after kruskal.test (default)
p6 <- p5 +
      ggnewscale::new_scale("size") +
      geom_point(
         data=td_filter(!is.na(fdr)),
         mapping = aes(size = -log10(fdr),
                       fill = Sign_time,
                       ),
         shape = 21,
      ) +
      scale_size_continuous(range=c(1, 3)) +
      scale_fill_manual(values=c("#1B9E77", "#D95F02"))

p6 + theme(
           legend.key.height = unit(0.3, "cm"),
           legend.key.width = unit(0.3, "cm"),
           legend.spacing.y = unit(0.02, "cm"),
           legend.text = element_text(size = 7),
           legend.title = element_text(size = 9),
          )
The different species and the abundance of sample

The different species and the abundance of sample

The visualization methods of result can be various, you can refer to the article or book of ggtree(Yu et al. 2017, 2018) and the article of ggtreeExtra(Xu et al. 2021).

4. Need helps?

If you have questions/issues, please visit github issue tracker.

5. Session information

Here is the output of sessionInfo() on the system on which this document was compiled:

## R version 4.1.1 (2021-08-10)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 20.04.3 LTS
## 
## Matrix products: default
## BLAS:   /home/biocbuild/bbs-3.13-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.13-bioc/R/lib/libRlapack.so
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_GB              LC_COLLATE=C              
##  [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       
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] forcats_0.5.1           ggstar_1.0.2            MicrobiotaProcess_1.4.4
##  [4] tidytree_0.3.5          treeio_1.16.2           ggtreeExtra_1.2.3      
##  [7] ggtree_3.0.4            phyloseq_1.36.0         ggplot2_3.3.5          
## [10] knitr_1.36             
## 
## loaded via a namespace (and not attached):
##   [1] TH.data_1.1-0               ggnewscale_0.4.5           
##   [3] colorspace_2.0-2            ggsignif_0.6.3             
##   [5] ellipsis_0.3.2              modeltools_0.2-23          
##   [7] XVector_0.32.0              GenomicRanges_1.44.0       
##   [9] aplot_0.1.1                 farver_2.1.0               
##  [11] ggrepel_0.9.1               fansi_0.5.0                
##  [13] mvtnorm_1.1-2               coin_1.4-1                 
##  [15] codetools_0.2-18            splines_4.1.1              
##  [17] libcoin_1.0-9               ade4_1.7-18                
##  [19] jsonlite_1.7.2              cluster_2.1.2              
##  [21] png_0.1-7                   compiler_4.1.1             
##  [23] assertthat_0.2.1            Matrix_1.3-4               
##  [25] fastmap_1.1.0               lazyeval_0.2.2             
##  [27] cli_3.0.1                   htmltools_0.5.2            
##  [29] tools_4.1.1                 igraph_1.2.6               
##  [31] gtable_0.3.0                glue_1.4.2                 
##  [33] GenomeInfoDbData_1.2.6      corrr_0.4.3                
##  [35] reshape2_1.4.4              dplyr_1.0.7                
##  [37] Rcpp_1.0.7                  Biobase_2.52.0             
##  [39] jquerylib_0.1.4             vctrs_0.3.8                
##  [41] Biostrings_2.60.2           rhdf5filters_1.4.0         
##  [43] multtest_2.48.0             ape_5.5                    
##  [45] nlme_3.1-153                gghalves_0.1.1             
##  [47] iterators_1.0.13            ggalluvial_0.12.3          
##  [49] xfun_0.26                   stringr_1.4.0              
##  [51] lifecycle_1.0.1             zlibbioc_1.38.0            
##  [53] MASS_7.3-54                 zoo_1.8-9                  
##  [55] scales_1.1.1                MatrixGenerics_1.4.3       
##  [57] parallel_4.1.1              SummarizedExperiment_1.22.0
##  [59] biomformat_1.20.0           sandwich_3.0-1             
##  [61] rhdf5_2.36.0                yaml_2.2.1                 
##  [63] gridExtra_2.3               ggfun_0.0.4                
##  [65] yulab.utils_0.0.2           sass_0.4.0                 
##  [67] stringi_1.7.4               highr_0.9                  
##  [69] S4Vectors_0.30.2            foreach_1.5.1              
##  [71] permute_0.9-5               BiocGenerics_0.38.0        
##  [73] ggside_0.1.2                GenomeInfoDb_1.28.4        
##  [75] rlang_0.4.11                pkgconfig_2.0.3            
##  [77] bitops_1.0-7                matrixStats_0.61.0         
##  [79] evaluate_0.14               lattice_0.20-45            
##  [81] purrr_0.3.4                 Rhdf5lib_1.14.2            
##  [83] patchwork_1.1.1             labeling_0.4.2             
##  [85] tidyselect_1.1.1            plyr_1.8.6                 
##  [87] magrittr_2.0.1              R6_2.5.1                   
##  [89] IRanges_2.26.0              magick_2.7.3               
##  [91] generics_0.1.0              multcomp_1.4-17            
##  [93] DelayedArray_0.18.0         DBI_1.1.1                  
##  [95] pillar_1.6.3                withr_2.4.2                
##  [97] mgcv_1.8-37                 prettydoc_0.4.1            
##  [99] survival_3.2-13             RCurl_1.98-1.5             
## [101] tibble_3.1.5                crayon_1.4.1               
## [103] utf8_1.2.2                  rmarkdown_2.11             
## [105] grid_4.1.1                  data.table_1.14.2          
## [107] vegan_2.5-7                 digest_0.6.28              
## [109] tidyr_1.1.4                 gridGraphics_0.5-1         
## [111] stats4_4.1.1                munsell_0.5.0              
## [113] viridisLite_0.4.0           ggplotify_0.1.0            
## [115] bslib_0.3.0

6. References

Beghini, Francesco, Lauren J McIver, Aitor Blanco-Mı́guez, Leonard Dubois, Francesco Asnicar, Sagun Maharjan, Ana Mailyan, et al. 2021. “Integrating Taxonomic, Functional, and Strain-Level Profiling of Diverse Microbial Communities with bioBakery 3.” Elife 10: e65088.

Bolyen, Evan, Jai Ram Rideout, Matthew R Dillon, Nicholas A Bokulich, Christian C Abnet, Gabriel A Al-Ghalith, Harriet Alexander, et al. 2019. “Reproducible, Interactive, Scalable and Extensible Microbiome Data Science Using Qiime 2.” Nature Biotechnology 37 (8): 852–57.

Callahan, Benjamin J, Paul J McMurdie, Michael J Rosen, Andrew W Han, Amy Jo A Johnson, and Susan P Holmes. 2016. “DADA2: High-Resolution Sample Inference from Illumina Amplicon Data.” Nature Methods 13 (7): 581–83.

Huang, Ruizhu, Charlotte Soneson, Felix G.M. Ernst, Kevin C. Rue-Albrecht, Guangchuang Yu, Stephanie C. Hicks, and Mark D. Robinson. 2021. “TreeSummarizedExperiment: A S4 Class for Data with Hierarchical Structure.” F1000Research 9: 1246. https://f1000research.com/articles/9-1246.

McMurdie, Paul J., and Susan Holmes. 2013. “Phyloseq: An R Package for Reproducible Interactive Analysis and Graphics of Microbiome Census Data.” PLoS ONE 8 (4): e61217. https://doi.org/10.1371/journal.pone.0061217.

Morgan, Martin, Valerie Obenchain, Jim Hester, and Hervé Pagès. 2021. SummarizedExperiment: SummarizedExperiment Container. https://bioconductor.org/packages/SummarizedExperiment.

Nicola Segata, Levi Waldron, Jacques Izard, and Curtis Huttenhower. 2011. “Metagenomic Biomarker Discovery and Explanation.” Genome Biology 12 (6): R60. https://doi.org/10.1186/gb-2011-12-6-r60.

Oksanen, Jari, F. Guillaume Blanchet, Michael Friendly, Roeland Kindt, Pierre Legendre, Dan McGlinn, Peter R. Minchin, et al. 2019. “Vegan: Community Ecology Package.” https://CRAN.R-project.org/package=vegan.

Pagès, H., P. Aboyoun, R. Gentleman, and S. DebRoy. 2021. Biostrings: Efficient Manipulation of Biological Strings. https://bioconductor.org/packages/Biostrings.

Siegel, Andrew F. 2004. “Rarefaction Curves.” Encyclopedia of Statistical Sciences 10. https://doi.org/10.1002/0471667196.ess2195.pub2.

Wang, Li-Gen, Tommy Tsan-Yuk Lam, Shuangbin Xu, Zehan Dai, Lang Zhou, Tingze Feng, Pingfan Guo, et al. 2020. “Treeio: An R Package for Phylogenetic Tree Input and Output with Richly Annotated and Associated Data.” Molecular Biology and Evolution 37 (2): 599–603. https://doi.org/10.1093/molbev/msz240.

Wickham, Hadley, Mara Averick, Jennifer Bryan, Winston Chang, Lucy D’Agostino McGowan, Romain François, Garrett Grolemund, et al. 2019. “Welcome to the tidyverse.” Journal of Open Source Software 4 (43): 1686. https://doi.org/10.21105/joss.01686.

Wirbel, Jakob, Paul Theodor Pyl, Ece Kartal, Konrad Zych, Alireza Kashani, Alessio Milanese, Jonas S Fleck, et al. 2019. “Meta-Analysis of Fecal Metagenomes Reveals Global Microbial Signatures That Are Specific for Colorectal Cancer.” Nature Medicine 25 (4): 679. https://doi.org/10.1038/s41591-019-0406-6.

Xu, Shuangbin, Zehan Dai, Pingfan Guo, Xiaocong Fu, Shanshan Liu, Lang Zhou, Wenli Tang, et al. 2021. “GgtreeExtra: Compact Visualization of Richly Annotated Phylogenetic Data.” Molecular Biology and Evolution 38 (9): 4039–42. https://doi.org/10.1093/molbev/msab166.

Yu, Guangchuang. 2021. Tidytree: A Tidy Tool for Phylogenetic Tree Data Manipulation. https://yulab-smu.top/treedata-book/.

Yu, Guangchuang, Tommy Tsan-Yuk Lam, Huachen Zhu, and Yi Guan. 2018. “Two Methods for Mapping and Visualizing Associated Data on Phylogeny Using Ggtree.” Molecular Biology and Evolution 35 (2): 3041–3. https://doi.org/10.1093/molbev/msy194.

Yu, Guangchuang, David Smith, Huachen Zhu, Yi Guan, and Tommy Tsan-Yuk Lam. 2017. “Ggtree: An R Package for Visualization and Annotation of Phylogenetic Trees with Their Covariates and Other Associated Data.” Methods in Ecology and Evolution 8 (1): 28–36. https://doi.org/10.1111/2041-210X.12628.