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)

# Paired mates (or 10x R1/R2/I1/I2) compress into one archive — pass a list and
# their sample sizes are summed. A str/bytes source stays a single input.
est = fqxv.estimate(["R1.fastq.gz", "R2.fastq.gz"])

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.2.tar.gz (455.3 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.2-cp39-abi3-win_amd64.whl (420.8 kB view details)

Uploaded CPython 3.9+Windows x86-64

fqxv-0.5.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (532.5 kB view details)

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

fqxv-0.5.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (502.6 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

fqxv-0.5.2-cp39-abi3-macosx_11_0_arm64.whl (459.5 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

fqxv-0.5.2-cp39-abi3-macosx_10_12_x86_64.whl (495.4 kB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for fqxv-0.5.2.tar.gz
Algorithm Hash digest
SHA256 bd402d977aec48376ce1d4866037d78e454384fcd78df9f7d16fca4f3e338593
MD5 77551933305f50b3e953afa4ada56367
BLAKE2b-256 73dbf9a9e5b035af0465f7392cd186ff23b54cf25bafe0e1aca91c33e1c7b944

See more details on using hashes here.

Provenance

The following attestation bundles were made for fqxv-0.5.2.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.2-cp39-abi3-win_amd64.whl.

File metadata

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

File hashes

Hashes for fqxv-0.5.2-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 112cff658d46c624805e932f2ecb5620c02e7e0d3fe1d6a7b16d32b4fa120ebb
MD5 a52659a625978947c78bc7a16b29ba44
BLAKE2b-256 1b4dc397833c59b7102d9848ea88e15858ac0af178aed5fe2113fa18e7b712f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for fqxv-0.5.2-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.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fqxv-0.5.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 670ad2958498bc5a40e75987f48f237480cceab7f44bf55e89c5042706c45f66
MD5 7a13e2496c53a76dfc7b5bafa12a9931
BLAKE2b-256 9459a9bb79777525b35a160685cc39c4b7961bb38747c193c12a2bcda88fac16

See more details on using hashes here.

Provenance

The following attestation bundles were made for fqxv-0.5.2-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.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fqxv-0.5.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 72e4cc377954399883aa98e5e022c14a9d492dfcd4b9fc0d492ad3466d62ad45
MD5 3f09dbef041386a30756349f7364bfac
BLAKE2b-256 5f9690e4cbc5d5682d665dfbf072a4590fbc9e64ece8dddbb73328935840ddb3

See more details on using hashes here.

Provenance

The following attestation bundles were made for fqxv-0.5.2-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.2-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

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

File hashes

Hashes for fqxv-0.5.2-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f20215e0ef3fa3ae546578265283e3078934e7b9af55b42101b492b810b9c22a
MD5 1291ab2b27eb6feb39523fdb53a1c0d6
BLAKE2b-256 67f86d124f39be20dd3e29cf472fcfb70d0f010025a1dea40f1bbd37580026c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for fqxv-0.5.2-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.2-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

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

File hashes

Hashes for fqxv-0.5.2-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 10e091bf0e98a64afebe9e93a731cbd0a4c2306d9c499e710b7c469f287df566
MD5 eef5106197620e3656b2aed0008ede2c
BLAKE2b-256 2438225a5652766c065ecda7514c8d989f347c312bcf714035c9718062b4e99b

See more details on using hashes here.

Provenance

The following attestation bundles were made for fqxv-0.5.2-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