This release is a pre-release and may not be stable for production use.
🧬🧰 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
Metadata
Release files for pyncbitk 0.1.0a6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyncbitk-0.1.0a6.tar.gz | 133.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyncbitk-0.1.0a6-cp311-abi3-manylinux_2_34_x86_64.whl | CPython 3.11 | abi3 | Linux glibc 2.34+ x86-64 | Details |
Total release size: 1.2 MB
Release files / pyncbitk-0.1.0a6.tar.gz
| Download URL | pyncbitk-0.1.0a6.tar.gz |
|---|---|
| Size | 133.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8e53b8299a951f1227995edff91ff32757fe8a5a6622a8aa1bc9386414dd977f
|
|
BLAKE2b-256 checksum How to use checksums |
076151e2ce23b983472c440278c4481e4829c8df07bb4849e10e50476e09c80f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 2, 2026.
Transparency logRelease files / pyncbitk-0.1.0a6-cp311-abi3-manylinux_2_34_x86_64.whl
| Download URL | pyncbitk-0.1.0a6-cp311-abi3-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.11 Linux glibc 2.34+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
998b7f1ea63459ad112284d7673ab685d93e869968c94c68862fefbf3727133b
|
|
BLAKE2b-256 checksum How to use checksums |
38bc9af292dc2f51a59c75697f0f46ee01882958a9695386c81e9cb04f248d49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 2, 2026.
Transparency log