Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

CC BY 4.0

This work is licensed under a Creative Commons Attribution 4.0 International License.

CC BY 4.0

Biome-Shiny: A Shiny R app for microbiome visualization

Test this tool at

Have questions? Ask us directly at

If you would like to contribute to this tool, please read our Code of Conduct and Contributing guidelines at


Biome-Shiny is a graphical interface for visualizing microbiome data, primarily based around the "phyloseq" and "microbiome" libraries, with the "shiny" library being used to develop the interface. It provides a user-friendly interface to generate and visualize community composition and diversity through interactive plots.

Installation - R Package

Biome-Shiny has some dependencies outside of R that need to be installed before downloading the package. In Ubuntu:

sudo apt install libfontconfig1-dev libcairo2-dev libcurl4-openssl-dev libssl-dev libxml2-dev

Biome-Shiny is an R package, and can installed, along with its dependencies using devtools.


Launching the app - R Package

All you need to do to launch the app is open R and type in the R console:


Then type in your browser of choice:


Installation - Docker image

Biome-Shiny is also distributed as a Docker image, for ease of deployment across platforms and machines. If you'd like to use the Docker image instead, please download and install Docker on your machine

Once Docker is installed, type the following command into your terminal, to pull and install the latest Biome-Shiny docker image.

docker pull hmcs/biome-shiny-docker:latest

Launching the app - Docker image

Once the image is downloaded, you can create a new container by running the following command:

docker run -p 3838:3838 -d hmcs/biome-shiny-docker:latest

This will start a local Shiny Server session on your machine, running Biome-Shiny. To open it, type localhost:3838 on your web browser of choice.

Note for Docker Toolbox users: If you are using Docker Toolbox, the session you have started from your terminal will not be hosted on localhost. You will instead need to connect to the virtual machine generated by Docker Quickstart. You can obtain the machine's IP with the docker-machine ip command, or from the first line in the terminal, e.g.: docker is configured to use the default machine with IP


Biome-Shiny has a variety of visualizations and tables that can be used to subset and visualize a dataset.

Uploading Data

Biome-Shiny makes use of phyloseq's .biom importing functions to upload data. It accepts a .biom file as input, and requires metadata (sample_data() in phyloseq format files).

  • If the .biom file includes metadata, tick

  • If the metadata file is a separate .csv file, tick

  • If the .biom file has no metadata nor a .csv metadata file, tick . The app will attempt to generate metadata out of the OTU table's sample headers.

Then click to load the data.

Alternatively, you can use the sample data provided by microbiome for testing purposes, by clicking , followed by

Data Filtering

Biome-Shiny has several functions for subsetting and filtering datasets.

Once done with filtering, tick to apply changes, and untick to return the dataset to default settings.

Subset by top taxa

In the "Top taxa" tab, the user can remove all but a number of taxa from the dataset, leaving only a small number of top taxa. To apply changes, the user must tick . Default value is top 10 taxa.

Top taxa number input

Remove taxa

The "Subset taxa" tab allows the user to remove all species or OTUs belonging to a certain taxa. The user must choose a taxonomic rank in the dropdown list, then untick all taxa that they wish to see removed. Once they're done, tick to apply changes.

Example of the taxa subsetting menu

Remove samples

The user can remove individual samples from the dataset in the "Remove samples" tab. Like the previous section, to remove samples just untick all samples that should be removed and tick .

Remove samples menu example

Subset by prevalence

It's possible to subset the plot by a value of prevalence - the ratio of OTU/species presence in samples. For example, a prevalence of 0.5 will make it so that any species that doesn't appear in at least 50% of samples will be removed from the dataset. In the "Prevalence [0-1]:" box, input a number between 0 and 1. Inputting a value of 1 will likely cause an error, unless there is an OTU that's present in 100% of samples.

Prevalence subsetting menu

Phyloseq Summary

Displays a general summary of the entire dataset, based on the microbiome library's summarize_phyloseq() function. This includes smallest, largest and median reads, number of singletons, and whether the data is in compositional format or not.

Phyloseq summary

Core Microbiota Heatmap

A heatmap that compares abundance values for each OTU on each sample.

Community Composition

Allows the user to view how abundant a given taxa is, generating abundance (absolute and relative) barplots which allow the samples to be sorted by metadata.

Plot generation menu

In the "Sample variable:" dropdown list, the user needs to pick the metadata variable which corresponds to the samples. If the uploaded dataset didn't have any metadata attached to it, the sample variable was automatically generated from the OTU table's sample headers.

By ticking , the user can divide the plot bars, based on the levels of a given metadata variable (e.g. splitting samples between two different nationalities). The metadata which will be used to divide the samples can be picked in the "Metadata:" dropdown list.

The "Taxonomy Rank:" dropdown colors the bars based on the chosen taxonomic rank.

Absolute (top) and relative (bottom) abundance by Genus (Rank6), samples divided between gut and skin samples.

Alpha Diversity

Alpha diversity is the index that measures diversity within a sample.

Biome-Shiny displays several tables with diversity measures in the samples, such as an Evenness Table (measures how equal the OTU numbers are in each sample), Abundance Table (measures the number of each OTU in the table, whether as a simple count or in relation to the full number of species in the sample) and a table with assorted diversity measures (measure richness, among other things).

Richness plot generation menu

Evenness table

The Richness Plot can be used to visualize these diversity measures. The "Samples:" dropdown list, much like in Community Composition, asks for the metadata variable corresponding to the dataset's samples. "Point color metadata" will give each point on the plot (corresponding to a sample) a color based on the chosen metadata variable.

Richness table variables

Finally, it's possible to group samples by a metadata sample in the same way as the Community Composition plots.

Richness plot example

Beta Diversity

Beta diversity is an index that measures diversity between samples. Biome-Shiny measures Beta diversity by the samples' general composition. This is done by generating a distance matrix and representing it as a PCA plot, where each point corresponds to a sample.

Distance PCA plot generation menu

The "Metadata:" dropdown list gives the points in the plot a color. There are a variety of ordination methods and distances to use, and not all ordination methods require distances. If in doubt, leave them on default settings.

Example PCA plot


The PERMANOVA test can be used to determine the importance of a sample variable in affecting the samples' composition. The test is applied over a user-input number of permutations, and with a dissimilarity index chosen by the user (default is "bray", though there are several more).

PERMANOVA test menu

The test's results can be viewed in a table, where a P-value between 0 and 1 determines the importance of the analyzed variable in affecting differences between samples

PERMANOVA results table

Visualization is done through a Top Factors plot, which applies the test in order to determine which OTUs are most important to differentiate samples in two different groups (i.e. given two different nationalities, which OTUs are more abundant in one nationality's sample group and which OTUs are more abundant in the other).

Top Factors plot

Saving Outputs

Individual tables and plots can be saved, either by pressing (for tables) or the icon (for plots).

Alternatively, an HTML report can be downloaded by clicking in the Results tab.


Biome-Shiny is licensed by Creative Commons Attribution 4.0 International. You are free to use, modify and distribute this software, under the condition that you attribute Biome-Shiny to and Henrique Costa.


No description, website, or topics provided.







No releases published


No packages published