ALL Metrics
-
Views
-
Downloads
Get PDF
Get XML
Cite
Export
Track
Software Tool Article

ShinyDiversity - Understanding Alpha and Beta Diversity through Interactive Visualizations

[version 1; peer review: 1 approved, 1 approved with reservations]
PUBLISHED 20 Apr 2018
Author details Author details
OPEN PEER REVIEW
REVIEWER STATUS

This article is included in the RPackage gateway.

Abstract

In the past few decades, ecologists have developed many diversity indices to describe within and between sample diversity. Consequently, it can be difficult to determine which index to choose and how the distribution of microbial communities affect these indices. We've developed an interactive application, ShinyDiversity, that dynamically visualizes different alpha or beta diversity indices. In enabling users to select and simultaneously visualize different indices, our application aims to facilitate understanding of how the microbial data affects selected indices.

Keywords

shiny, alpha diversity, beta diversity, interactive web application, R, microbiome

Introduction

Microbial survey studies (i.e. microbiome survey analysis) use alpha and beta diversity indices to estimate within and between sample diversity. Alpha diversity is the diversity in a single sample site (e.g. human gut) and beta diversity describes the difference in diversity between those sites1 (e.g. different regions of the body). With a variety of alpha and beta diversity indices available, it can be difficult to determine which index to choose.

Previously developed user-friendly HTML web applications such as Microbiome Analyst2 and Dynamic Assessment of Microbial Ecology (DAME)3 allow users to visualize alpha and beta diversity. However, these tools do not address and explore how the different alpha and beta diversity indices impact their results. In this regard, we’ve developed an interactive user-friendly application that utilizes real data to dynamically visualize different alpha or beta diversity indices (Figure 1). The user is able to see how the distribution, normalization, and datasets alter the resulting diversity indices. Ultimately, this leads to an intuitive understanding of how these different diversity indices affect the data. The majority of the tool’s development was undertaken as part of the hackseq genomics hackathon in Vancouver, BC.

dab4a142-e022-4991-a98e-e00d8250e387_figure1.gif

Figure 1. ShinyDiversity page.

The homepage includes a brief description of the project, how to run the application locally, and the motivation behind the project.

Methods

Implementation

ShinyDiversity is an interactive HTML web application that utilizes the shiny (version 1.5.5.872) R package4. The application allows users to interactively visualize both alpha and beta diversity of multiple datasets. All diversity plots are generated using the phyloseq (version 1.16.2) R package which conveniently allows for phylogenetic analysis and visualization of microbial communities and provides 44 supported distance methods5. The underlying data used for calculations is an operational taxonomic unit (OTU) abundance table. An OTU abundance table is a matrix where the rows represent the various taxa and the columns are different samples. The table values are the counts of how often those taxa are observed.

Operation

System requirements are computers that can successfully install Bioconductor (Release 3.6) and R (≥ 3.4.0).

Data

Our application utilizes two built-in datasets from phyloseq (version 1.16.2): GlobalPatterns and esophagus. GlobalPatterns is a dataset composed of nine different sample types obtained from areas ranging from freshwater to the human gut6. The esophagus dataset is a small example dataset of three samples of a human esophageal community, with one sample from each of the three subjects7. In addition to these two datasets, we created a third dataset GP3, which is a subset of the GlobalPatterns dataset. The following R code generates this dataset.

library(phyloseq) 
data("GlobalPatterns")
GP3 <- subset_samples(GlobalPatterns,  SampleType  %in%  c("Skin",  "Tongue",  "Feces"))

GP3 only includes human feces, skin, and tongue samples and was created for easier visualization of multiple sample groups.

Use cases

Alpha diversity

The alpha diversity page (Figure 2) currently gives users the option to visualize up to five different alpha diversity indices: Abundance Coverage-based Estimator (ACE), Shannon, Simpson, Inverse Simpson, and Fisher. The application dynamically produces side by side comparisons of the original data and any indices selected by the user. The side by side comparison allows the user to compare and contrast their selected indices.

dab4a142-e022-4991-a98e-e00d8250e387_figure2.gif

Figure 2. The alpha diversity page.

