Skip to main content

Read 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. You shouldn’t use them anyway.
  • 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.5.2.tar.gz (127.7 kB view details)

Uploaded Source

Built Distributions

dnaio-0.5.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (133.6 kB view details)

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

dnaio-0.5.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (133.3 kB view details)

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

dnaio-0.5.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (133.7 kB view details)

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

dnaio-0.5.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (130.5 kB view details)

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

dnaio-0.5.2-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (130.8 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.5.2.tar.gz.

File metadata

  • Download URL: dnaio-0.5.2.tar.gz
  • Upload date:
  • Size: 127.7 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.2 CPython/3.8.12

File hashes

Hashes for dnaio-0.5.2.tar.gz
Algorithm Hash digest
SHA256 549e1c6afa192a4bf79c112b57cc5e927b286ab9a3c2803d6577613a7e3ff180
MD5 2a89a33dcfdfa5039b42d8b359d6bca5
BLAKE2b-256 3d16333d19ac209a747f8c291cba3ba6ef266ba9de574a7d4ad2b992f2d5f224

See more details on using hashes here.

File details

Details for the file dnaio-0.5.2-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.5.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 abad782510e35ac35df59681f86546237ddc1f32a83bb592d2730fa14d517a1a
MD5 525208ab97b925ef1ff174046de50a59
BLAKE2b-256 ab52fe456b1df8cb29bc1a1d5d3af0fccdd9196150ae12a3689cf2dc45a9b893

See more details on using hashes here.

File details

Details for the file dnaio-0.5.2-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.5.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 b780231e851dbe6fe04a5b440118a40d7cbe40eec0168faab19da0b6a4475a03
MD5 355aeefbe6f9c31521b154dbc89fa6b0
BLAKE2b-256 178218bb26d58de96dd2e1b27a9741d1456001cef939d52cae85287062c2dcc8

See more details on using hashes here.

File details

Details for the file dnaio-0.5.2-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.5.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 5855c468dcf19f74bad4cc74ef2541b6d519c3d7a050a05d10ecc22e6710a14c
MD5 1c07c21b241e8d74e90e0cc6687ee150
BLAKE2b-256 608b56e2638cc64db123e77ec70e676b1adda004f9e06ef1bd3f0b39aa627daa

See more details on using hashes here.

File details

Details for the file dnaio-0.5.2-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.5.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 4df85a0d7b4699a298575e3a00bf1e13428a254295ffea847c3de4c38832bf90
MD5 7b5830f7829355c332e5679ec0e40cea
BLAKE2b-256 435a07594e2938158d537a814cbc8194ac4ba75f7be96262ec1d9e9fb96abb47

See more details on using hashes here.

File details

Details for the file dnaio-0.5.2-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.5.2-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 d4d798578465ba58429559a9d68b69ae69d6dfb507e3d5ef644ce3816d3b399d
MD5 608cfb5eecbc9f9feb6c6c66ac97d27c
BLAKE2b-256 4545dfd914e07d5f5bfd9241fe1925f05ef54463feed8ba5cebfc530d1fb5ea6

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