Skip to content


Repository files navigation


OrthoEvolution is an easy to use and comprehensive python package which aids in the analysis and visualization of comparative evolutionary genetics related projects such as the inference of orthologs.


This package focuses on inferring orthologs using NCBI's blast, various sequence alignment strategies, and phylogenetics analyses including PAML, PhyML, ete3, and more tools.

Ultimately, the goal of this project is to create a reusable pipeline for the inference of orthologs in order to ensure reproducibility of data as well as improve the management and analysis of (what can be) large datasets. The Cookies, Manager, Pipeline, and Tools modules act as a framework for our workflow, while the Orthologs module provides access to specific functions for our various ortholog inference projects.

View our read the docs and feel free to also read this related paper to gain more insight into this project/python package.


View the below methods for installing this package. Python3.5 and higher is required.


pip install OrthoEvol


  1. Download the zip file and unzip it or git clone
  2. cd OrthoEvolution
  3. pip install .

Development Code

WARNING : This code is actively under development and may not be reliable. Please create an issue for questions about development.

  1. Download the zip file and unzip it or git clone -b dev-master
  2. cd OrthoEvolution
  3. pip install .


Check out this tutorial in our Wiki Docs.

Also, please view examples of how to utilize this package to build tools.

Running a pre-configured local blast

from OrthoEvol.Orthologs.Blast import OrthoBlastN

# Use an existing list of gpcr genes
gpcr_blastn = OrthoBlastN(project="orthology-gpcr", method=1,
                         save_data=True, acc_file="gpcr.csv",

# Run blast

Simple project creation

from import ProjectManagement

ProjectManagement(repo="test-repo", user=None,
                  new_repo=False, new_user=False, new_project=True,

Simple blast database downloading

from OrthoEvol.Tools.ftp import NcbiFTPClient

ncbiftp = NcbiFTPClient(email='')
ncbiftp.getblastdb(database_name='refseq_rna', v5=True)

Creating projects and databases dynamically

from import ProjectManagement
from OrthoEvol.Manager.database_dispatcher import DatabaseDispatcher
from OrthoEvol.Manager.config import yml
from pkg_resources import resource_filename
from pathlib import Path
import yaml

# Set up project management
pm_config_file = resource_filename(yml.__name__, "initialize_new.yml")
with open(pm_config_file, 'r') as f:
    pm_config = yaml.load(f)
pm = ProjectManagement(**pm_config["Management_config"])

# Set up database management
db_config_file = resource_filename(yml.__name__, "databases.yml")
with open(db_config_file, 'r') as f:
    db_config = yaml.load(f)
config = db_config.update(pm_config)

# Generate main config file for this job
config_file = pm.user_log / Path("upload_config.yml")
with open(str(config_file), 'w') as cf:
    yaml.dump(config, cf, default_flow_style=False)

# Set up database dispatcher and dispatch the functions
dd = DatabaseDispatcher(config_file, pm)
dd.dispatch(dd.strategies, dd.dispatcher, dd.configuration)


To run tests, type pytest tests in the OrthoEvolution directory.

First, install the ``pytest` package using pip.


This package was created by the Datasnakes.

If you would like to contribute to this package, install the package in development mode, and check out our contributing guidelines.


We're so thankful to have a resource such as Biopython. They inspired this package.

Cock, P.J.A. et al. Biopython: freely available Python tools for computational molecular biology and bioinformatics. Bioinformatics 2009 Jun 1; 25(11) 1422-3 pmid:19304878