Personal use fork of pyhmmer (Cython bindings and Python interface to HMMER3) for implementing SEPP
Project description
pyHMMER - SEPP ver.
This is a personal fork of pyHMMER. If you are not directed here, go see the original repo: https://github.com/althonos/pyhmmer/, and all credits go to the original author.
Below is the original README, and this README does not apply here.
🗺️ Overview
HMMER is a biological sequence analysis tool that uses profile hidden Markov models to search for sequence homologs. HMMER3 is maintained by members of the the Eddy/Rivas Laboratory at Harvard University.
pyhmmer
is a Python module, implemented using the Cython
language, that provides bindings to HMMER3. It directly interacts with the
HMMER internals, which has the following advantages over CLI wrappers
(like hmmer-py
):
- single dependency: If your software or your analysis pipeline is
distributed as a Python package, you can add
pyhmmer
as a dependency to your project, and stop worrying about the HMMER binaries being properly setup on the end-user machine. - no intermediate files: Everything happens in memory, in Python objects
you have control on, making it easier to pass your inputs to HMMER without
needing to write them to a temporary file. Output retrieval is also done
in memory, via instances of the
pyhmmer.plan7.TopHits
class. - no input formatting: The Easel object model is exposed in the
pyhmmer.easel
module, and you have the possibility to build aSequence
object yourself to pass to the HMMER pipeline. This is useful if your sequences are already loaded in memory, for instance because you obtained them from another Python library (such as Pyrodigal or Biopython). - no output formatting: HMMER3 is notorious for its numerous output files
and its fixed-width tabular output, which is hard to parse (even
Bio.SearchIO.HmmerIO
is struggling on some sequences). - efficient: Using
pyhmmer
to launchhmmsearch
on sequences and HMMs in disk storage is typically faster than directly using thehmmsearch
binary (see the Benchmarks section).pyhmmer.hmmer.hmmsearch
uses a different parallelisation strategy compared to thehmmsearch
binary from HMMER, which helps getting the most of multiple CPUs.
This library is still a work-in-progress, and in an experimental stage,
but it should already pack enough features to run biological analyses
involving hmmsearch
or phmmer
.
🔧 Installing
pyhmmer
can be installed from PyPI,
which hosts some pre-built CPython wheels for x86-64 Linux, as well as the
code required to compile from source with Cython:
$ pip install pyhmmer
Compilation for UNIX PowerPC is not tested in CI, but should work out of the box. Other architectures (e.g. Arm) and OSes (e.g. Windows) are not supported by HMMER.
A Bioconda package is also available:
$ conda install -c bioconda pyhmmer
📖 Documentation
A complete API reference can
be found in the online documentation, or
directly from the command line using
pydoc
:
$ pydoc pyhmmer.easel
$ pydoc pyhmmer.plan7
💡 Example
Use pyhmmer
to run hmmsearch
, and obtain an iterable over
TopHits
that can be used for further sorting/querying in Python:
import pyhmmer
with pyhmmer.easel.SequenceFile("938293.PRJEB85.HG003687.faa") as file:
alphabet = file.guess_alphabet()
sequences = [seq.digitize(alphabet) for seq in file]
with pyhmmer.plan7.HMMFile("Pfam.hmm") as hmms:
all_hits = list(pyhmmer.hmmsearch(hmms, sequences_file, cpus=4))
Processing happens in parallel using Python threads, and a TopHits
object is yielded for every HMM
passed in the input iterable.
💭 Feedback
⚠️ Issue Tracker
Found a bug ? Have an enhancement request ? Head over to the GitHub issue tracker if you need to report or ask something. If you are filing in on a bug, please include as much information as you can about the issue, and try to recreate the same bug in a simple, easily reproducible situation.
🏗️ Contributing
Contributions are more than welcome! See CONTRIBUTING.md
for more details.
⏱️ Benchmarks
Benchmarks were run on a i7-10710U CPU running 1.10GHz with 6 physical / 12
logical cores, using a FASTA file containing 2100 protein sequences extracted
from the genome of Anaerococcus provencensis
(938293.PRJEB85.HG003687.faa
)
and the version 33.1 of the Pfam HMM library containing
18,259 domains. Commands were run 4 times on a warm SSD. Plain lines show
the times for pressed HMMs, and dashed-lines the times for HMMs in text format.
Raw numbers can be found in the benches
folder.
They suggest that phmmer
should be run with the number of logical cores,
while hmmsearch
should be run with the number of physical cores (or less).
A possible explanation for this observation would be that HMMER
platform-specific code requires too many SIMD
registers per thread to benefit from simultaneous multi-threading.
🔍 See Also
If despite of all the advantages listed earlier, you would rather use HMMER through its CLI,
this package will not be of great help. You should then check the
hmmer-py
package developed
by Danilo Horta at the EMBL-EBI.
⚖️ License
This library is provided under the MIT License.
The HMMER3 and Easel code is available under the
BSD 3-clause license.
See vendor/hmmer/LICENSE
and vendor/easel/LICENSE
for more information.
This project is in no way not affiliated, sponsored, or otherwise endorsed by the original HMMER authors. It was developed by Martin Larralde during his PhD project at the European Molecular Biology Laboratory in the Zeller team.
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 Distributions
File details
Details for the file pyhmmer_sepp-0.3.4.tar.gz
.
File metadata
- Download URL: pyhmmer_sepp-0.3.4.tar.gz
- Upload date:
- Size: 2.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e07f5d4b3d6a8d0265315a5ae069b0decee0770b1f2999c6a337f59c11a0ed7c |
|
MD5 | 3565db3b578dab07f4ca4d00b7e779d7 |
|
BLAKE2b-256 | ceab79db0040a47155b9b0e534acfe98c557bd1ec7582645cfbb3b4d7d2d5a9e |
File details
Details for the file pyhmmer_sepp-0.3.4-pp37-pypy37_pp73-manylinux2010_x86_64.whl
.
File metadata
- Download URL: pyhmmer_sepp-0.3.4-pp37-pypy37_pp73-manylinux2010_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: PyPy, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc83cb5497468774bfd80de0e5f353ce75954ffc2c115b1f74d8012cb16c5997 |
|
MD5 | 00f933c218d8fe133edd52068c804911 |
|
BLAKE2b-256 | 681556443a656dfe299dba93ed2d068dd24d322f5b34e3e3d187c8a9289e46aa |
File details
Details for the file pyhmmer_sepp-0.3.4-pp37-pypy37_pp73-manylinux1_x86_64.whl
.
File metadata
- Download URL: pyhmmer_sepp-0.3.4-pp37-pypy37_pp73-manylinux1_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: PyPy
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0a3e02e7382a27fa9cc6e791e0da4f91b5aaf65bd0e2cee8212552164e70ddb |
|
MD5 | 7e3c2cd8016eb227622ae52f78a5d140 |
|
BLAKE2b-256 | d95f4e4c6f3be847380de932db1123845acb63323ca3c38174506e5a5fa16723 |
File details
Details for the file pyhmmer_sepp-0.3.4-pp37-pypy37_pp73-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: pyhmmer_sepp-0.3.4-pp37-pypy37_pp73-macosx_10_7_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: PyPy, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36e9fb1425b270b13d0238d81a77d07c8aa00bbc0579781ef971205d6653543c |
|
MD5 | b66baa689dbcce8d337ce93f96356e44 |
|
BLAKE2b-256 | 63bc643f2aacaace1d7e40aa786e161cc770b73402c6c54b76a4ffa4ede09cde |
File details
Details for the file pyhmmer_sepp-0.3.4-pp36-pypy36_pp73-manylinux2010_x86_64.whl
.
File metadata
- Download URL: pyhmmer_sepp-0.3.4-pp36-pypy36_pp73-manylinux2010_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: PyPy, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8dcf9b59503a312129af98ccd1722995fee69c88673a694f52acc387964fe1e |
|
MD5 | ead0bf4f2f56646e847849e6d1040b9c |
|
BLAKE2b-256 | b83d18c72b11235fc8373f125876592ced20dbfaae33901e72c77d9f8af495c2 |
File details
Details for the file pyhmmer_sepp-0.3.4-pp36-pypy36_pp73-manylinux1_x86_64.whl
.
File metadata
- Download URL: pyhmmer_sepp-0.3.4-pp36-pypy36_pp73-manylinux1_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: PyPy
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d786e6d380ff7278a6b7d46838571185d3e42c7e6d1f7e03cceed34bd5ab4448 |
|
MD5 | 3c6d042fc3e6328cb34305790555c990 |
|
BLAKE2b-256 | fdecdc707ada32ffd5c841b5a339b253e94ed3488e3d599d6c633e247c4d197c |
File details
Details for the file pyhmmer_sepp-0.3.4-pp36-pypy36_pp73-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: pyhmmer_sepp-0.3.4-pp36-pypy36_pp73-macosx_10_7_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: PyPy, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa39ce9fb4f7ab019a011837f29a421505212849c46bf1884e50729cf8f86f22 |
|
MD5 | fdd2502f6803130a5e764b4408bd566f |
|
BLAKE2b-256 | ce73197eb250fb6356ed364c0f687eac74b07a10b440d49388869f1f6e90ff70 |
File details
Details for the file pyhmmer_sepp-0.3.4-cp39-cp39-manylinux2010_x86_64.whl
.
File metadata
- Download URL: pyhmmer_sepp-0.3.4-cp39-cp39-manylinux2010_x86_64.whl
- Upload date:
- Size: 4.8 MB
- Tags: CPython 3.9, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88baaa8c952efe7b21a3287cfd7c619ae7bcecb6078868c5b7c5cba051d5f4e7 |
|
MD5 | 5efa9a73cf82fea151896250e67d35ad |
|
BLAKE2b-256 | 88d042eb604aab90472c763587c973d41c7c3729554627e58a454688d8d6f8f8 |
File details
Details for the file pyhmmer_sepp-0.3.4-cp39-cp39-manylinux1_x86_64.whl
.
File metadata
- Download URL: pyhmmer_sepp-0.3.4-cp39-cp39-manylinux1_x86_64.whl
- Upload date:
- Size: 4.8 MB
- Tags: CPython 3.9
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9febe941217db521f0251e57df62501d16d0bdc736bf892aea9873e570f2da89 |
|
MD5 | 7a4cd0ceb8620f5d3fddb9a0c0a7812f |
|
BLAKE2b-256 | c6bffbfb2408a326354550413456f01afab684cdde3ce1d49265816d37c1a5c9 |
File details
Details for the file pyhmmer_sepp-0.3.4-cp39-cp39-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: pyhmmer_sepp-0.3.4-cp39-cp39-macosx_10_14_x86_64.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.9, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ec5472f1bfe27c70725da2f501feac3a30f15c30d595bd83b21b959126e4bee |
|
MD5 | ff9a677175059fba5f772ffb55ab973e |
|
BLAKE2b-256 | 424e1d396ef0fcd18e3a4952b664948296aff796668192ac0cbf45fc77bc4f68 |
File details
Details for the file pyhmmer_sepp-0.3.4-cp38-cp38-manylinux2010_x86_64.whl
.
File metadata
- Download URL: pyhmmer_sepp-0.3.4-cp38-cp38-manylinux2010_x86_64.whl
- Upload date:
- Size: 5.0 MB
- Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c8856fe2e1309ba071c2febe5b52e602f29b230ade3a08a79dd1e4065ecbb7b |
|
MD5 | d5cb40b734a00e5d26e3c4be2aa957b4 |
|
BLAKE2b-256 | de78e0b146cdd2cdff6f60e10afff10b40df1a5cf9745fa29106fff0154b1772 |
File details
Details for the file pyhmmer_sepp-0.3.4-cp38-cp38-manylinux1_x86_64.whl
.
File metadata
- Download URL: pyhmmer_sepp-0.3.4-cp38-cp38-manylinux1_x86_64.whl
- Upload date:
- Size: 5.0 MB
- Tags: CPython 3.8
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5aed64af17985a6e944ae405bb194de7afd654854e343f11d0b5e8b69972088c |
|
MD5 | af20665a903160988cfef221257ab560 |
|
BLAKE2b-256 | f148bbce696c92b71e218bbb66f8df72f0269a466a9657de73a2fcd2813dcb69 |
File details
Details for the file pyhmmer_sepp-0.3.4-cp38-cp38-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: pyhmmer_sepp-0.3.4-cp38-cp38-macosx_10_14_x86_64.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.8, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a16c613e40651d6440e85ac8da0fb9a06d87eb3fd9f4c78f9dfacf40664dfac |
|
MD5 | c41608d21843bfd4593a89ccf694d0b5 |
|
BLAKE2b-256 | 1cea387bae1ef2e1e72b4f5a233aa4579c578d4e12bdac26f610a1ab9ddf00bc |
File details
Details for the file pyhmmer_sepp-0.3.4-cp37-cp37m-manylinux2010_x86_64.whl
.
File metadata
- Download URL: pyhmmer_sepp-0.3.4-cp37-cp37m-manylinux2010_x86_64.whl
- Upload date:
- Size: 4.6 MB
- Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17bcaa183b9ad0421aaea5e5ac0d09c9106161b37f99ffbe2f189c7f4a3c99ed |
|
MD5 | 089706bf6d3bfbde6a9833e9763de364 |
|
BLAKE2b-256 | 6a7156f9a3701933a91861001dd3b4a1f4176d6a2ed6b5e228c06e468f29669d |
File details
Details for the file pyhmmer_sepp-0.3.4-cp37-cp37m-manylinux1_x86_64.whl
.
File metadata
- Download URL: pyhmmer_sepp-0.3.4-cp37-cp37m-manylinux1_x86_64.whl
- Upload date:
- Size: 4.6 MB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 545a52694a454b039a54859246ac5c37622c7bc6b116c25c5bab6708d3a2acb9 |
|
MD5 | d59a4d39fea36f53487250e556b954b1 |
|
BLAKE2b-256 | 98be7bac98104fd8c7d22b6f958d633c0552b730af755ea5b29a9c4d66577a74 |
File details
Details for the file pyhmmer_sepp-0.3.4-cp37-cp37m-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: pyhmmer_sepp-0.3.4-cp37-cp37m-macosx_10_14_x86_64.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.7m, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33dda0de98833eafee2f2284784995c08306b2239bd9a137b19deb658971980d |
|
MD5 | 8b291bbaf439f8a24c5e681bb50b6368 |
|
BLAKE2b-256 | f9896eba432f5f78208b4e172d67600f340e5985229884d88130e74336b8ae5d |
File details
Details for the file pyhmmer_sepp-0.3.4-cp36-cp36m-manylinux2010_x86_64.whl
.
File metadata
- Download URL: pyhmmer_sepp-0.3.4-cp36-cp36m-manylinux2010_x86_64.whl
- Upload date:
- Size: 4.6 MB
- Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d7864acba49cbe25463b27fd2ab33935a5b6dee1cd40d4041b5e349801747fd |
|
MD5 | 8e9ebdc1d6faad6887f4c61bac62363f |
|
BLAKE2b-256 | 32d5393197a7ff0adf553aa6baffff3878e0a6cf7465e08c4ad411fba78a6170 |
File details
Details for the file pyhmmer_sepp-0.3.4-cp36-cp36m-manylinux1_x86_64.whl
.
File metadata
- Download URL: pyhmmer_sepp-0.3.4-cp36-cp36m-manylinux1_x86_64.whl
- Upload date:
- Size: 4.6 MB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5e561d4f0e9c340df4b6b9c44c2aca250a81dba68c65fa86350be7d9c177130 |
|
MD5 | a0d27b1d5156654f069f162370ebb9cc |
|
BLAKE2b-256 | e0674320f47cf2e266f7486646feb1c321d914729056865ceece3daa19711e03 |
File details
Details for the file pyhmmer_sepp-0.3.4-cp36-cp36m-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: pyhmmer_sepp-0.3.4-cp36-cp36m-macosx_10_14_x86_64.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.6m, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 262bef28fb2b063f34f1aca1a8afe6a0d08a9660759983ded79b5346afd602d1 |
|
MD5 | 912eed01fa30e77da7285dfa4cb9473c |
|
BLAKE2b-256 | 2c62984a8a32fa1d62f97c99443c7f6a5e8743bda05b4ac747c505c9ed1112af |