Cython bindings and Python interface to the NCBI C++ Toolkit.
Project description
🧬🧰 PyNCBItk 
(Unofficial) Cython bindings and Python interface to the NCBI C++ Toolkit.
⚠️ This package is a work-in-progress and in a very experimental state. Expect segmentation faults, compilation issues, missing features, incomplete documentation.
🗺️ Overview
The NCBI C++ Toolkit is a framework of C++ libraries to work with biological sequence data developed at the National Center for Biotechnology Information. It features a flexible object model for representing sequences of various origin, including composite or virtual sequences; a resource manager to easily manipulate heterogeneous data sources; and a comprehensive API to the various BLAST algorithms[1] developed at the NBCI.
PyNCBItk is a Python library that provides bindings to the NCBI C++ Toolkit data model and BLAST+ interface using Cython. It exposes the internals of the C++ Toolkit, allowing BLAST queries to be run directly from the Python interpreter without external I/O.
📋 Roadmap
The package is in a very experimental state, and only a few core features are supported at the moment:
- Loading sequences from a FASTA file.
- Creating basic sequences through the Python API.
- Running BLAST searches with default parameters.
- Thorough BLAST configuration.
- Error and warning management.
- Support for all kinds of sequence storage.
- Multi-threading for database searches using Python threads.
- Advanced interface for the object manager.
- Interface for all sequence and alignment types.
🔧 Installing
PyNCBItk is available for all modern Python (3.7+). Compilation is done through CMake using Scikit-build-core.
To install an alpha release, use pip with the --pre flag:
$ pip install pyncbitk --pre
The pyncbitk package requires additional runtime libraries that are distributed
in the pyncbitk-runtime package. These libraries should be available in a pre-compiled
wheel for Linux and MacOS platforms. Otherwise, they can be compiled on setup
with the Conan C/C++ package manager
to handle compilation of the NCBI C++ Toolkit. The project will take ages to
compile the first time, but afterwards only the Cython code will have to be
recompiled.
💡 Example
from pyncbitk.objects.seqset import BioSeqSet
from pyncbitk.objtools import DatabaseReader, FastaReader
from pyncbitk.algo.blast import BlastN
# read the sequences from FASTA-formatted files
queries = BioSeqSet(FastaReader("queries.fna", split=False))
subjects = BioSeqSet(FastaReader("subjects.fna", split=False))
# run `blastn` with default parameters
blastn = BlastN()
results = blastn.run(queries, subjects)
The result is a SearchResultsSet which contains one SearchResults object
per query/subject pair. The SearchResults object summarizes the result
and contains the hit alignments in a SeqAlignSet.
See the Examples section in the online documentation for more information.
💭 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.
📋 Changelog
This project adheres to Semantic Versioning and provides a changelog in the Keep a Changelog format.
⚖️ License
This library is provided under the MIT License. The NCBI C++ Toolkit is a "United States Government Work" and therefore lies in the public domain, but may be subject to copyright by the U.S. in foreign countries. Some restrictions apply, see the NCBI C++ Toolkit license.
This project is in no way not affiliated, sponsored, or otherwise endorsed by the NCBI or any associated entity. It was developed by Martin Larralde during his PhD at the Leiden University Medical Center in the Zeller team.
📚 References
- [1] Altschul, S. F., Gish, W., Miller, W., Myers, E. W., & Lipman, D. J. (1990). Basic local alignment search tool. Journal of molecular biology, 215(3), 403–410. doi:10.1016/S0022-2836(05)80360-2
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 Distribution
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 pyncbitk-0.1.0a5.tar.gz.
File metadata
- Download URL: pyncbitk-0.1.0a5.tar.gz
- Upload date:
- Size: 135.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c11d241aacd558cf3edfcd38f5eeda0d72b777ddbce4c9ee0593f151808fd006
|
|
| MD5 |
d3a1487951d75cafbe8604e1a7ca3257
|
|
| BLAKE2b-256 |
bbd57d65c02304783b5e58be6ace38525232a9ab6d2f8ebc96a9a6f5705c4c45
|
Provenance
The following attestation bundles were made for pyncbitk-0.1.0a5.tar.gz:
Publisher:
package.yml on althonos/pyncbitk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyncbitk-0.1.0a5.tar.gz -
Subject digest:
c11d241aacd558cf3edfcd38f5eeda0d72b777ddbce4c9ee0593f151808fd006 - Sigstore transparency entry: 667576740
- Sigstore integration time:
-
Permalink:
althonos/pyncbitk@dc0cf00910b7b905a57b63544c5a6164060140ad -
Branch / Tag:
refs/tags/v0.1.0-alpha.5 - Owner: https://github.com/althonos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yml@dc0cf00910b7b905a57b63544c5a6164060140ad -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyncbitk-0.1.0a5-cp311-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: pyncbitk-0.1.0a5-cp311-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.11+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1987dab84afedfb96657abcac0205c6198c57fbfd00d243b5f1946fd74b65158
|
|
| MD5 |
a9b2b97bb4e5435dde71bc1cf7a42ea7
|
|
| BLAKE2b-256 |
97f864ba3f4c6c003652a15794c62fa4fe8f5a5b4ced46b045784558156f2919
|
Provenance
The following attestation bundles were made for pyncbitk-0.1.0a5-cp311-abi3-manylinux_2_34_x86_64.whl:
Publisher:
package.yml on althonos/pyncbitk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyncbitk-0.1.0a5-cp311-abi3-manylinux_2_34_x86_64.whl -
Subject digest:
1987dab84afedfb96657abcac0205c6198c57fbfd00d243b5f1946fd74b65158 - Sigstore transparency entry: 667576756
- Sigstore integration time:
-
Permalink:
althonos/pyncbitk@dc0cf00910b7b905a57b63544c5a6164060140ad -
Branch / Tag:
refs/tags/v0.1.0-alpha.5 - Owner: https://github.com/althonos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
package.yml@dc0cf00910b7b905a57b63544c5a6164060140ad -
Trigger Event:
push
-
Statement type: