Skip to main content

logo

Synteny-aware hmm searches made easy

tests codecov docs

Project Status: Active – The project has reached a stable, usable state and is being actively developed. license Contributor Covenant

PyPI version GitHub release

python Code style: black

pyOpenSci DOI

1. :bulb: What is Pynteny?

Pynteny is Python tool to search for synteny blocks in (prokaryotic) sequence data through HMMs of the ORFs of interest and HMMER. By leveraging genomic context information, Pynteny can be employed to decrease the uncertainty of functional annotation of unlabelled sequence data due to the effect of paralogs. Pynteny can be accessed (i) through the command line or (ii) as a Python module.

Get more info in the documentation pages!

Check out the Pynteny paper in the Journal of Open Source Software!

2. :wrench: Setup

Pynteny is a pure-Python package (it no longer requires conda or any external binaries). All dependencies, including the HMMER and Prodigal engines, are provided by the pip packages pyhmmer and pyrodigal.

Install with pip:

pip install pynteny

Or install the latest development version directly from GitHub:

pip install git+https://github.com/Robaina/Pynteny.git

Check that the installation worked fine:

pynteny --help

2.1. Installing on Windows

Pynteny is developed and tested on Linux, but since it is now a pure-Python package, pip install pynteny also works on Windows and macOS (including Apple Silicon / ARM64), provided wheels are available for pyhmmer and pyrodigal on your platform.

3. :rocket: Usage

Consider the following toy example of a syntenic block:

synteny example

Here, we are interested in four genes which colocate according to the pattern above: genes A-C show consecutive locations in the positive strand, followed by three (untargeted) genes and followed by gene D, which is located in the negative strand.

Pynteny can be run either as a command line tool or as a Python module. To run pynteny in the command line, execute:

pynteny <subcommand> <options>

pynyeny-cli

There are a number of available subcommands, which can be explored in the documentation pages.

For intance, to first download the PGAP's database containing a collection of profile HMMs as well as metadata:

pynteny download --outdir data/hmms --unpack

Next, to build a labelled peptide database from DNA assembly data:

pynteny build \
    --data assembly.fa \
    --outfile labelled_peptides.faa

Finally, to search the peptide database for the syntenic structure displayed above: >gene_A 0 >gene_B 0 >gene_C 3 <gene_D, and using the downloaded PGAP database:

pynteny search \
    --synteny_struc ">gene_A 0 >gene_B 0 >gene_C 3 <gene_D" \
    --data labelled_peptides.faa \
    --outdir results/ \
    --gene_ids

4. :notebook_with_decorative_cover: Examples

Here are some Jupyter Notebooks with examples to show how Pynteny works:

You can find more notebooks in the examples directory. Find more info in the documentation.

5. :arrows_counterclockwise: Dependencies

Pynteny would not work without these awesome projects:

Thanks!

6. :octocat: Contributing

Contributions are always welcome! If you don't know where to start, you may find an interesting issue to work in here. Please, read our contribution guidelines first.

7. :black_nib: Citation

If you use this software, please cite it as below:

Semidán Robaina Estévez. (2023). Pynteny: synteny-aware hmm searches made easy (Version 1.0.0). Zenodo. https://zenodo.org/record/7696204

Metadata

Release files for pynteny 1.3.0

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

Source distribution (sdist)

Source distribution for pynteny 1.3.0
File Size Uploaded
pynteny-1.3.0.tar.gz 38.7 kB Details

Built distribution (wheel)

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

Total release size: 82.8 kB

Release files / pynteny-1.3.0.tar.gz

Download URL pynteny-1.3.0.tar.gz
Size 38.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0d73c2ae4fae6a13ff944abd50c68cb4f612e809d9c8ff45980ba582cd2895a0
BLAKE2b-256 checksum
How to use checksums
7802aa4bfc725b45133151327377e1fad6030c28df91b0675a737e006437225b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 19, 2026.

Transparency log

Release files / pynteny-1.3.0-py3-none-any.whl

Download URL pynteny-1.3.0-py3-none-any.whl
Size 44.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c2f62a5f5b8120056ab9c3a12c4a952e1d8f9000a1ef9786e3e8973e6f258db8
BLAKE2b-256 checksum
How to use checksums
c29f311dd588ac598cab7d7779ec6191e8df889e5ab1f6e4e783d393df7f3188
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 19, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 release files

1.2.0

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