Skip to main content

Read and write FASTA and FASTQ files efficiently

Project description

CI PyPI Codecov

dnaio parses FASTQ and FASTA

dnaio is a Python 3.6+ library for fast parsing of FASTQ and also FASTA files. The code was previously part of the Cutadapt tool and has been improved since it has been split out.

Example usage

The main interface is the dnaio.open function:

import dnaio

with dnaio.open('reads.fastq.gz') as f:
    bp = 0
    for record in f:
        bp += len(record)
print(f'The input file contains {bp/1E6:.1f} Mbp')

Features and supported file types

  • FASTQ input and output
  • FASTA input and output
  • Compressed input and output (.gz, .bz2 and .xz, detected automatically)
  • Paired-end data in two files
  • Interleaved paired-end data in a single file
  • Files with DOS/Windows linebreaks can be read
  • FASTQ files with a second header line (after the +) are supported

Limitations

  • Multi-line FASTQ files are not supported.
  • FASTQ parsing is the focus of this library. The FASTA parser is not as optimized.

Links

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

dnaio-0.7.1.tar.gz (147.1 kB view details)

Uploaded Source

Built Distributions

dnaio-0.7.1-cp310-cp310-win_amd64.whl (99.5 kB view details)

Uploaded CPython 3.10 Windows x86-64

dnaio-0.7.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (138.6 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

dnaio-0.7.1-cp39-cp39-win_amd64.whl (99.4 kB view details)

Uploaded CPython 3.9 Windows x86-64

dnaio-0.7.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (138.3 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

dnaio-0.7.1-cp38-cp38-win_amd64.whl (99.2 kB view details)

Uploaded CPython 3.8 Windows x86-64

dnaio-0.7.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (138.3 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

dnaio-0.7.1-cp37-cp37m-win_amd64.whl (97.5 kB view details)

Uploaded CPython 3.7m Windows x86-64

dnaio-0.7.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (135.5 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

dnaio-0.7.1-cp36-cp36m-win_amd64.whl (110.6 kB view details)

Uploaded CPython 3.6m Windows x86-64

dnaio-0.7.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (135.7 kB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

File details

Details for the file dnaio-0.7.1.tar.gz.

File metadata

  • Download URL: dnaio-0.7.1.tar.gz
  • Upload date:
  • Size: 147.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for dnaio-0.7.1.tar.gz
Algorithm Hash digest
SHA256 0e38abecfea0554cb8fd8e83d652c35c9f8033a6e9b48a75f7d5a3d951669fcf
MD5 f66eef6ee708ca52c4081f0c8f2c09a5
BLAKE2b-256 8604ad6bb422b44ea6ccfd3412381a08b07c17c854994650ed03a556c6d20f05

See more details on using hashes here.

File details

Details for the file dnaio-0.7.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: dnaio-0.7.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 99.5 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for dnaio-0.7.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e3fe549f3a082fba6702e720b5f5669b780cd10fae6ae60799edfa7755b3a813
MD5 9fb1885184a9133a0e119eab39f958ee
BLAKE2b-256 7aa3dde26c7ef837a9e187fed9bb1ec94cf1b5d725035866e6235007e52a9947

See more details on using hashes here.

File details

Details for the file dnaio-0.7.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.7.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 c055c5a894865de00055ab1515d4246e461e974ed4059af7f4c7547a32f6bab8
MD5 6ff096a04e13e0e28f94fb3563b579b0
BLAKE2b-256 faa97464ee7961471bbce2c012fde5a67fa29edab6302d6e85b9ff53afb3ff2e

See more details on using hashes here.

File details

Details for the file dnaio-0.7.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: dnaio-0.7.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 99.4 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for dnaio-0.7.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 bc6a187c073ec841671348d80530d6460ed015d334f8500c5c37fe8b0ccb6bdf
MD5 3784988d5ddbf0b7c4b5ff6102fa558d
BLAKE2b-256 40803738b38735431f7231b8197a174c43ab5b29ac0d367aed825cb29aa5c53d

See more details on using hashes here.

File details

Details for the file dnaio-0.7.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.7.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 9b4f42cebeef829c41f22d042d800d5c4519d592e5f6089bfbd3eebb70c2a3db
MD5 ab0c61c20bae91db93a4e9d0cea658b2
BLAKE2b-256 20fdb7e52baadd19380e76d50006490f8124b49a4b1a9e936d39cf8475c1e215

See more details on using hashes here.

File details

Details for the file dnaio-0.7.1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: dnaio-0.7.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 99.2 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for dnaio-0.7.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 a0fd5328d294f7084924c02702c6db350d494a813a462bf8bd9becbb87433649
MD5 ffb741866293f1a81326fabf3e961484
BLAKE2b-256 c1a803465d34e45b9700c22a032c27a85e155d9d6585e1e7d404a1c11dc9fb26

See more details on using hashes here.

File details

Details for the file dnaio-0.7.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.7.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 5fb918d8c279574ce4ff3b2b08c7a7695c6ad7f3a269e7bdfc27eb9907054d09
MD5 84bb9ecbdca8a87e5ddf88ff6ed4b055
BLAKE2b-256 7efb71011a692109f5472dc6404aef3244f75c5c3696f2aa72134c238e301dc7

See more details on using hashes here.

File details

Details for the file dnaio-0.7.1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: dnaio-0.7.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 97.5 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for dnaio-0.7.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 6852b41063ec7267273c8ca132a7fbfedb6583cb0888eb8b5916067670d80e79
MD5 a7d2ae64ea788f1c047a56753adfe510
BLAKE2b-256 672d9076ddac3c68f4622e3be31ed90ac3b699013887dcd195ed3012b89eae6a

See more details on using hashes here.

File details

Details for the file dnaio-0.7.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.7.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 8d91bf4ffb9e83c06d1ffcd15a856e06163ca2dedcea04d6978c7f8285c7e7a1
MD5 99d3d036edc52664b8edb47806a1d138
BLAKE2b-256 58022d164aa2a32ba68e2d633765004b1237e2864e134106f692905d9d65921f

See more details on using hashes here.

File details

Details for the file dnaio-0.7.1-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: dnaio-0.7.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 110.6 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for dnaio-0.7.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 6fe287380a4b631253c76be5f20ac1ff595b30649764d986c1837e4424c4cd70
MD5 1143ec4a7cce3b1eab4a44d671f2995b
BLAKE2b-256 d91710919e6657e4e9dac193e7b2d51e29d148d2a1301d7d1e9332d9d3ad62ab

See more details on using hashes here.

File details

Details for the file dnaio-0.7.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.7.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 099c137ab320bc4fb40d904c441f19ca328750c6e11691188244eec7fc9c2951
MD5 4efa28312dd37052bacc6fd3e4a5b7f3
BLAKE2b-256 944f3a8e9ec93436e6cd6c289486258e77dc92c504a7fe0b0e9e81b26bcbaba5

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