Skip to content

JLSteenwyk/orthohmm

Repository files navigation

Logo

Docs · Report Bug · Request Feature


OrthoHMM infers gene orthology using Hidden Markov Models.

If you found orthohmm useful, please cite OrthoHMM: Improved Inference of Ortholog Groups using Hidden Markov Models. Steenwyk et al. 2024, bioRxiv. doi: 10.1101/2024.12.07.627370.


Performance

As of v0.2.0, OrthoHMM ships a built-in profile HMM + k-mer prefilter search engine that replaces the phmmer subprocess. It scales to 100 bacterial proteomes (~352K total proteins) on a single 32-core node:

proteomes wall time peak RAM orthogroups
5 13s 0.29 GB 1,196
20 4 min 0.44 GB 8,680
60 28 min 1.65 GB 19,029
100 77 min 4.67 GB 27,328

Numbers from the bacterial scaling benchmark (RefSeq, 32 threads, 1 TB node). The legacy phmmer path is still available via --search_mode phmmer but is no longer the default.

Clustering step. v0.5.0 uses MCL with inflation=1.5 as the default clustering algorithm. We evaluated MCL@1.5 vs Leiden CPM (cpm=0.1, the v0.3.x default) vs Leiden CPM with auto-tuned γ across three benchmarks spanning closely-related to cross-kingdom proteomes. MCL@1.5 is the only choice that never fails: Leiden cpm=0.1 collapses to all-singletons on cross-kingdom inputs (Three Kingdoms benchmark, F=0.0003) and auto-tuned Leiden over-merges on mixed-domain inputs (QfO functional metrics drop). MCL@1.5 trails the best Leiden setting by ~3 pp on closely-related sets but is robust across the full diversity range.

Power users can still opt into Leiden via --clustering leiden --cpm_resolution {auto, <float>}.



This documentation covers downloading and installing OrthoHMM. Details about each function as well as tutorials for using OrthoHMM are available in the online documentation.


Quick Start

1. Install external dependencies

OrthoHMM has one required external binary — mcl — used for the default clustering step. Install via your package manager (apt install mcl, brew install mcl, conda install -c bioconda mcl) or from source.

HMMER is optional and only required if you opt into the legacy --search_mode phmmer pipeline; the default built-in search engine has no HMMER dependency. If you'd rather avoid mcl entirely, --clustering leiden --cpm_resolution auto uses pure-Python igraph/leidenalg and gives competitive results on most inputs (see Performance).


2. Install OrthoHMM

# install
pip install orthohmm 
# run
orthohmm <path_to_directory_of_FASTA_files>

Installation

If you are having trouble installing OrthoHMM, please contact the lead developer, Jacob L. Steenwyk, via email or Bluesky to get help.

1. Install external dependencies

OrthoHMM has one required external binary — mcl — used for the default clustering step. Install via your package manager (apt install mcl, brew install mcl, conda install -c bioconda mcl) or from source.

HMMER is optional and only required if you opt into the legacy --search_mode phmmer pipeline; the default built-in search engine has no HMMER dependency. If you'd rather avoid mcl entirely, --clustering leiden --cpm_resolution auto uses pure-Python igraph/leidenalg and gives competitive results on most inputs (see Performance).


2a. Install OrthoHMM from pip

To install using pip, we recommend building a virtual environment to avoid software dependency issues. To do so, execute the following commands:

# create virtual environment
python -m venv venv
# activate virtual environment
source venv/bin/activate
# install orthohmm
pip install orthohmm

Note, the virtual environment must be activated to use orthohmm.

After using OrthoHMM, you may wish to deactivate your virtual environment and can do so using the following command:

# deactivate virtual environment
deactivate

2b. Install OrthoHMM from source

Similarly, to install from source, we recommend using a virtual environment. To do so, use the following commands:

# download
git clone https://github.com/JLSteenwyk/orthohmm.git
cd orthohmm/
# create virtual environment
python -m venv venv
# activate virtual environment
source venv/bin/activate
# install
make install

To deactivate your virtual environment, use the following command:

# deactivate virtual environment
deactivate

Note, the virtual environment must be activated to use orthohmm.

About

Improved Inference of Ortholog Groups using Hidden Markov Models

Resources

License

Stars

39 stars

Watchers

2 watching

Forks

Packages

 
 
 

Contributors