Skip to main content

pyGCAP: a (py)thon (G)ene (C)luster (A)nnotation & (P)rofiling

A Python Package for Probe-based Gene Cluster Finding in Large Microbial Genome Database


Introduction

Bacterial gene clusters provide insights into metabolism and evolution, and facilitate biotechnological applications. We developed pyGCAP, a Python package for probe-based gene cluster discovery. This pipeline uses sequence search and analysis tools and public databases (e.g. BLAST, MMSeqs2, UniProt, and NCBI) to predict potential gene clusters by user-provided probe genes. We tested the pipeline with the division and cell wall (dcw) gene cluster, crucial for cell division and peptidoglycan biosynthesis.

To evaluate pyGCAP, we used 17 major dcw genes defined by Megrian et al. [1] as a probe set to search for gene clusters in 716 Lactobacillales genomes. The results were integrated to provide detailed information on gene content, gene order, and types of clusters. While PGCfinder examined the completeness of the gene clusters, it could also suggest novel taxa-specific accessory genes related to dcw clusters in Lactobacillales genomes. The package will be freely available on the Python Package Index, Bioconda, and GitHub.

[1] Megrian, D., et al. Ancient origin and constrained evolution of the division and cell wall gene cluster in Bacteria. Nat Microbiol 7, 2114–2127 (2022).


Pipeline-flow

flowchart


Pre-requirement

  1. Python >= 3.6

  2. conda environment

    • blast (bioconda blast package)

      conda install bioconda::blast
      conda install bioconda/label/cf201901::blast
      
    • datasets & dataformat from NCBI (conda-forge ncbi-datasets-cli package)

      conda install conda-forge::ncbi-datasets-cli
      
    • MMseqs2 (MMseqs2 github)

      conda install -c conda-forge -c bioconda mmseqs2
      
    • If you want to make a new conda environment for pygcap, follow the instructions below:

      conda create -n pygcap
      conda activate pygcap
      pip install pygcap (or) conda install bioconda::pygcap
      conda install -c conda-forge ncbi-datasets-cli
      conda install -c conda-forge -c bioconda mmseqs2
      

Usage

  • pypi pygcap (link) / bioconda pygcap (link)

    # pip install pygcap
    # conda install bioconda::pygcap
    pygcap [TAXON] [PROBE_FILE]
    
  • input argument description

    ### usage example
    pygcap Facklamia pygcap/data/probe_sample.tsv
    pygcap 66831 pygcap/data/probe_sample.tsv
    
    1. taxon (both name and taxid are available)

    2. path of probe.tsv (sample file)

      • Probe Name (user defined)
      • Prediction (user defined)
      • Accession (UniProt entry)
  • When the appropriate environment is set up, try running the following command from the root directory. If you have successfully met all the pre-requirements, it will execute correctly, and a directory named 'Facklamia' containing the test results will be created in the root directory.

    python3 test.py
    [or]
    pygcap Facklamia pygcap/data/probe_sample.tsv
    

Options

  1. --working_dir or -w (default: .): Specify the working directory path.

    pygcap [TAXON] [PROBE_FILE] —-working_dir or -w [PATH_OF_WORKING_DIRECTORY]
    
  2. --thread or -t (default: 50): Number of threads to use when running MMseqs2 and blastp. The number of threads can be adjusted automatically based on the CPU environment. It must be an integer greater than 0.

    pygcap [TAXON] [PROBE_FILE] —-thread or -t [NUMBER_OF_THREAD]
    
  3. --identity of -i (default: 0.5): The value of protein identity to be used in MMseqs2. It must be a value between 0 and 1.

    pygcap [TAXON] [PROBE_FILE] —-identity or -i [PROTEIN_IDENTITY]
    
  4. --max_target_seqs of -m (default: 500): The vaue of aligned sequences to retain in the overall BLASTP results. It must be an integergreater than 0.

    pygcap [TAXON] [PROBE_FILE] —-max_target_seqs or -m [MAX_TARGET]
    
  5. --skip of -s (default: none): Specify steps to skip during the process. Multiple steps can be skipped by using this option multiple times. This option is useful when you want to add a new probe to the same TAXON as before or when you want to change the identity option for MMseqs2.

    pygcap [TAXON] [PROBE_FILE] —-skip or -s [ARG]
    
    • all: Skip all the processes listed below.
    • ncbi: Skip downloading genome data from NCBI.
    • mmseqs2: Skip running MMseqs2.
    • parsing: Skip parsing genome data.
    • uniprot: Skip downloading probe data from UniProt.
    • blastdb: Skip running makeblastdb.

Output

  • A directory with the following structure will be created in your working directory with the name of the TAXON provided as input.

    📦 [TAXON_NAME]
    ├─ data
    │  ├─ assembly_report.tsv
    │  ├─ metadata_target.tsv
    │  └─ ...
    ├─ input
    │  ├─ [GENUS_01]
    │  ├─ [GENUS_02]
    │  └─ ...
    ├─ output
    │  ├─ genus
    │  ├─ img
    │  └─ tsv
    └─ seqlib
       ├─ blast_output.tsv
       ├─ seqlib.tsv
       └─ ...
    

Example

Profiling dcw genes from pan-genomes of Lactobacillales (LAB)

  • The following are some of the result data you can obtain through this pipeline:

    • working_directory/TAXON/output/img: A heatmap representing the dcw gene contents of Lactobacillales at the genus level.

      example1

    • working_directory/TAXON/output/geus: A plot visualizing the dcw gene order of Lactobacillales grouped by genus.

      example2

Metadata

Release files for pygcap 1.2.6

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

Source distribution (sdist)

Source distribution for pygcap 1.2.6
File Size Uploaded Provenance Actions
pygcap-1.2.6.tar.gz 26.3 kB Without provenance Details for pygcap-1.2.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pygcap 1.2.6
File Interpreter ABI Platform Actions
pygcap-1.2.6-py3-none-any.whl Python 3 none any Details for pygcap-1.2.6-py3-none-any.whl

Total release size: 56.4 kB

Release files / pygcap-1.2.6.tar.gz

Download URL pygcap-1.2.6.tar.gz
Size 26.3 kB
Tags Source
SHA-256 checksum
How to use checksums
172aa62ec82bab05713f573e7920e65bd38ace3341f4ea4b6f8f000733c3d170
BLAKE2b-256 checksum
How to use checksums
a9774eead2d17a317d1fe3056f11398dbc08db0f59ee60e6278736f36edd1743
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.5

Release files / pygcap-1.2.6-py3-none-any.whl

Download URL pygcap-1.2.6-py3-none-any.whl
Size 30.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e0315ec5224bbbcd2f3bc89380ace1ce8fe6ba7f65e41a15f5cedbcb3d202274
BLAKE2b-256 checksum
How to use checksums
a51c4e1b13d97e019fad77bb664f74b1a07a9d62a6cc4d0936d1a9e3b56d06e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.5

Security for pygcap 1.2.6

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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