Skip to content

althonos/orthoani

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OrthoANI Stars

A Python implementation of the OrthoANI algorithm for nucleotide identity measurement.

Actions License Source Coverage Sanity PyPI Wheel Python Versions Python Implementations Changelog GitHub issues Downloads

🗺️ Overview

OrthoANI is a metric proposed by Lee et al. 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.

Algorithm

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 the interaction with the BLAST+ binaries.

🔧 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.