Skip to content
leonarDubois edited this page Mar 4, 2020 · 16 revisions

Pangenome-based Phylogenomic Analysis

PanPhlAn is a strain-level metagenomic profiling tool for identifying the gene composition and in-vivo transcriptional activity of individual strains in metagenomic samples. PanPhlAn’s ability for strain-tracking and functional analysis of unknown pathogens makes it an efficient tool for culture-free infectious outbreak epidemiology and microbial population studies.

For a detailed tutorial with a small example dataset, see Tutorial. For help, use the bioBakery help forum.

The PanPhlAn software team: Léonard Dubois, Matthias Scholz (algorithm design), Moreno Zolfo (Roary import), Thomas Tolio (programmer), and Nicola Segata (principal investigator).

Matthias Scholz*, Doyle V. Ward*, Edoardo Pasolli*, Thomas Tolio, Moreno Zolfo, Francesco Asnicar, Duy Tin Truong, Adrian Tett, Ardythe L. Morrow, and Nicola Segata (* Equal contribution) Strain-level microbial epidemiology and population genomics from shotgun metagenomics Nature Methods, 13, 435–438, 2016.

Download the PanPhlAn software

git clone

PanPhlAn runs under Ubuntu/Linux and requires the following software tools to be installed on your system:

Add the paths of your installed tools to your .bashrc file

export PATH=/your/path/to/samtools/:$PATH
export PATH=/your/path/to/bowtie2/bowtie2-2.1.0/:$PATH
export BT2_HOME=/your/path/to/bowtie2/bowtie2-2.1.0/
export BOWTIE2_INDEXES=/your/path/to/PanPhlAn_DB/and/bowtie2_indexes/

The PanPhlAn steps

  1. Pangenome generation
    Create bowtie2 indexes for a bacterial species using references genomes and pangenome file (ChocoPhlAn export)
    ./ -c speciesname --i_fna genome-files/ -o database/

  2. PanPhlAn mapping
    Map each metagenomic sample against the species database. Example: screen for E. coli pangenome genes in sample01 and sample02 (ecoli16 database)
    ./ -c ecoli16 -i Samples/sample01.fastq -o map_results/sample01_ecoli16.csv
    ./ -c ecoli16 -i Samples/sample02.fastq -o map_results/sample02_ecoli16.csv

  3. PanPhlAn profiling
    Merge and process the mapping results for getting the final gene-family presence/absence profile matrix
    ./ -c ecoli16 -i map_results/ --o_dna result_gene_presence_absence.csv

Applications and examples

Based on shotgun metagenomic samples, PanPhlAn enables:

  • strain identification and characterization of unknown strains in metagenomic samples. The gene set of strains present in samples is detected by screening for all potential genes from the species pangenome.
  • outbreak monitoring: pathogen detection and characterization, see E. coli example below.
  • population genomics: exploring the diversity of a species based on detected strains in hundreds of samples, see E. rectale and A. muciniphila examples below.
  • strain tracking: detecting identical gene content profiles of strains in different samples
  • functional analysis: based on detected strain-specific genes, the gene sequences can be used for functional investigations using KEGG or other similar databases.
  • in-vivo transcriptional activity: with focus on genes that are specific to the individual strain in a sample (species and strain specific transcriptomics).


Characterization of the German 2011 E. coli outbreak strain

German 2011 E. coli outbreak

PanPhlAn profiling of the German outbreak metagenomes using a reference database in which the target outbreak genome is missing. (a) Hierarchical clustering. The heatmap displays presence/absence gene-family profiles of 110 reference strains (bright colored columns) and of 12 metagenomically detected strains (darker columns). Most outbreak samples cluster together due to almost identical profiles (right), with four samples (left) showing different profiles due to the presence of additional dominant E. coli strains overlying the target outbreak strain. (b) Functional analysis of outbreak-specific gene-families (Fisher exact test) confirmed that the outbreak strain is a combination of a EAEC pathogen (pAA plasmid) with acquired Shiga toxin and antibiotic resistance genes, complemented with a set of enriched virulence-related functions and pathway modules.

Exploring the populations of Eubacterium rectale and Akkermansia muciniphila

PanPhlAn E. rectale A. muciniphila

Large-scale population genomics study of E. rectale and A. muciniphila. Based on 1830 metagenomic samples from 8 cohorts, PanPhlAn reveals the subspecies structure even when only few species reference genomes are available. (a) Based on only one reference genome, E. rectale strains can be resolved into three geographically distinct clades. Clade A is related to samples of the two Chinese cohorts (bright and dark green dots). (b) Based on two available reference genomes, PanPhlAn shows a clear cluster structure of A. muciniphila strains, suggesting that the species can be distinguished into six functionally distinct clades A-F.

Version history

Version 1.3 (November 2019)

  • Designed to work with Python 3; Python 2.7 compatibility is not guaranteed.
  • Major changes in It now works using ChocoPhlan and only generates bowtie2 indexes
  • works as in the previous version. For custom database generation using usearch
  • add arguments to map genes ID to functionnal annotation data

Version 1.2.4 (March 2018)

  • Roary clustering is accepted as input for database generation (instead of usearch7 clustering)

Version 1.2.3 (September 2017)

  • gff gene-annotation files are accepted as input for database generation (instead ffn gene sequence input)

Version 1.2 (February 2016)

  • Stable release published together with the PanPhlAn paper in Nature Methods (March 2016)

Version 1.1 (July 2015)

  • gene-names are no more restricted to NCBI coding
  • set 2X as default min coverage threshold of a strain in sample

Version 1.0 (May 2015)

  • First release of PanPhlAn as used for the analysis in the PanPhlAn paper
You can’t perform that action at this time.