A Python implementation of the OrthoANI algorithm for nucleotide identity measurement.
Project description
(Py)OrthoANI
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.
This project 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:
$ pip install orthoani
orthoani
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:
import orthoani
from Bio.SeqIO import read
genome_1 = read("sequence1.fa", "fasta")
genome_2 = read("sequence2.fa", "fasta")
ani = orthoani.orthoani(genome_1, genome_2)
orthoani
can also be used from the CLI using a very simple command-line
interface:
$ orthoani -q sequence1.fa -r sequence2.fa
0.5725
🐏 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.
📜 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file orthoani-0.6.0.tar.gz
.
File metadata
- Download URL: orthoani-0.6.0.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4549f5b844c7540e09db0937d095322b92b7bda534362d23bf5864cb1b6b01a5 |
|
MD5 | 90f13b8ddf80b60d615477cacbdbdf43 |
|
BLAKE2b-256 | 4c7021b613818c4a979f5655d2b6cc10857db63676a9e3d87c073392d87f49e2 |
Provenance
The following attestation bundles were made for orthoani-0.6.0.tar.gz
:
Publisher:
publish.yml
on althonos/orthoani
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
orthoani-0.6.0.tar.gz
- Subject digest:
4549f5b844c7540e09db0937d095322b92b7bda534362d23bf5864cb1b6b01a5
- Sigstore transparency entry: 147045372
- Sigstore integration time:
- Predicate type:
File details
Details for the file orthoani-0.6.0-py2.py3-none-any.whl
.
File metadata
- Download URL: orthoani-0.6.0-py2.py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 303db121e92a707154c99a1cea08217e7bc4499d59569eb30313427fdf06b96e |
|
MD5 | b33f6a6338fca91b3ee0ab48e4901464 |
|
BLAKE2b-256 | e3878c1ed0e7a9ad0500a11892a00b59df54877cc780116c88738b4908d4f67d |
Provenance
The following attestation bundles were made for orthoani-0.6.0-py2.py3-none-any.whl
:
Publisher:
publish.yml
on althonos/orthoani
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
orthoani-0.6.0-py2.py3-none-any.whl
- Subject digest:
303db121e92a707154c99a1cea08217e7bc4499d59569eb30313427fdf06b96e
- Sigstore transparency entry: 147045374
- Sigstore integration time:
- Predicate type: