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

Uploaded Source

Built Distributions

dnaio-0.6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (136.7 kB view details)

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

dnaio-0.6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (136.5 kB view details)

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

dnaio-0.6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (136.7 kB view details)

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

dnaio-0.6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (133.8 kB view details)

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

dnaio-0.6.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (133.9 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.6.0.tar.gz.

File metadata

  • Download URL: dnaio-0.6.0.tar.gz
  • Upload date:
  • Size: 131.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for dnaio-0.6.0.tar.gz
Algorithm Hash digest
SHA256 91fff1e13856d0922c932bde5b063d521a7099eb23723424197f09ac95f76593
MD5 79342cd07b7bf272fc6cd0ea4272c3e2
BLAKE2b-256 5e76c6dc4cd47aeb9a8b6d3f00762fd0003d5cdc56568ba8dc7df77aa2c7722d

See more details on using hashes here.

File details

Details for the file dnaio-0.6.0-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.6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 b53c0ef1a72084e9e8d8132139e79776b2918092422f06d692fe3c41581960d6
MD5 88cafd088a4c0a8167aa05be1c999ace
BLAKE2b-256 56ebf19f3d9ec40e430495384ccbe8989aa0d743192531d4bd474215e946da12

See more details on using hashes here.

File details

Details for the file dnaio-0.6.0-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.6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 f19b19e03d46757419f4a11b7ceff42014d251527ce6b57057c44abc4a674a67
MD5 b5baba5bc663108120885cb5f0b12efb
BLAKE2b-256 ec5eee83d3bc2d7e996e675ee4aa5c1674f7cb21d05938b57179f1fc6ce72785

See more details on using hashes here.

File details

Details for the file dnaio-0.6.0-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.6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 d0eed9c2f314192f9bebc466d5445f1ade2ca312c4c7dd653439882a0ab8d697
MD5 c2107700489f1a51defb8447d30c0e30
BLAKE2b-256 0ce1c77248b1bf7fba23fa1c15e1fe65ee83185a73a5d449f626c58422a9b564

See more details on using hashes here.

File details

Details for the file dnaio-0.6.0-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.6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 3d840f33996a0bd66558e6501e7083ca7b2c87ce5a7efa12cbfb97ff2d14a141
MD5 15cd47eabfacc9981046b18551f845fc
BLAKE2b-256 01df90066e26e26860a4692e64b677af80ba2d00fa68a00192c60e7d9b371db7

See more details on using hashes here.

File details

Details for the file dnaio-0.6.0-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.6.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 27b8de7b0709670ec093d39adc012b39196757876856fddf992dc17abedab02b
MD5 17b95c5c6bb1c17f529913449b97a0c2
BLAKE2b-256 702874bab0fa95ed2e2ed630fda5b970d87e52a895ad49e70f1eb73dc5884d84

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