pyorthoani
A Python implementation of the OrthoANI algorithm for nucleotide identity measurement.
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 8 DOI reference(s) in README -
✓Academic publication links
Links to: pubmed.ncbi, ncbi.nlm.nih.gov -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.7%) to scientific vocabulary
Keywords
Repository
A Python implementation of the OrthoANI algorithm for nucleotide identity measurement.
Basic Info
- Host: GitHub
- Owner: althonos
- License: mit
- Language: Python
- Default Branch: master
- Size: 2.23 MB
Statistics
- Stars: 31
- Watchers: 3
- Forks: 4
- Open Issues: 0
- Releases: 11
Topics
Metadata Files
README.md
PyOrthoANI 
A Python implementation of the OrthoANI algorithm for nucleotide identity measurement.
🗺️ Overview
OrthoANI is a metric proposed by Lee et al.[1] in 2016 to improve computation of Average Nucleotide Identity. It uses BLASTn to find orthologous blocks in a pair of sequences, and then computes the average identity only considering alignments of reciprocal orthologs.

PyOrthoANI is a reimplementation of the closed-source Java implementation
provided by the authors on ezbiocloud.net.
It relies on Biopython to handle the I/O, and calls
the BLAST+ binaries using the subprocess module of the Python standard
library.
🔧 Installing
Installing with pip is the easiest:
console
$ pip install pyorthoani
PyOrthoANI also requires the BLAST+ binaries to be installed on your machine
and available somewhere in your $PATH.
💡 Example
Use Biopython to load two FASTA files, and then orthoani.orthoani to compute
the OrthoANI metric between them:
```python
import pyorthoani
from Bio.SeqIO import read
genome1 = read("sequence1.fa", "fasta") genome2 = read("sequence2.fa", "fasta")
ani = pyorthoani.orthoani(genome1, genome2) ```
pyorthoani can also be used from the CLI using a very simple command-line
interface mimicking the original Java tool:
console
$ pyorthoani -q sequence1.fa -r sequence2.fa
57.25
🐏 Memory
orthoani uses the machine temporary folder to handle BLAST+ input and output
files, which is configurable through
tempfile.tempdir.
On some systems (like ArchLinux), this filesystem can reside in memory, which means
that your computer could have trouble processing very large files. If this
happens, try changing the value of the tempfile.tempdir to a directory that
is actually located on physical storage.
📏 Precision
Values computed by this package and the original Java implementation may differ slightly because in Java the authors perform rounding of floating-point values at the sub-percent level, while this library uses the full values.
🔖 Citation
If you found PyOrthoANI useful, please cite our paper, as well as the original OrthoANI paper.
To cite PyOrthoANI:
Martin Larralde, Georg Zeller, Laura M. Carroll. 2025. PyOrthoANI, PyFastANI, and Pyskani: a suite of Python libraries for computation of average nucleotide identity. NAR Genomics and Bioinformatics 7(3):lqaf095. doi:10.1093/nargab/lqaf095.
To cite OrthoANI:
Imchang Lee, Yeong Ouk Kim, Sang-Cheol Park, Jongsik Chun. 2016. OrthoANI: An improved algorithm and software for calculating average nucleotide identity. International Journal of Systematic and Evolutionary Microbiology 66(2):1100-1103. doi:10.1099/ijsem.0.000760.
📜 About
This library is provided under the open-source MIT license.
This project is in no way not affiliated, sponsored, or otherwise endorsed by the original OrthoANI authors. It was developed by Martin Larralde during his PhD project at the European Molecular Biology Laboratory in the Zeller team.
📚 References
- [1] Imchang Lee, Yeong Ouk Kim, Sang-Cheol Park and Jongsik Chun. OrthoANI: An improved algorithm and software for calculating average nucleotide identity (2016). International Journal of Systematic and Evolutionary Microbiology. doi:10.1099/ijsem.0.000760. PMID:26585518.
Owner
- Name: Martin Larralde
- Login: althonos
- Kind: user
- Location: Heidelberg, Germany
- Company: EMBL / LUMC, @zellerlab
- Twitter: althonos
- Repositories: 91
- Profile: https://github.com/althonos
PhD candidate in Bioinformatics, passionate about programming, SIMD-enthusiast, Pythonista, Rustacean. I write poems, and sometimes they are executable.
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: PyOrthoANI
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Martin
family-names: Larralde
email: martin.larralde@embl.de
affiliation: Leiden University Medical Center
orcid: 'https://orcid.org/0000-0002-3947-4444'
- given-names: Georg
family-names: Zeller
affiliation: Leiden University Medical Center
orcid: 'https://orcid.org/0000-0003-1429-7485'
- given-names: Laura
name-particle: M.
family-names: Carroll
affiliation: Umeå University
orcid: 'https://orcid.org/0000-0002-3677-0192'
identifiers:
- type: doi
value: 10.1101/2025.02.13.638148
description: bioRxiv preprint
- type: doi
value: 10.1093/nargab/lqaf095
description: NAR Genomics & Bioinformatics paper
repository-code: 'https://github.com/althonos/pyorthoani'
abstract: >-
The average nucleotide identity (ANI) metric has become
the gold standard for prokaryotic species delineation in
the genomics era. The most popular ANI algorithms are
available as command-line tools and/or web applications,
making it inconvenient or impossible to incorporate them
into bioinformatic workflows, which utilize the popular
Python programming language. Here, we present PyOrthoANI,
PyFastANI, and Pyskani, Python libraries for three popular
ANI computation methods. ANI values produced by
PyOrthoANI, PyFastANI, and Pyskani are virtually identical
to those produced by OrthoANI, FastANI, and skani,
respectively. All three libraries integrate seamlessly
with BioPython, making it easy and convenient to use,
compare, and benchmark popular ANI algorithms within
Python-based workflows.
keywords:
- python
- library
- average nucleotide identity
- ANI
license: MIT
preferred-citation:
type: article
authors:
- given-names: Martin
family-names: Larralde
email: martin.larralde@embl.de
affiliation: Leiden University Medical Center
orcid: 'https://orcid.org/0000-0002-3947-4444'
- given-names: Georg
family-names: Zeller
affiliation: Leiden University Medical Center
orcid: 'https://orcid.org/0000-0003-1429-7485'
- given-names: Laura
name-particle: M.
family-names: Carroll
affiliation: Umeå University
orcid: 'https://orcid.org/0000-0002-3677-0192'
doi: "10.1093/nargab/lqaf095"
journal: "NAR Genomics and Bioinformatics"
volume: 7
issue: 3
title: "PyOrthoANI, PyFastANI, and Pyskani: a suite of Python libraries for computation of average nucleotide identity"
year: 2025
month: 9
GitHub Events
Total
- Release event: 1
- Watch event: 8
- Push event: 6
- Pull request event: 1
- Fork event: 1
- Create event: 1
Last Year
- Release event: 1
- Watch event: 8
- Push event: 6
- Pull request event: 1
- Fork event: 1
- Create event: 1
Committers
Last synced: 10 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Martin Larralde | m****e@e****r | 106 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 3
- Total pull requests: 0
- Average time to close issues: 6 months
- Average time to close pull requests: N/A
- Total issue authors: 3
- Total pull request authors: 0
- Average comments per issue: 0.67
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 0
- Average time to close issues: 9 days
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 1.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- Anenovaes (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 126 last-month
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 1
(may contain duplicates) - Total versions: 13
- Total maintainers: 2
pypi.org: orthoani
A Python implementation of the OrthoANI algorithm for nucleotide identity measurement. (renamed to pyorthoani)
- Documentation: https://orthoani.readthedocs.io/
- License: MIT License
-
Latest release: 0.7.0
published 12 months ago
Rankings
pypi.org: pyorthoani
A Python implementation of the OrthoANI algorithm for nucleotide identity measurement.
- Documentation: https://pyorthoani.readthedocs.io/
- License: MIT License Copyright (c) 2020-2025 Martin Larralde Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
Latest release: 0.7.0
published 12 months ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v4 composite
- actions/setup-python v5 composite
- pypa/gh-action-pypi-publish release/v1 composite
- rasmus-saks/release-a-changelog-action v1.2.0 composite
- actions/checkout v1 composite
- actions/setup-python v2 composite
- codecov/codecov-action v1 composite
- biopython ~=1.73