Skip to main content

RSBio-Seq is a fast and light-weight sequence reading library (built on top of rust bio crate).

Project description

RSBio-Seq

Cargo tests Downloads PyPI - Version Upload to PyPI

RSBio-Seq intends to provide just reading facility on common sequence formats (FASTA/FASTQ) in both raw and compressed formats.

Installation

1. From PyPI (Recommended)

Simple use the following command

pip install rsbio-seq

2. Build and install from source

To build you need to have the following installed.

maturin develop # this installs the development version in the env
maturin develop --rust # this installs a release version in the env

To build a wheel for installation

maturin build --release

You will find the whl file inside the target/wheels directory. Your whl file will have a name depicting your python environment and CPU architecture.

Usage

Once installed you can import the library and use as follows.

Reading

from rsbio_seq import SeqReader, SeqWriter, Sequence

# reading
for seq in SeqReader("path/to/seq.fasta.gz"):
    print(seq.id)
    print(seq.seq)
    # for fastq quality line
    print(seq.qual)
    # optional description attribute
    print(seq.desc)

Writing

# writing fasta
seq = Sequence("id", "desc", "ACGT") # id, description, sequence
writer = SeqWriter("out.fasta")
writer.write(seq)
writer.close()

# writing fastq
seq = Sequence("id", "desc", "ACGT") # id, description, sequence
writer = SeqWriter("out.fastq")
writer.write(seq)
writer.close()

# writing gzipped
seq = Sequence("id", "desc", "ACGT", "IIII") # id, description, sequence, quality
writer = SeqWriter("out.fq.gz")
writer.write(seq)
writer.close()

Note: close() is needed if you want to read within the same program scope. Otherwise, rust will automatically do this for you.

Authors

Support and contributions

Please get in touch via author websites or GitHub issues. Thanks!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

rsbio_seq-0.1.2-cp39-abi3-win_amd64.whl (216.4 kB view details)

Uploaded CPython 3.9+ Windows x86-64

rsbio_seq-0.1.2-cp39-abi3-musllinux_1_2_x86_64.whl (517.9 kB view details)

Uploaded CPython 3.9+ musllinux: musl 1.2+ x86-64

rsbio_seq-0.1.2-cp39-abi3-musllinux_1_2_aarch64.whl (534.8 kB view details)

Uploaded CPython 3.9+ musllinux: musl 1.2+ ARM64

rsbio_seq-0.1.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (346.9 kB view details)

Uploaded CPython 3.9+ manylinux: glibc 2.17+ x86-64

rsbio_seq-0.1.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (354.8 kB view details)

Uploaded CPython 3.9+ manylinux: glibc 2.17+ ARM64

rsbio_seq-0.1.2-cp39-abi3-macosx_11_0_arm64.whl (306.9 kB view details)

Uploaded CPython 3.9+ macOS 11.0+ ARM64

rsbio_seq-0.1.2-cp39-abi3-macosx_10_12_x86_64.whl (311.2 kB view details)

Uploaded CPython 3.9+ macOS 10.12+ x86-64

File details

Details for the file rsbio_seq-0.1.2-cp39-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for rsbio_seq-0.1.2-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 18aeb296ccc8e628bc3756ff344ecbb2d503d14bb7872d75ad4feb6a86a6d3c6
MD5 97647009f97dfacec3ce036f2858f6c0
BLAKE2b-256 f07c6c60c8cfb0b485f2dc638e010ba9b85e3ed965dad96ee65b481ebdf5c4b6

See more details on using hashes here.

File details

Details for the file rsbio_seq-0.1.2-cp39-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rsbio_seq-0.1.2-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2e74ef070d4d1b26f946dd93078ea5e045ac39ec421f3e09955aa56c12a02a42
MD5 9f9adba58b4a3e74eb1979b24aa46c74
BLAKE2b-256 e78263ca5c8106630e9284b12d154df1b8f6409b1bcbdc009cd6968cdd440529

See more details on using hashes here.

File details

Details for the file rsbio_seq-0.1.2-cp39-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for rsbio_seq-0.1.2-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 08eaa43748c91e5b0a19bb27bc83fee7acbeaca805b32e18b7f7e08ae571c095
MD5 650c6b92cbfa7128bebdfced83a5388d
BLAKE2b-256 767ac87449bc5d33a9946c494c1b74cea3e8ca4aa0978867a06fbb0e13accee1

See more details on using hashes here.

File details

Details for the file rsbio_seq-0.1.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rsbio_seq-0.1.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 35a23a80097f0554bdc971f53da73350ad05cbc5a595d436cec9dd87ec3e9ddf
MD5 317421a0266b05b8b5446842fd7279ff
BLAKE2b-256 1fe8806475a4c099836c28245ed39394cbbc3ec355da6184f964e3053fa9bf19

See more details on using hashes here.

File details

Details for the file rsbio_seq-0.1.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for rsbio_seq-0.1.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 42bdf0f13177f8187db05ffa6b000d726cc9532f4c8985b599c39de3cf08e505
MD5 57b78f32612358f2097abf6fbd9cebcc
BLAKE2b-256 dfa98c09a4b27498b9cb066c555257acc3d81cccc98868d955c72fbbcc8da021

See more details on using hashes here.

File details

Details for the file rsbio_seq-0.1.2-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rsbio_seq-0.1.2-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3904622306920473dcf43ced5f413777f22b87dee45b097a37e48bc07e73227c
MD5 40223ec7674aeaac73688b626627b25c
BLAKE2b-256 33102f7ce665019d568b5a041ef042e58b5c5d45ba633627166d35a577dd0660

See more details on using hashes here.

File details

Details for the file rsbio_seq-0.1.2-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for rsbio_seq-0.1.2-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 17001617317034b4c840f86eb00a962dc3052d72e5b467acdff193d74eef612d
MD5 9dee759720e501756b1bc5c42064d697
BLAKE2b-256 9c7171234f189fba77f08a2944265695bbb405fa3eb9f0f8f1a4859964a08fe5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page