Here is an example with the GlobalPatterns dataset and three plots for alpha diversity indices: observed taxa (i.e. number of different taxa), ACE, and Inverse Simpson. The dropdown box allows the user to choose different datasets.

It was also important for users to have a top level and individual sample view of their data in order to quickly identify interesting features (Figure 3). The alpha diversity page features a heat map displaying the frequency count of each sample in the dataset. A barplot right beside the heat map shows the intensity pattern for a single sample, which provides a quick way to identify and focus on interesting samples.

dab4a142-e022-4991-a98e-e00d8250e387_figure3.gif

Figure 3. Top level and individual sample view of data.

The heat map gives a cursory view of the similarities and differences between samples. The bar graph shows an individual sample where the x-axis are the taxa and the y-axis are the taxa counts. The slider allows the user to move through the different samples to change the bar plot. These plots are shown at the bottom of the alpha diversity page.

Lastly, the alpha diversity page also shows the singleton and doubleton count for each sample (Figure 4). Some of the alpha diversity indices are sensitive to singletons and doubletons, which are OTUs that appear in the data only once or twice, respectively. These rare OTUs may suggest undersampling and hence a higher, true abundance in the population8. If a OTU is found more than two times then we can be more confident that it is not a false positive.

dab4a142-e022-4991-a98e-e00d8250e387_figure4.gif

Figure 4. Singleton and doubleton summary table.

The table shows the different samples and the number of single and double taxa.

Beta diversity

Currently, the beta diversity page (Figure 5 and Figure 6) allows users to dynamically visualize and compare two groups of the most common beta diversity indices: 1) non-phylogenetic distance indices - Euclidean, Bray-Curtis, Jaccard and 2) phylogenetic distance indices - unweighted UniFrac and weighted UniFrac. All distance indices were visualized with principal coordinate analysis (PCoA) plots, which have two principal coordinates that explain the greatest distance between samples. The dataset used to visualize beta diversity is the GP3 normalized dataset. The dataset is normalized by rarefying, a resampling method9, to the sample with the smallest library size (N = 100,187). Users have the option to rarefy the samples to any library size below 100,187. This option allows users to visualize how rarefying affects beta diversity.

dab4a142-e022-4991-a98e-e00d8250e387_figure5.gif

Figure 5. The beta diversity page with non-phylogenetic distance indices.

The Euclidean, Bray-Curtis, and Jaccard distances are plotted. The slider will rarefy the GP3 dataset to the specified library size.

dab4a142-e022-4991-a98e-e00d8250e387_figure6.gif

Figure 6. The beta diversity page with phylogenetic distance indices.

The indices plotted are the unweighted UniFrac and weighted UniFrac.

Conclusions and future work

Ecologists have spent decades developing these diversity indices, each having their own assumptions and use cases. Current software tools make it easy to calculate many of these indices without making the strengths and weaknesses of each clear. ShinyDiversity facilitates an exploration and understanding of alpha and beta diversity indices on microbiome data. This understanding is developed by enabling users to compare and contrast the visual differences in the plotted indices on their data.

Our software is the first step in making these indices more understandable. Future work includes allowing users to input an abundance table for both the genus and OTU taxa level, use other normalization techniques (i.e. scaling), and select the degree of sparsity and dispersion. Additionally, we plan to include more diversity indices and options for users to change the distribution of selected samples. This will enable users to observe how each diversity index is influenced by sample distribution, providing a deeper understanding of diversity indices.

Software availability

ShinyDiversity website https://erictleung.shinyapps.io/shinydiversity

Latest source code: https://github.com/erictleung/shinydiversity

Archived source code as at time of publication: http://dx.doi.org/10.5281/zenodo.1188304 (Leung et al., 2018)

Software license: GNU General Public License (GPL) Version 3.0

Comments on this article Comments (1)

Version 1
VERSION 1 PUBLISHED 20 Apr 2018
  • Reviewer Response 25 Apr 2018
    Susan Holmes, Stanford University, USA
    25 Apr 2018
    Reviewer Response
    It might be worth noting that this version is very close to Shiny-phyloseq which was published in Bioinformatics https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4287943/
    and that entering phyloseq and shiny in google brings you to the ... Continue reading
