Package: pyhmmer-sepp
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.🗺️ OverviewHMMER is a biological sequence analysis tool that uses profile hidden Markov
models to search for sequence homologs. HMMER3 is maintained by members of the
theEddy/Rivas Laboratoryat Harvard University.pyhmmeris a Python module, implemented using theCythonlanguage, that provides bindings to HMMER3. It directly interacts with the
HMMER internals, which has the following advantages over CLI wrappers
(likehmmer-py):single dependency: If your software or your analysis pipeline is
distributed as a Python package, you can addpyhmmeras 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 thepyhmmer.plan7.TopHitsclass.no input formatting: The Easel object model is exposed in thepyhmmer.easelmodule, and you have the possibility to build aSequenceobject 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 asPyrodigalorBiopython).no output formatting: HMMER3 is notorious for its numerous output files
and its fixed-width tabular output, which is hard to parse (evenBio.SearchIO.HmmerIOis struggling on some sequences).efficient: Usingpyhmmerto launchhmmsearchon sequences
and HMMs in disk storage is typically faster than directly using thehmmsearchbinary (see theBenchmarks section).pyhmmer.hmmer.hmmsearchuses a different parallelisation strategy compared to
thehmmsearchbinary 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
involvinghmmsearchorphmmer.🔧 Installingpyhmmercan be installed fromPyPI,
which hosts some pre-built CPython wheels for x86-64 Linux, as well as the
code required to compile from source with Cython:$pipinstallpyhmmerCompilation 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.ABiocondapackage is also available:$condainstall-cbiocondapyhmmer📖 DocumentationA completeAPI referencecan
be found in theonline documentation, or
directly from the command line usingpydoc:$pydocpyhmmer.easel$pydocpyhmmer.plan7💡 ExampleUsepyhmmerto runhmmsearch, and obtain an iterable overTopHitsthat can be used for further sorting/querying in Python:importpyhmmerwithpyhmmer.easel.SequenceFile("938293.PRJEB85.HG003687.faa")asfile:alphabet=file.guess_alphabet()sequences=[seq.digitize(alphabet)forseqinfile]withpyhmmer.plan7.HMMFile("Pfam.hmm")ashmms:all_hits=list(pyhmmer.hmmsearch(hmms,sequences_file,cpus=4))Processing happens in parallel using Python threads, and aTopHitsobject is yielded for everyHMMpassed in the input iterable.💭 Feedback⚠️ Issue TrackerFound a bug ? Have an enhancement request ? Head over to theGitHub issue
trackerif 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.🏗️ ContributingContributions are more than welcome! SeeCONTRIBUTING.mdfor more details.⏱️ BenchmarksBenchmarks were run on ai7-10710U CPUrunning 1.10GHz with 6 physical / 12
logical cores, using a FASTA file containing 2100 protein sequences extracted
from the genome ofAnaerococcus provencensis(938293.PRJEB85.HG003687.faa)
and the version 33.1 of thePfamHMM 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 thebenchesfolder.
They suggest thatphmmershould be run with the number oflogicalcores,
whilehmmsearchshould be run with the number ofphysicalcores (or less).
A possible explanation for this observation would be that HMMER
platform-specific code requires too manySIMDregisters per thread to benefit fromsimultaneous multi-threading.🔍 See AlsoIf 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 thehmmer-pypackage developed
byDanilo Hortaat theEMBL-EBI.⚖️ LicenseThis library is provided under theMIT License.
The HMMER3 and Easel code is available under theBSD 3-clauselicense.
Seevendor/hmmer/LICENSEandvendor/easel/LICENSEfor more information.This project is in no way not affiliated, sponsored, or otherwise endorsed by
theoriginal HMMER authors. It was developed byMartin Larraldeduring his PhD project
at theEuropean Molecular Biology Laboratoryin
theZeller team.