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

Uploaded Source

Built Distributions

dnaio-0.5.1-cp39-cp39-manylinux1_x86_64.whl (121.2 kB view details)

Uploaded CPython 3.9

dnaio-0.5.1-cp38-cp38-manylinux1_x86_64.whl (121.6 kB view details)

Uploaded CPython 3.8

dnaio-0.5.1-cp37-cp37m-manylinux1_x86_64.whl (118.6 kB view details)

Uploaded CPython 3.7m

dnaio-0.5.1-cp36-cp36m-manylinux1_x86_64.whl (118.8 kB view details)

Uploaded CPython 3.6m

File details

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

File metadata

  • Download URL: dnaio-0.5.1.tar.gz
  • Upload date:
  • Size: 126.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

File hashes

Hashes for dnaio-0.5.1.tar.gz
Algorithm Hash digest
SHA256 c68ecffbf653dfe122f1c10fb8d7c5957ad68acc5c9035c66f81eba1a591d31c
MD5 4f1ac2ead2b0c1d879ac3b04e29e19a1
BLAKE2b-256 cf3b23ae800e7246acd3af9211b6913f49ea992e8e15559e4ea0a4e727671962

See more details on using hashes here.

File details

Details for the file dnaio-0.5.1-cp39-cp39-manylinux1_x86_64.whl.

File metadata

  • Download URL: dnaio-0.5.1-cp39-cp39-manylinux1_x86_64.whl
  • Upload date:
  • Size: 121.2 kB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

File hashes

Hashes for dnaio-0.5.1-cp39-cp39-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 cad74734664d8572763df2957f7b1c2be700c43697d1a6646c4b9511b9ba808e
MD5 82dd3f2aa08c59dbd2841ebff4c200f3
BLAKE2b-256 a3f698fa25509f3c3cd9bd4ca8b8cbc960a345b41411fb422db28f27bf804cea

See more details on using hashes here.

File details

Details for the file dnaio-0.5.1-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: dnaio-0.5.1-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 121.6 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

File hashes

Hashes for dnaio-0.5.1-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 fa4164ffe1ec5286e1dc84b5776af5c671cdd21e1188c1a5765aff2c9a54cd1c
MD5 8a7b802bdc625ce25fe2b723b64a7165
BLAKE2b-256 e463f49605606aaf0d2c547362955e1ad22b55202d0ec4d8dd4b5c61b794bd35

See more details on using hashes here.

File details

Details for the file dnaio-0.5.1-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: dnaio-0.5.1-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 118.6 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

File hashes

Hashes for dnaio-0.5.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7809de8b09546cd579c1d4abd27af61993e686becb9f25bd99831ec663770aa6
MD5 5d33112221714a431f8d7d1ae08402c5
BLAKE2b-256 0ce70d5965d46b221a891280eac59abbb2fae970f3349362d12281a584468511

See more details on using hashes here.

File details

Details for the file dnaio-0.5.1-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: dnaio-0.5.1-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 118.8 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

File hashes

Hashes for dnaio-0.5.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 2ca4d78020dfbeb36aeaf1c06c98a243a492a5ca63cd2ec980f545846a485e2d
MD5 9f17e0557952d6baf4634ba447d7a2f4
BLAKE2b-256 efc9bc06ab306bd8572c748dbad47e1ef23b8e9d7bf2b66a0661e9791af32748

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