Cython bindings and Python interface to Infernal.
Project description
🐍 PyInfernal 
Cython bindings and Python interface to Infernal.
🗺️ Overview
Infernal is a biological sequence analysis method that uses profile stochastic context-free grammars called covariance models (CMs) to identify RNA structure and sequence similarities. Infernal was developed by Eric P. Nawrocki during his PhD thesis in the Eddy Laboratory.
pyinfernal is a Python package, implemented using the Cython
language, that provides bindings to Infernal. It directly interacts with the
Infernal internals. It builds on top of pyhmmer
and follows a generally similar interface.
This library is still very experimental and has not been thoroughly tested yet, use with caution.
🔧 Installing
pyinfernal can be installed from PyPI,
which hosts some pre-built CPython wheels for Linux and MacOS on x86-64 and Arm64, as well as the code required to compile from source with Cython:
$ pip install pyinfernal
Compilation for UNIX PowerPC is not tested in CI, but should work out of the box. Note than non-UNIX operating systems (such as Windows) are not supported by Infernal.
🔖 Citation
PyInfernal is scientific software, and builds on top of Infernal. Please cite the Infernal 1.1 application note in Bioinformatics, for instance:
PyInfernal, a Python library binding to Infernal (Nawrocki & Eddy, 2013).
Also refer to the Infernal User's Guide which contains a section about citation and reproducibility.
💡 Example
Use pyinfernal to run cmsearch to search for the genome of
Escherichia coli str. K-12 substr. MG1655 (U00096.3)
for models from RFam. This will produce an iterable
over TopHits that can be used for further sorting/querying in Python.
Processing happens in parallel using Python threads,
and a TopHits object is yielded for every CM in the input iterable.
import pyhmmer.easel
import pyinfernal.cm
import pyinfernal.infernal
rna = pyhmmer.easel.Alphabet.rna()
with pyhmmer.easel.SequenceFile("U00096.3.fna", digital=True, alphabet=rna) as seq_file:
sequences = seq_file.read_block()
with pyinfernal.cm.CMFile("RFam.cm", alphabet=rna) as cm_file:
for hits in pyinfernal.cmsearch(cm_file, sequences, cpus=4):
print(f"CM {hits.query.name} ({hits.query.accession}) found {len(hits)} hits in the target sequences")
💭 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.
⚖️ License
This library is provided under the MIT License.
The Infernal code is available under the
BSD 3-clause license.
See vendor/infernal/LICENSE for more information.
This project is in no way affiliated, sponsored, or otherwise endorsed by the original Infernal authors. It was developed by Martin Larralde during his PhD project at the Leiden University Medical Center in the Zeller Lab.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyinfernal-0.1.0.tar.gz.
File metadata
- Download URL: pyinfernal-0.1.0.tar.gz
- Upload date:
- Size: 4.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
009ee7108549ef4e4850e7f53546fd70c38857841af288829ca1f4a1a0c1ea43
|
|
| MD5 |
2a1b81c4c7048d81cd93c30a4ab5b614
|
|
| BLAKE2b-256 |
8f767f5d68284fdf09776b12ce0a892f55e1204ae576b72f46bba17dd0a7adc1
|
Provenance
The following attestation bundles were made for pyinfernal-0.1.0.tar.gz:
Publisher:
package.yml on althonos/pyinfernal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyinfernal-0.1.0.tar.gz -
Subject digest:
009ee7108549ef4e4850e7f53546fd70c38857841af288829ca1f4a1a0c1ea43 - Sigstore transparency entry: 850116131
- Sigstore integration time:
-
Permalink:
althonos/pyinfernal@764e50c165e83642ab436b5ae4ffbf17842f33b4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/althonos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yml@764e50c165e83642ab436b5ae4ffbf17842f33b4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyinfernal-0.1.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pyinfernal-0.1.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.14t, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c2e7230282abaff43d812f97dfe455cfdb2abe9edae622d785e8a1d308574bb
|
|
| MD5 |
40e4c6b7d2657c95c71756f086df692b
|
|
| BLAKE2b-256 |
5fa6928048d02cd4454ef342a39abf87aae3c8bd85766cae2645a2062538ac63
|
Provenance
The following attestation bundles were made for pyinfernal-0.1.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
package.yml on althonos/pyinfernal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyinfernal-0.1.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
7c2e7230282abaff43d812f97dfe455cfdb2abe9edae622d785e8a1d308574bb - Sigstore transparency entry: 850116141
- Sigstore integration time:
-
Permalink:
althonos/pyinfernal@764e50c165e83642ab436b5ae4ffbf17842f33b4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/althonos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yml@764e50c165e83642ab436b5ae4ffbf17842f33b4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyinfernal-0.1.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pyinfernal-0.1.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.12+, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2ebfcf9980574f94efaa6f09140e740eb92e57f2085d9f337b6982b9583926e
|
|
| MD5 |
5cb2d24314ffdbd65c7bdc4fb4d1dd8f
|
|
| BLAKE2b-256 |
71d9f7c239ee6ace98b14231128c170ac27dc23b10aa0e5610b7c12e402ec848
|
Provenance
The following attestation bundles were made for pyinfernal-0.1.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
package.yml on althonos/pyinfernal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyinfernal-0.1.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
f2ebfcf9980574f94efaa6f09140e740eb92e57f2085d9f337b6982b9583926e - Sigstore transparency entry: 850116143
- Sigstore integration time:
-
Permalink:
althonos/pyinfernal@764e50c165e83642ab436b5ae4ffbf17842f33b4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/althonos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yml@764e50c165e83642ab436b5ae4ffbf17842f33b4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyinfernal-0.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pyinfernal-0.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b36bf8c3a6d5256e9eadd41099838fa1d909d55d51bd1c2036f6db096dbc6db8
|
|
| MD5 |
bc71c8d087230f183baf35fc90ab5929
|
|
| BLAKE2b-256 |
8c369fd1b69e75631ae2d458c7ab785274b57d85962d069c845188fffb125a2b
|
Provenance
The following attestation bundles were made for pyinfernal-0.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
package.yml on althonos/pyinfernal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyinfernal-0.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
b36bf8c3a6d5256e9eadd41099838fa1d909d55d51bd1c2036f6db096dbc6db8 - Sigstore transparency entry: 850116133
- Sigstore integration time:
-
Permalink:
althonos/pyinfernal@764e50c165e83642ab436b5ae4ffbf17842f33b4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/althonos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yml@764e50c165e83642ab436b5ae4ffbf17842f33b4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyinfernal-0.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pyinfernal-0.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1040ee14b28d6872624bbebc9b548ed3657c07b74043819dd9a92c074ced1361
|
|
| MD5 |
7606b052bbb33cfc8c983f0056a91a3f
|
|
| BLAKE2b-256 |
bf5f584cc0ab37ac0b5a84b6d23eb33a4231d689094942cb20f6374ddb7cb201
|
Provenance
The following attestation bundles were made for pyinfernal-0.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
package.yml on althonos/pyinfernal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyinfernal-0.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
1040ee14b28d6872624bbebc9b548ed3657c07b74043819dd9a92c074ced1361 - Sigstore transparency entry: 850116135
- Sigstore integration time:
-
Permalink:
althonos/pyinfernal@764e50c165e83642ab436b5ae4ffbf17842f33b4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/althonos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yml@764e50c165e83642ab436b5ae4ffbf17842f33b4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyinfernal-0.1.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pyinfernal-0.1.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45a77b094e9ef399691375b77dbf623c5d7fbb4ae80f68f808547ce62c209ae7
|
|
| MD5 |
9ae07c827582010e1bda3d76686534dc
|
|
| BLAKE2b-256 |
51ae26ef3e48dfdcc1e25efbbc140e25006c0ae5a9a6772c7132d895e1a400dc
|
Provenance
The following attestation bundles were made for pyinfernal-0.1.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
package.yml on althonos/pyinfernal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyinfernal-0.1.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
45a77b094e9ef399691375b77dbf623c5d7fbb4ae80f68f808547ce62c209ae7 - Sigstore transparency entry: 850116142
- Sigstore integration time:
-
Permalink:
althonos/pyinfernal@764e50c165e83642ab436b5ae4ffbf17842f33b4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/althonos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yml@764e50c165e83642ab436b5ae4ffbf17842f33b4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyinfernal-0.1.0-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pyinfernal-0.1.0-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
adc6d92603cc78581d7caa2adada7d85a56575f4f74e81196228e749f6aec8a9
|
|
| MD5 |
519e91a2c78cc8470f3e25a06ff47c97
|
|
| BLAKE2b-256 |
c3e6ea37886a2a2f02d0749170ea19bc381997b37fdd7b57839719aaeb8e7458
|
Provenance
The following attestation bundles were made for pyinfernal-0.1.0-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
package.yml on althonos/pyinfernal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyinfernal-0.1.0-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
adc6d92603cc78581d7caa2adada7d85a56575f4f74e81196228e749f6aec8a9 - Sigstore transparency entry: 850116138
- Sigstore integration time:
-
Permalink:
althonos/pyinfernal@764e50c165e83642ab436b5ae4ffbf17842f33b4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/althonos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yml@764e50c165e83642ab436b5ae4ffbf17842f33b4 -
Trigger Event:
push
-
Statement type: