Skip to main content

Read and write FASTA and FASTQ files efficiently

Project description

GitHub Actions badge PyPI badge Codecov badge

dnaio processes FASTQ and FASTA files

dnaio is a Python 3.7+ library for very efficient parsing and writing of FASTQ and also FASTA files. The code was previously part of the Cutadapt tool and has been improved significantly 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")

For more, see the tutorial and API documentation.

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.

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.9.1.tar.gz (41.6 kB view details)

Uploaded Source

Built Distributions

dnaio-0.9.1-cp310-cp310-win_amd64.whl (56.0 kB view details)

Uploaded CPython 3.10 Windows x86-64

dnaio-0.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (72.3 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

dnaio-0.9.1-cp310-cp310-macosx_10_9_x86_64.whl (63.7 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

dnaio-0.9.1-cp39-cp39-win_amd64.whl (57.5 kB view details)

Uploaded CPython 3.9 Windows x86-64

dnaio-0.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (76.0 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

dnaio-0.9.1-cp39-cp39-macosx_10_9_x86_64.whl (64.5 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

dnaio-0.9.1-cp38-cp38-win_amd64.whl (57.5 kB view details)

Uploaded CPython 3.8 Windows x86-64

dnaio-0.9.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (77.4 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

dnaio-0.9.1-cp38-cp38-macosx_10_9_x86_64.whl (62.7 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

dnaio-0.9.1-cp37-cp37m-win_amd64.whl (57.1 kB view details)

Uploaded CPython 3.7m Windows x86-64

dnaio-0.9.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (75.3 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

dnaio-0.9.1-cp37-cp37m-macosx_10_9_x86_64.whl (62.0 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: dnaio-0.9.1.tar.gz
  • Upload date:
  • Size: 41.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for dnaio-0.9.1.tar.gz
Algorithm Hash digest
SHA256 a1a14181995b27197b7e2b8897994a3107c649b9fc2dfe263caff3c455b0d0c4
MD5 57c5a262dcb9dfbfa5701f3a8a82c707
BLAKE2b-256 9e0e43a7114773a69dec82167f696fb7518517991546b7e4e2a27c7762de3fa6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dnaio-0.9.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 56.0 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for dnaio-0.9.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 bae0b28c6ed8f89ff8534158c721118ff5525aa18524bcd348f19858005a7464
MD5 74d98ed4077383c4304f11fb557b5dba
BLAKE2b-256 860d65c1353b02327229b5eac26ababd9eb65de573310f9e35e78fe917acf08a

See more details on using hashes here.

File details

Details for the file dnaio-0.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 337181027fd0c3f233476c4dfa0859865cc8364c9908709623dd282ffdbe759a
MD5 87a7a3398a2f18229e7b3b80881dca60
BLAKE2b-256 f64581e7204acaa5c579192fb9a7604ab50ef21057f882c6ee37380b740fba86

See more details on using hashes here.

File details

Details for the file dnaio-0.9.1-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.9.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0c3a43af7860e0bb7c263241e0ae89fafaf5f5758af98dfbef0bfab9f3cd8117
MD5 df25f917f7a9c2184d6cadfd888e2db7
BLAKE2b-256 8ad802156c81310e3d4ccdce422c0b96d37fb60799b3588bb43a9ea4ce69a0ff

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dnaio-0.9.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 57.5 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for dnaio-0.9.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 fa3d9255cbfa069bc542c5ffb6b68f5682dfd25dba56a36224dc7942ac3962d5
MD5 feab5d7406ecead43c4e0ef4866350b6
BLAKE2b-256 7cc399932a31a808f8a1e66df2422ad2a4ff9b31f564cb9000807f5aa607ab6b

See more details on using hashes here.

File details

Details for the file dnaio-0.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2a34764bfcc712411db3e10a97ecb0adfbff622aec6f7928dd829284d3706f04
MD5 f43c5e46e10fe825cdbf76b9dd1ead38
BLAKE2b-256 1417d137f59fd8e607e7e128014f9eb671967685496697ed5016dd76a688ad4f

See more details on using hashes here.

File details

Details for the file dnaio-0.9.1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.9.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4f3ac88a063b0c1ca0c0913e5884be832d5b5eeca806eb275278404eea43f275
MD5 959b9c2a990ed2f1d85840d1103476f9
BLAKE2b-256 1993c2d4e8a614b05b08ce96e7d0097b12cb6a179787ef3bc1dc3168fd5a173d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dnaio-0.9.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 57.5 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for dnaio-0.9.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 27eca2801e7b344c95933f9e03c40ab22201bfdce799387edd1d2b69c8b64ad6
MD5 1d460209a9fa7b68e4b6b6f657e0117d
BLAKE2b-256 7bc591a762ca2d9a72d26f98cb3b9f7ed0b9120c25e2d387bb3528b1dd13591f

See more details on using hashes here.

File details

Details for the file dnaio-0.9.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.9.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0f943a2ee63ddefd2a76818fa5ca2cc70dd78d86a607f76cf23340f6e2df0e2c
MD5 146a8553aeb8312112588a8d8e74e703
BLAKE2b-256 0e29d03fe1dfee12796e012b06d1cf74daa1da934a476863fe94a893fca935cf

See more details on using hashes here.

File details

Details for the file dnaio-0.9.1-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.9.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0c3e7a530d8c5e497d03dabcc1a86d65a0b26ef4952e710272382855ce1562bc
MD5 220176cf7519c691dae786ed9f6f36d8
BLAKE2b-256 d634ef4aa3a1ef51c16e6d22fb14fa1b8b7ea812ba978a7d80324745985e664b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dnaio-0.9.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 57.1 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for dnaio-0.9.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 aa809405475510f041393f0cb93213d9a405be0e75b8cd88c0fb07567b32ccbb
MD5 d3750938c27a1b0e43f606a928544e4c
BLAKE2b-256 7c4b0d2a6b057b29b0c5e9f1c7848adb82a6d568fb6c06543efc2854dac7901e

See more details on using hashes here.

File details

Details for the file dnaio-0.9.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.9.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 aeb23d9cdbbcd95cbae4c5a488c528addd2a340fa1e7045c0c0ef633d0fa510c
MD5 767de4d4ca5a60160fb263f2c77a94e5
BLAKE2b-256 1ff64d9b84221b84c4874050d32e630b3fa5cf23ddf6196faffc9795664a4923

See more details on using hashes here.

File details

Details for the file dnaio-0.9.1-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.9.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 89be8634124b16d03fa334abe09d587a425ef36843a20d56ed8da7fddf9fdb46
MD5 9609f673d2633a7842233398876a0778
BLAKE2b-256 c03294517a7d5963b6a76e02ead0a04eb376e0b5c3d8b9dc1b15e26bb623f9ce

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