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 the project locally, clone the repository and its submodules,
and install the repository with pip
:
$ git clone --recursive https://github.com/althonos/pyncbitk
$ pip install ./pyncbitk -v
The compilation uses 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 import BlastN
# read the queries from a FASTA file
queries = BioSeqSet(FastaReader("queries.fna"))
# open a database of subject sequences
db = DatabaseReader("database.fna")
# run `blastn` with default parameters
blastn = BlastN()
results = blastn.run(queries, db)
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
.
💭 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 Distributions
File details
Details for the file pyncbitk-0.1.0a1.tar.gz
.
File metadata
- Download URL: pyncbitk-0.1.0a1.tar.gz
- Upload date:
- Size: 110.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4de770ecc919e4335bb549e418cafc6acf397a8b9180bdf47728c379240fdc57 |
|
MD5 | c33a0c0a79a1269f344caf4b95435302 |
|
BLAKE2b-256 | ff13c9c152bca29cd3ba32b2b90a7b0692f90957446aea68443968687879853b |
Provenance
The following attestation bundles were made for pyncbitk-0.1.0a1.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.0a1.tar.gz
- Subject digest:
4de770ecc919e4335bb549e418cafc6acf397a8b9180bdf47728c379240fdc57
- Sigstore transparency entry: 155064106
- Sigstore integration time:
- Permalink:
althonos/pyncbitk@01a3ed9de30f0cbdf89632f70797ed10a3b1e270
- Branch / Tag:
refs/tags/v0.1.0-alpha.1
- Owner: https://github.com/althonos
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
package.yml@01a3ed9de30f0cbdf89632f70797ed10a3b1e270
- Trigger Event:
push
- Statement type:
File details
Details for the file pyncbitk-0.1.0a1-cp313-cp313-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: pyncbitk-0.1.0a1-cp313-cp313-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 85.3 MB
- Tags: CPython 3.13, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | edd3ddf1f42d1390adcefa63c64ceb24e3f59ae10123a4a59cf0d5b5bb17568c |
|
MD5 | 12ed4b1f8aff1e7759cb0fc745d182fd |
|
BLAKE2b-256 | 1d80e327e562b17ea6a0d7fde6edb5987287a61183ea4f49f8049d8468523533 |
Provenance
The following attestation bundles were made for pyncbitk-0.1.0a1-cp313-cp313-manylinux_2_28_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.0a1-cp313-cp313-manylinux_2_28_x86_64.whl
- Subject digest:
edd3ddf1f42d1390adcefa63c64ceb24e3f59ae10123a4a59cf0d5b5bb17568c
- Sigstore transparency entry: 155064117
- Sigstore integration time:
- Permalink:
althonos/pyncbitk@01a3ed9de30f0cbdf89632f70797ed10a3b1e270
- Branch / Tag:
refs/tags/v0.1.0-alpha.1
- Owner: https://github.com/althonos
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
package.yml@01a3ed9de30f0cbdf89632f70797ed10a3b1e270
- Trigger Event:
push
- Statement type:
File details
Details for the file pyncbitk-0.1.0a1-cp312-cp312-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: pyncbitk-0.1.0a1-cp312-cp312-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 85.3 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ceeb5123c31c9a7275f09800bb0dcc86159100275c5d475fee002ec307658d2 |
|
MD5 | 27940dfce81621ab1ca5758bc6bb9635 |
|
BLAKE2b-256 | d54eade9e222eab4b14082bd9e1d926f2b758d17df490ab142007ea703af0045 |
Provenance
The following attestation bundles were made for pyncbitk-0.1.0a1-cp312-cp312-manylinux_2_28_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.0a1-cp312-cp312-manylinux_2_28_x86_64.whl
- Subject digest:
7ceeb5123c31c9a7275f09800bb0dcc86159100275c5d475fee002ec307658d2
- Sigstore transparency entry: 155064115
- Sigstore integration time:
- Permalink:
althonos/pyncbitk@01a3ed9de30f0cbdf89632f70797ed10a3b1e270
- Branch / Tag:
refs/tags/v0.1.0-alpha.1
- Owner: https://github.com/althonos
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
package.yml@01a3ed9de30f0cbdf89632f70797ed10a3b1e270
- Trigger Event:
push
- Statement type:
File details
Details for the file pyncbitk-0.1.0a1-cp311-cp311-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: pyncbitk-0.1.0a1-cp311-cp311-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 85.4 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e9ae5f7fe24b82892dee07fe2a1eacb9b77da2de9e1c8258f6823b3ea22299a |
|
MD5 | a0d321fd17f04387e6b9d9e3ea9eafae |
|
BLAKE2b-256 | 590b87f6d259a39f5a1b324638fe8d93d92334dbda97e5569444a9b18cff6212 |
Provenance
The following attestation bundles were made for pyncbitk-0.1.0a1-cp311-cp311-manylinux_2_28_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.0a1-cp311-cp311-manylinux_2_28_x86_64.whl
- Subject digest:
8e9ae5f7fe24b82892dee07fe2a1eacb9b77da2de9e1c8258f6823b3ea22299a
- Sigstore transparency entry: 155064116
- Sigstore integration time:
- Permalink:
althonos/pyncbitk@01a3ed9de30f0cbdf89632f70797ed10a3b1e270
- Branch / Tag:
refs/tags/v0.1.0-alpha.1
- Owner: https://github.com/althonos
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
package.yml@01a3ed9de30f0cbdf89632f70797ed10a3b1e270
- Trigger Event:
push
- Statement type:
File details
Details for the file pyncbitk-0.1.0a1-cp310-cp310-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: pyncbitk-0.1.0a1-cp310-cp310-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 85.3 MB
- Tags: CPython 3.10, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f5fdcec824564e55d94e3120b6fab7480d0906050545a676dd7961d0e75928a |
|
MD5 | c5ee59b86f0053b8be3b7e1f577fde04 |
|
BLAKE2b-256 | 33f01640c862fcb3b0896d51e3a1beebc4050b9ee84cac0be96d41f4f9920a9d |
Provenance
The following attestation bundles were made for pyncbitk-0.1.0a1-cp310-cp310-manylinux_2_28_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.0a1-cp310-cp310-manylinux_2_28_x86_64.whl
- Subject digest:
3f5fdcec824564e55d94e3120b6fab7480d0906050545a676dd7961d0e75928a
- Sigstore transparency entry: 155064110
- Sigstore integration time:
- Permalink:
althonos/pyncbitk@01a3ed9de30f0cbdf89632f70797ed10a3b1e270
- Branch / Tag:
refs/tags/v0.1.0-alpha.1
- Owner: https://github.com/althonos
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
package.yml@01a3ed9de30f0cbdf89632f70797ed10a3b1e270
- Trigger Event:
push
- Statement type:
File details
Details for the file pyncbitk-0.1.0a1-cp39-cp39-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: pyncbitk-0.1.0a1-cp39-cp39-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 85.4 MB
- Tags: CPython 3.9, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 937960a1a7521e0b9d88c347dfd5dbfcf24f069a7281e2330a8d10f8d5cf0387 |
|
MD5 | 4cacda578997b23aa8937706a706c5d1 |
|
BLAKE2b-256 | 031ca077aa98e01562368190715726809d7f126863ce7f76849f59f1c468a604 |
Provenance
The following attestation bundles were made for pyncbitk-0.1.0a1-cp39-cp39-manylinux_2_28_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.0a1-cp39-cp39-manylinux_2_28_x86_64.whl
- Subject digest:
937960a1a7521e0b9d88c347dfd5dbfcf24f069a7281e2330a8d10f8d5cf0387
- Sigstore transparency entry: 155064111
- Sigstore integration time:
- Permalink:
althonos/pyncbitk@01a3ed9de30f0cbdf89632f70797ed10a3b1e270
- Branch / Tag:
refs/tags/v0.1.0-alpha.1
- Owner: https://github.com/althonos
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
package.yml@01a3ed9de30f0cbdf89632f70797ed10a3b1e270
- Trigger Event:
push
- Statement type:
File details
Details for the file pyncbitk-0.1.0a1-cp38-cp38-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: pyncbitk-0.1.0a1-cp38-cp38-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 85.4 MB
- Tags: CPython 3.8, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ddcfd352e09f0fcc25aae7411fb68629b8c2ab5d76445fc593b4a1b008ed3d52 |
|
MD5 | 6461bb0f882274dabfac0e62d76f4313 |
|
BLAKE2b-256 | 849f9f2b4715893b150ceb6e5307d26e4b63ae7acc8562018bc08fa6d8838272 |
Provenance
The following attestation bundles were made for pyncbitk-0.1.0a1-cp38-cp38-manylinux_2_28_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.0a1-cp38-cp38-manylinux_2_28_x86_64.whl
- Subject digest:
ddcfd352e09f0fcc25aae7411fb68629b8c2ab5d76445fc593b4a1b008ed3d52
- Sigstore transparency entry: 155064108
- Sigstore integration time:
- Permalink:
althonos/pyncbitk@01a3ed9de30f0cbdf89632f70797ed10a3b1e270
- Branch / Tag:
refs/tags/v0.1.0-alpha.1
- Owner: https://github.com/althonos
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
package.yml@01a3ed9de30f0cbdf89632f70797ed10a3b1e270
- Trigger Event:
push
- Statement type:
File details
Details for the file pyncbitk-0.1.0a1-cp37-cp37m-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: pyncbitk-0.1.0a1-cp37-cp37m-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 85.3 MB
- Tags: CPython 3.7m, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9dd2dbabab8a2c940d3dcf4f2d28ddbcb0a5dcf087c0e0d1bfcdcf9d498962c |
|
MD5 | 0c54de0379afe6e27d9037e744a3662f |
|
BLAKE2b-256 | 4f0220b968836f9b4bb86197d2a38c1e0354118dae2af2845b6e21f6e88a9175 |
Provenance
The following attestation bundles were made for pyncbitk-0.1.0a1-cp37-cp37m-manylinux_2_28_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.0a1-cp37-cp37m-manylinux_2_28_x86_64.whl
- Subject digest:
d9dd2dbabab8a2c940d3dcf4f2d28ddbcb0a5dcf087c0e0d1bfcdcf9d498962c
- Sigstore transparency entry: 155064113
- Sigstore integration time:
- Permalink:
althonos/pyncbitk@01a3ed9de30f0cbdf89632f70797ed10a3b1e270
- Branch / Tag:
refs/tags/v0.1.0-alpha.1
- Owner: https://github.com/althonos
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
package.yml@01a3ed9de30f0cbdf89632f70797ed10a3b1e270
- Trigger Event:
push
- Statement type: