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

Uploaded Source

Built Distributions

dnaio-0.6.0rc1-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.0rc1-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.0rc1-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.0rc1-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.0rc1-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.0rc1.tar.gz.

File metadata

  • Download URL: dnaio-0.6.0rc1.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.0rc1.tar.gz
Algorithm Hash digest
SHA256 6a404ca661dd00e59b4cded190a5e4c13ba61fd66ddfa3f1c97e51c202c458ef
MD5 aabfaeaa4be10da7dec66e52488a44f0
BLAKE2b-256 2e1f394b6fad84fea7bb19e4592c15020d52e6d64cbef77e10383134bb6de6f9

See more details on using hashes here.

File details

Details for the file dnaio-0.6.0rc1-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.0rc1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 904d70520b47fc67ca64225c0c574ff526bdaa18aa51799a4ae6f81e8eb7b91c
MD5 4d7f58093459a8308b0efa6eb5f9e8ca
BLAKE2b-256 fa8da16f8a5246acfdb5d3ecde8905a9857f741df3f918aa84732bdcc68659fc

See more details on using hashes here.

File details

Details for the file dnaio-0.6.0rc1-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.0rc1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 5129614e09d9fc99453910a0631925e0c9ccd89c044d9634b82578d188f6a96c
MD5 ed59050fa0b4a00b733534638ac657d5
BLAKE2b-256 c6442783fd4bca9e3ce23b430c04f226722d957a70e69a3c54568b42126cba03

See more details on using hashes here.

File details

Details for the file dnaio-0.6.0rc1-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.0rc1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 4b2d4dc73c3875b01c753128203371c18c717419e3cf2b51b8d2b051acbf0af0
MD5 5569d69c685be5105726e3d6402ecfe5
BLAKE2b-256 1a76218019243a62b1d0a09305c2442ddda51b50435a4848a50bc35979115b2b

See more details on using hashes here.

File details

Details for the file dnaio-0.6.0rc1-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.0rc1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 1ab0b43488702bca4bfda866eb057e9a9d934eabd26267e9d5ba7add5b78c1e6
MD5 beaefafba00c9df3bc033a96204f2b5a
BLAKE2b-256 19e52edc9402b5a6407a08e28131600f376901f503848275ae89dda8ec517739

See more details on using hashes here.

File details

Details for the file dnaio-0.6.0rc1-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.0rc1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 8ba4dd949d2e628a54d1452fc9a6849e669b7c53e5116d5785ce265c07121eff
MD5 8f2869c473886011fc1b1e8bd44a2952
BLAKE2b-256 59ad13f85dfd23cc83128f63a554b90280793196a22a24a4ba953eb1fb12aaf7

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