Skip to main content

Read-only Python bindings for the fqxv FASTQ archiver

Project description

fqxv (Python)

Read-only Python bindings for fqxv, a Rust toolkit for lossless FASTQ archiving.

import fqxv

# Stream records (works on every layout, including reordered archives)
for rec in fqxv.open("reads.fqxv"):
    print(rec.name, rec.sequence, rec.quality)  # all bytes

# In-memory input works too
data = open("reads.fqxv", "rb").read()
n = sum(1 for _ in fqxv.open(data))

# Whole-archive convenience
fqxv.decompress_to_path("reads.fqxv", "reads.fastq")
raw = fqxv.decompress_to_bytes("reads.fqxv")
info = fqxv.inspect("reads.fqxv")
print(info.reads, info.format_version, info.platform)

# Column projection / random access (plain layout only)
idx = fqxv.open_index("reads.fqxv")
seqs = fqxv.read_sequences("reads.fqxv")        # list[bytes], skips quality
ids = fqxv.read_names("reads.fqxv", groups=[0]) # just the first row group
block0 = fqxv.read_block("reads.fqxv", 0)       # list[Record]

# Read over the network (fqxv.remote, standard-library HTTP). Streaming decodes the
# whole archive on the fly; projection fetches only the column you ask for via HTTP
# byte-range requests.
import fqxv.remote as remote
for rec in remote.stream("https://host/reads.fqxv"):   # or a presigned S3 URL
    ...                                                # streams; no full download
arc = remote.open_index("https://host/reads.fqxv")     # 1 tail GET → footer index
names = arc.names()                                    # ~1% of the file, CRC-checked
print(arc.bytes_fetched, "of", arc.size)

# Any file-like works, so an AWS SDK response streams straight in — no fqxv HTTP:
import boto3
body = boto3.client("s3").get_object(Bucket=b, Key=k)["Body"]
for rec in fqxv.open(body):
    ...
# For concurrent async range fetches, drive fqxv.parse_index_suffix /
# Index.stream_range / fqxv.decode_*_bytes with your own httpx/aiohttp session
# (see fqxv.remote's module docstring).

# Integrity check — raises fqxv.FqxvError on a corrupt archive
fqxv.verify("reads.fqxv")

# Project the archive size/ratio from a FASTQ *without* compressing (gzip/BGZF ok)
est = fqxv.estimate("reads.fastq.gz", level=5)  # also: quality_binning=, sample_reads=
print(est.ratio, est.archive_bytes, est.exhausted)

Projection and open_index are unavailable for globally-reordered archives (--order shuffle), whose streams are mutually dependent; use fqxv.open() to iterate those. Everything here is read-only: verify and estimate only measure — neither writes an archive — and full compression stays in the CLI.

Build from source

uv pip install maturin
maturin develop            # from crates/fqxv-python/

Project details


Download files

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

Source Distribution

fqxv-0.5.0.tar.gz (445.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

fqxv-0.5.0-cp39-abi3-win_amd64.whl (544.2 kB view details)

Uploaded CPython 3.9+Windows x86-64

fqxv-0.5.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (658.2 kB view details)

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

fqxv-0.5.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (615.0 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

fqxv-0.5.0-cp39-abi3-macosx_11_0_arm64.whl (565.5 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

fqxv-0.5.0-cp39-abi3-macosx_10_12_x86_64.whl (617.9 kB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file fqxv-0.5.0.tar.gz.

File metadata

  • Download URL: fqxv-0.5.0.tar.gz
  • Upload date:
  • Size: 445.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for fqxv-0.5.0.tar.gz
Algorithm Hash digest
SHA256 27f7fa1b93266acedc4c0be35e396dc54cb9d989ac53ebcbb39a5ed4e7227e92
MD5 261309919419faef9f16a7c5d257f423
BLAKE2b-256 002e3b106613a9ce5155ba83b6a398c807c30424f9b1059dbff981de40c96c18

See more details on using hashes here.

Provenance

The following attestation bundles were made for fqxv-0.5.0.tar.gz:

Publisher: wheels.yml on rnabioco/fqxv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fqxv-0.5.0-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: fqxv-0.5.0-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 544.2 kB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for fqxv-0.5.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 0583523660cdd9197af8bbd5d5f27fb86ce84fa9a61f6d32cd4b72d3cd31d487
MD5 8a8ce915218ffb21e81b6ee8699870e8
BLAKE2b-256 2ab6dd80896f60f73182330a14f606933347cf950bf9c4731bdfb0560dc8de2b

See more details on using hashes here.

Provenance

The following attestation bundles were made for fqxv-0.5.0-cp39-abi3-win_amd64.whl:

Publisher: wheels.yml on rnabioco/fqxv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fqxv-0.5.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fqxv-0.5.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e8f3ae8c88e57c471fc4e28f13c94f53ff267d20053542cf117831f21f4ca180
MD5 4f8028b6203314dd6edd61ef9335d0a2
BLAKE2b-256 124b44a4f06941d34ac5d5533af75f1bc879c009194222040d972552f9b0e3c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for fqxv-0.5.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on rnabioco/fqxv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fqxv-0.5.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fqxv-0.5.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ec2dd733bb503193ed161ea3fbb8e7b5e31d21d6d5ce7017ddc4469aa5e0b29a
MD5 843fcd307ea80375a62aaad5be503b15
BLAKE2b-256 9c6ed8efa02c458109796aeec8b76dad9b005e31be4f97260ff39db189c57b45

See more details on using hashes here.

Provenance

The following attestation bundles were made for fqxv-0.5.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: wheels.yml on rnabioco/fqxv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fqxv-0.5.0-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

  • Download URL: fqxv-0.5.0-cp39-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 565.5 kB
  • Tags: CPython 3.9+, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for fqxv-0.5.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6216655136e6107163daaaa69a5b36d65797b3ecb43554e637b3dbcd029b2a12
MD5 3f8c6ea10323d88eedaa836a8327fb3e
BLAKE2b-256 e33f374255f19696858a702d5f064b49eee2cd63826e74d56b54a18d24202814

See more details on using hashes here.

Provenance

The following attestation bundles were made for fqxv-0.5.0-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: wheels.yml on rnabioco/fqxv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fqxv-0.5.0-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: fqxv-0.5.0-cp39-abi3-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 617.9 kB
  • Tags: CPython 3.9+, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for fqxv-0.5.0-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8cc9d09f15ed5ed9325b08c87752c1293a4d374850870baeadbed80c471e877f
MD5 0c742690184b5dd67d62cf3eaeaee32b
BLAKE2b-256 d5f5a072c6a09479547928c9dbe1e3e7a699f4d6d9a610bfd8743d13baa29a7a

See more details on using hashes here.

Provenance

The following attestation bundles were made for fqxv-0.5.0-cp39-abi3-macosx_10_12_x86_64.whl:

Publisher: wheels.yml on rnabioco/fqxv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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