Pavian: Interactive Visualization of Taxonomic Profiles


The Workshop materia;ls available to download Figshare

Overview

What is Pavian?

Pavian is an interactive web-based application for exploring and visualizing metagenomics classification results. Built as an R Shiny application, Pavian provides an intuitive interface for analyzing taxonomic profiles.

Key Features:

  • πŸ“Š Interactive Sankey diagrams showing taxonomic flow
  • πŸ“ˆ Sample comparison tools
  • πŸ” Search and filter functionality
  • πŸ“₯ Export capabilities for figures and tables

File Format Compatibility

Pavian accepts: βœ… Bracken reports (.report or .txt)
βœ… MetaPhlAn4 profiles (.txt)
βœ… Kraken2 reports

For this workshop, you’ll use either Bracken OR MetaPhlAn4 profiles.


Installation and Launch

Step 1: Install Pavian

Open RStudio and run:

# Install remotes if not already installed
if (!require(remotes)) { 
    install.packages("remotes") 
}

# Install Pavian from GitHub
remotes::install_github("fbreitwieser/pavian")

⏱️ Installation time: 2-3 minutes (only needed once)

Step 2: Launch Pavian

# Launch Pavian
pavian::runApp(port=5000)

What happens:

  • Pavian opens in your web browser at http://localhost:5000
  • Keep the R console open while using Pavian

πŸ’‘ Tip: If port 5000 is busy, try pavian::runApp(port=5001)


Preparing Your Data

Download Profile Files

Download the 6 coffee fermentation samples from the server:

Option 1: MetaPhlAn4 profiles

shared-team/users/{your_name}/Session1_profiling/Metaphlan/T0_ERR2231567.unclprofile.txt
shared-team/users/{your_name}/Session1_profiling/Metaphlan/T16_ERR2231569.unclprofile.txt
shared-team/users/{your_name}/Session1_profiling/Metaphlan/T24_ERR2231570.unclprofile.txt
shared-team/users/{your_name}/Session1_profiling/Metaphlan/T36_ERR2231571.unclprofile.txt
shared-team/users/{your_name}/Session1_profiling/Metaphlan/T64_ERR2231572.unclprofile.txt
shared-team/users/{your_name}/Session1_profiling/Metaphlan/T8_ERR2231568.unclprofile.txt

Option 2: Bracken profiles

shared-team/users/{your_name}/Session1_profiling/Bracken/T0_ERR2231567_profiles_bracken_species.txt
shared-team/users/{your_name}/Session1_profiling/Bracken/T16_ERR2231569_profiles_bracken_species.txt
shared-team/users/{your_name}/Session1_profiling/Bracken/T24_ERR2231570_profiles_bracken_species.txt
shared-team/users/{your_name}/Session1_profiling/Bracken/T36_ERR2231571_profiles_bracken_species.txt
shared-team/users/{your_name}/Session1_profiling/Bracken/T64_ERR2231572_profiles_bracken_species.txt
shared-team/users/{your_name}/Session1_profiling/Bracken/T8_ERR2231568_profiles_bracken_species.txt

How to download:

  1. Open file browser on notebook (top-left)
  2. Navigate to Session1_profiling/Metaphlan/ or Session1_profiling/Bracken/
  3. Select all 6 files
  4. Right-click β†’ Download
  5. Save to your computer

Using Pavian

Upload Your Data

  1. In Pavian interface, click β€œBrowseβ€¦β€œ button
  2. Select all 6 profile files
  3. Click β€œOpen”
  4. Wait for upload to complete (~10-30 seconds)

Key Tabs:

Results Tab:

  • Interactive Sankey diagram
  • Hover over taxa for details
  • Click to expand/collapse branches
  • Use threshold slider to filter low-abundance taxa

Sample Tab:

  • View individual samples
  • Switch taxonomic levels (Family, Genus, Species)
  • Bar charts and data tables
  • Search for specific taxa

Comparison Tab:

  • Compare multiple samples side-by-side
  • Venn diagrams of shared/unique taxa
  • Scatter plots comparing abundances

Sample Browser Tab:

  • Table view of all samples at once
  • Export data

Workshop Exercise: Exploring Coffee Fermentation

Setup

βœ… Upload all 6 profiles (MetaPhlAn4 OR Bracken) to Pavian
βœ… Samples: ERR2231567 through ERR2231572 (fermentation timepoints)


Questions to Answer

Question 1: Unclassified Reads

What percentage of reads are unclassified at the beginning (ERR2231567) vs. end (ERR2231572) of fermentation? What does this pattern suggest? β€”

Question 2: Dominant Families

What are the 2 most abundant bacterial families at the END of fermentation (ERR2231572)?


Question 3: Lactobacillaceae Dynamics

How does Lactobacillaceae relative abundance change from beginning (ERR2231567) to end (ERR2231572)?


Question 4: Dominant Genus

Which genus dominates throughout fermentation? (Check all 6 samples at genus level)


Question 5: Lactiplantibacillus Appearance

Find Lactiplantibacillus in later samples (ERR2231571-572). When does it first appear at >1% abundance?

Additional Resources

πŸ“– Pavian GitHub: https://github.com/fbreitwieser/pavian
πŸ“– Pavian Paper: Breitwieser & Salzberg (2020) Bioinformatics


Previous submodule:
Next submodule: