2 files were added to this release more than 14 days after its initial publication. Inspect the release files before installing.
Needletail
Needletail is a MIT-licensed, minimal-copying FASTA/FASTQ parser and k-mer processing library for Rust.
The goal is to write a fast and well-tested set of functions that more specialized bioinformatics programs can use. Needletail's goal is to be as fast as the readfq C library at parsing FASTX files and much (i.e. 25 times) faster than equivalent Python implementations at k-mer counting.
Example
extern crate needletail;
use needletail::{parse_fastx_file, Sequence, FastxReader};
fn main() {
let filename = "tests/data/28S.fasta";
let mut n_bases = 0;
let mut n_valid_kmers = 0;
let mut reader = parse_fastx_file(&filename).expect("valid path/file");
while let Some(record) = reader.next() {
let seqrec = record.expect("invalid record");
// keep track of the total number of bases
n_bases += seqrec.num_bases();
// normalize to make sure all the bases are consistently capitalized and
// that we remove the newlines since this is FASTA
let norm_seq = seqrec.normalize(false);
// we make a reverse complemented copy of the sequence first for
// `canonical_kmers` to draw the complemented sequences from.
let rc = norm_seq.reverse_complement();
// now we keep track of the number of AAAAs (or TTTTs via
// canonicalization) in the file; note we also get the position (i.0;
// in the event there were `N`-containing kmers that were skipped)
// and whether the sequence was complemented (i.2) in addition to
// the canonical kmer (i.1)
for (_, kmer, _) in norm_seq.canonical_kmers(4, &rc) {
if kmer == b"AAAA" {
n_valid_kmers += 1;
}
}
}
println!("There are {} bases in your file.", n_bases);
println!("There are {} AAAAs in your file.", n_valid_kmers);
}
Installation
Needletail requires rust and cargo to be installed.
Please use either your local package manager (homebrew, apt-get, pacman, etc) or install these via rustup.
Once you have Rust set up, you can include needletail in your Cargo.toml file like:
[dependencies]
needletail = "0.4"
To install needletail itself for development:
git clone https://github.com/onecodex/needletail
cargo test # to run tests
Python
To work on the Python library on a Mac OS X/Unix system (requires Python 3):
pip install maturin
# finally, install the library in the local virtualenv
maturin develop --cargo-extra-args="--features=python"
Building binary wheels and pushing to PyPI
# The Mac build requires switching through a few different python versions
maturin build --cargo-extra-args="--features=python" --release --strip
# The linux build is automated through cross-compiling in a docker image
docker run --rm -v $(pwd):/io konstin2/maturin:master build --cargo-extra-args="--features=python" --release --strip
twine upload target/wheels/*
Getting Help
Questions are best directed as GitHub issues. We plan to add more documentation soon, but in the meantime "doc" comments are included in the source.
Contributing
Please do! We're happy to discuss possible additions and/or accept pull requests.
Acknowledgements
Starting from 0.4, the parsers algorithms is taken from seq_io. While it has been slightly modified, it is mainly
coming from that library. Links to the original files are available in src/parser/fast{a,q}.rs.
Metadata
Release files for needletail 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Files added late
2 files were uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release files before installing.
Built distributions (wheels)
Total release size: 2.4 MB
Release files / needletail-0.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | needletail-0.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 293.2 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
88424db584dec0bf80815b21840f7585c6fdceb45c0968e6d5e0250b64eb919d
|
|
BLAKE2b-256 checksum How to use checksums |
55971d82e6f749908be461ad15c49ec37ff95146c7776f09f4405f4c8927c795
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.7
|
Release files / needletail-0.4.1-cp310-cp310-macosx_11_0_arm64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | needletail-0.4.1-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 285.2 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
0d05ad827341abe883f49a196d23acd32789a9856c537e2227455e4434d5b28a
|
|
BLAKE2b-256 checksum How to use checksums |
56cc6a01d0f927802bb7e474fd6017b9aa52855a4d5a27676ba87038b41fab75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.7
|
Release files / needletail-0.4.1-cp39-cp39-manylinux2010_x86_64.whl
| Download URL | needletail-0.4.1-cp39-cp39-manylinux2010_x86_64.whl |
|---|---|
| Size | 313.6 kB |
| Tags | CPython 3.9 Linux glibc 2.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
7537656caa75eaab58723b5683057d09295d7e2acf103ea787d263e01bc03d1e
|
|
BLAKE2b-256 checksum How to use checksums |
48381deb82778ebfa1d7b9c90ed9fb3bda959190fdbe080a60729d582902a1c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.3
|
Release files / needletail-0.4.1-cp39-cp39-macosx_10_7_x86_64.whl
| Download URL | needletail-0.4.1-cp39-cp39-macosx_10_7_x86_64.whl |
|---|---|
| Size | 267.1 kB |
| Tags | CPython 3.9 macOS 10.7+ x86-64 |
|
SHA-256 checksum How to use checksums |
3d2a70977fe98afef0ed6437909f65efa2885e87a2395aca41aafc3b19032598
|
|
BLAKE2b-256 checksum How to use checksums |
1714572dcdeb2692ab9c12f88111f91b71cdc3d93189abdc48960df9e98ee052
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.3
|
Release files / needletail-0.4.1-cp38-cp38-manylinux2010_x86_64.whl
| Download URL | needletail-0.4.1-cp38-cp38-manylinux2010_x86_64.whl |
|---|---|
| Size | 313.3 kB |
| Tags | CPython 3.8 Linux glibc 2.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
a333d5571a215f632e2b042763b8cd620aa08cdab54c864ecc05d3cfb11f42c0
|
|
BLAKE2b-256 checksum How to use checksums |
0615fe67af376c351adbc082864cbbdd714495b7e26e65884d39a14376b17697
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.3
|
Release files / needletail-0.4.1-cp38-cp38-macosx_10_7_x86_64.whl
| Download URL | needletail-0.4.1-cp38-cp38-macosx_10_7_x86_64.whl |
|---|---|
| Size | 267.5 kB |
| Tags | CPython 3.8 macOS 10.7+ x86-64 |
|
SHA-256 checksum How to use checksums |
25d3095007a002f8ca2cc321909fb6b9f5c7624c4b5a7f04e889b5dfef94aa82
|
|
BLAKE2b-256 checksum How to use checksums |
c70d26b5f026e7df9cb92980f1e8bb3e7fa41679fd88e339a29cf61908a77bab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.3
|
Release files / needletail-0.4.1-cp37-cp37m-manylinux2010_x86_64.whl
| Download URL | needletail-0.4.1-cp37-cp37m-manylinux2010_x86_64.whl |
|---|---|
| Size | 313.2 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
9a4f7e23f9a4130f34ff5459d79f9d5254336bafb4ab5dbbcc448a3ad6d23ef7
|
|
BLAKE2b-256 checksum How to use checksums |
b0cb670c75e3cdad06c73ccd2ccdd7f7fe7d390e39e9ff5c851fccc8e64502e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.3
|
Release files / needletail-0.4.1-cp36-cp36m-manylinux2010_x86_64.whl
| Download URL | needletail-0.4.1-cp36-cp36m-manylinux2010_x86_64.whl |
|---|---|
| Size | 313.2 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
06b83b4f7f1e58312cdb2d3aef29d00bd1178ddd502ac9cbce998a5fa9397756
|
|
BLAKE2b-256 checksum How to use checksums |
a5d1b2c45b870cfbb0db2ea5ce9b85a6397db8561efd72cc150c258bba63ee31
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.3
|
Security for needletail 0.4.1
Upload timing
Release files added late
2 files were uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.