Skip to main content

image

Citation

Please cite me if PGAP2 helped you in any way:

Bu, C., Zhang, H., Zhang, F. et al. PGAP2: A comprehensive toolkit for prokaryotic pan-genome analysis based on fine-grained feature networks. Nat Commun 16, 9865 (2025). https://doi.org/10.1038/s41467-025-64846-5

In Brief

PGAP2 (Pan-Genome Analysis Pipeline 2) is an ultra-fast and comprehensive toolkit for prokaryotic pan-genome analysis. Powered by a Fine-Grained Feature Network, PGAP2 can construct a pan-genome map from 1,000 genomes within 20 minutes while ensuring high accuracy. In addition, it offers a rich set of upstream quality control modules and downstream analysis tools to support common pan-genome analyses.

Quick start

Basic usage

The input directory contains all the genome and annotation files.

PGAP2 supports multiple input formats: GFF files in the same format as those output by Prokka, GFF files with their corresponding genome FASTA files in separate files, GenBank flat files (GBFF), or just genome FASTA files (with --annot required).

Different formats of input files can be mixed in one input directory. PGAP2 will recognize and process them based on their prefixes and suffixes.

pgap2 main -i inputdir/ -o outputdir/

Preprocessing

Quality checks and visualization are conducted by PGAP2 during the preprocessing step. PGAP2 generates an interactive HTML file and corresponding vector figures to help users understand their input data. The input data and pre-alignment results are stored as a pickle file for quick restarting of the same calculation step.

pgap2 prep -i inputdir/ -o outputdir/

Postprocessing

The postprocessing pipeline is performed by PGAP2. There are various submodules integrated into the postprocessing module, such as statistical analysis, single-copy tree building, population clustering, and Tajima's D test. Regardless of which submodule you want to use, you can always run it as follows:

pgap2 post [submodule] [options] -i inputdir/ -o outputdir/

The inputdir is the outputdir of main module.

PGAP2 also support statistical analysis using a PAV file indepandently:

pgap2 post profile --pav your_pav_file -o outputdir/

Installation

The best way to install full version of PGAP2 package is using conda:

conda create -n pgap2 -c bioconda pgap2

alternatively it is often faster to use the mamba solver (Recommended)

conda create -n pgap2  mamba
conda activate pgap2 
mamba install -c bioconda pgap2

Or sometimes you only want to carry out a specific function, such as partioning and don't want install too many extra softwares for fully version of PGAP2, then you can just install PGAP2:

pip install pgap2

Or via source file to get the latest version:

git clone https://github.com/bucongfan/PGAP2
pip install -e PGAP2/

And then install extra software that only necessary for a specific function by yourself.

Dependencies of PGAP2 are list below, and PGAP2 will check them whether in environment path or in pgap2/dependencies folder.

Preprocessing

Main

Postprocessing

Visulization in Preprocessing and Postprocessing modules

PGAP2 will call Rscript in your environment virable. The library should have:

  • ggpubr
  • ggrepel
  • dplyr
  • tidyr
  • patchwork
  • optparse

Detailed documentation

Please refer documentation from wiki.

Metadata

Release files for PGAP2 2.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PGAP2 2.4.1
File Size Uploaded
pgap2-2.4.1.tar.gz 6.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for PGAP2 2.4.1
File Interpreter ABI Platform
pgap2-2.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.8 MB

Release files / pgap2-2.4.1.tar.gz

Download URL pgap2-2.4.1.tar.gz
Size 6.3 MB
Tags Source
SHA-256 checksum
How to use checksums
a7020539c0e08c87e820c2d51edda39020c44a78491711e430cda76cfe6eb252
BLAKE2b-256 checksum
How to use checksums
a5a7d3afe8eb56bc5bdd8c6db2485745263f2f7354ae44cb94ecfec56b509308
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

Release files / pgap2-2.4.1-py3-none-any.whl

Download URL pgap2-2.4.1-py3-none-any.whl
Size 6.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
73d04b08b8094bed7672c80642cb429ba0530510045b04c98847eaf3b0ceb2c7
BLAKE2b-256 checksum
How to use checksums
e641999a06eadf9aed63ffedd37510f5e74798ddba76cb19d5aa11b09267fcfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.4.1 This release

2 release files

2.4

2 release files

2.3

2 release files

2.2

2 release files

2.0

2 release files

1.1.0

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0

2 release files

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page