Author details Author details
Competing interests
Grant information
Copyright
Download
 
Export To
metrics
Views Downloads
F1000Research - -
PubMed Central
Data from PMC are received and updated monthly.
- -
Citations
CITE
how to cite this article
Leung ET, Noronha R, Mirza A et al. ShinyDiversity - Understanding Alpha and Beta Diversity through Interactive Visualizations [version 1; peer review: 1 approved, 1 approved with reservations]. F1000Research 2018, 7:479 (https://doi.org/10.12688/f1000research.14217.1)
NOTE: If applicable, it is important to ensure the information in square brackets after the title is included in all citations of this article.
track
receive updates on this article
Track an article to receive email alerts on any updates to this article.

Open Peer Review

Current Reviewer Status: ?
Key to Reviewer Statuses VIEW
ApprovedThe paper is scientifically sound in its current form and only minor, if any, improvements are suggested
Approved with reservations A number of small changes, sometimes more significant revisions are required to address specific details and improve the papers academic merit.
Not approvedFundamental flaws in the paper seriously undermine the findings and conclusions
Version 1
VERSION 1
PUBLISHED 20 Apr 2018
Views
18
Cite
Reviewer Report 16 May 2018
Richard E. Isaacson, Department of Veterinary and Biomedical Sciences, University of Minnesota, Saint Paul, MN, USA 
Approved
VIEWS 18
The advent of microbial ecologic studies using 16S rRNA gene analysis has opened the field of microbial diversity to a wide range of new investigators. Most investigations include ecologic analyses of microbial diversity using a range of different diversity indices. ... Continue reading
CITE
CITE
HOW TO CITE THIS REPORT
Isaacson RE. Reviewer Report For: ShinyDiversity - Understanding Alpha and Beta Diversity through Interactive Visualizations [version 1; peer review: 1 approved, 1 approved with reservations]. F1000Research 2018, 7:479 (https://doi.org/10.5256/f1000research.15467.r33341)
NOTE: it is important to ensure the information in square brackets after the title is included in all citations of this article.
Views
31
Cite
Reviewer Report 03 May 2018
Jianguo Xia, Institute of Parasitology and Department of Animal Science, McGill University, Montréal, QC, Canada 
Approved with Reservations
VIEWS 31
Leung et al described a software tool for visual analysis of microbiome alpha and beta diversity. The motivations are to be user-friendly and to allow users to explore how different alpha and beta diversity indices impact their results. The tool is ... Continue reading
CITE
CITE
HOW TO CITE THIS REPORT
Xia J. Reviewer Report For: ShinyDiversity - Understanding Alpha and Beta Diversity through Interactive Visualizations [version 1; peer review: 1 approved, 1 approved with reservations]. F1000Research 2018, 7:479 (https://doi.org/10.5256/f1000research.15467.r33354)
NOTE: it is important to ensure the information in square brackets after the title is included in all citations of this article.

Comments on this article Comments (1)

Version 1
VERSION 1 PUBLISHED 20 Apr 2018
  • Reviewer Response 25 Apr 2018
    Susan Holmes, Stanford University, USA
    25 Apr 2018
    Reviewer Response
    It might be worth noting that this version is very close to Shiny-phyloseq which was published in Bioinformatics https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4287943/
    and that entering phyloseq and shiny in google brings you to the ... Continue reading
Alongside their report, reviewers assign a status to the article:
Approved - the paper is scientifically sound in its current form and only minor, if any, improvements are suggested
Approved with reservations - A number of small changes, sometimes more significant revisions are required to address specific details and improve the papers academic merit.
Not approved - fundamental flaws in the paper seriously undermine the findings and conclusions
Sign In
If you've forgotten your password, please enter your email address below and we'll send you instructions on how to reset your password.

The email address should be the one you originally registered with F1000.

Email address not valid, please try again

You registered with F1000 via Google, so we cannot reset your password.

To sign in, please click here.

If you still need help with your Google account password, please click here.

You registered with F1000 via Facebook, so we cannot reset your password.

To sign in, please click here.

If you still need help with your Facebook account password, please click here.

Code not correct, please try again
Email us for further assistance.
Server error, please try again.