Skip to main content

Read FASTA and FASTQ files efficiently

Project description

Travis PyPI Codecov

dnaio parses FASTQ and FASTA

dnaio is a Python 3 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.4.tar.gz (123.1 kB view details)

Uploaded Source

Built Distributions

dnaio-0.4-cp38-cp38-manylinux1_x86_64.whl (121.4 kB view details)

Uploaded CPython 3.8

dnaio-0.4-cp37-cp37m-manylinux1_x86_64.whl (121.4 kB view details)

Uploaded CPython 3.7m

dnaio-0.4-cp36-cp36m-manylinux1_x86_64.whl (122.0 kB view details)

Uploaded CPython 3.6m

dnaio-0.4-cp35-cp35m-manylinux1_x86_64.whl (120.4 kB view details)

Uploaded CPython 3.5m

dnaio-0.4-cp34-cp34m-manylinux1_x86_64.whl (120.3 kB view details)

Uploaded CPython 3.4m

File details

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

File metadata

  • Download URL: dnaio-0.4.tar.gz
  • Upload date:
  • Size: 123.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.7

File hashes

Hashes for dnaio-0.4.tar.gz
Algorithm Hash digest
SHA256 b0b46c9cc68cc842d1e5968ffd95de37a0987d2ac2c15a0613e2b12f9e47b918
MD5 e6043dd93e8f9c19de06e0594d1da727
BLAKE2b-256 89637faada886f14843eee160973c246fb74538283cce00235d9c2ec2381fcb5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dnaio-0.4-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 121.4 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.7

File hashes

Hashes for dnaio-0.4-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 149f39685c4a80c8c23d75ca8064791f6d69652453e032557a4ddfab4b963971
MD5 a73a3390187b4822275e66e4af2b8ae1
BLAKE2b-256 ae33e6ab08a65f24b49ab0f6a8ca5c07551a6e4676bd644ca9b56278a9b7b9ce

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dnaio-0.4-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 121.4 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.7

File hashes

Hashes for dnaio-0.4-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 cc7099609dde03ff64fafe92cca5fdcd364192281356302f455a2066da85f076
MD5 1f3476886d4dfd23e90234448b3db147
BLAKE2b-256 495bab195ba9c9c14bd46e92a27d655fad855f65e39cb818da2e9dc6781dd84e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dnaio-0.4-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 122.0 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.7

File hashes

Hashes for dnaio-0.4-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 61c92378320831c965f463c68efbc9ca8d6f10ead8c431400c98c8d25790bdcf
MD5 99f9454817d0961914e408984d9129a7
BLAKE2b-256 6f2be8e51a495c468b2ee15fd2933cae9b9612bd38126a3b68f97de10952078f

See more details on using hashes here.

File details

Details for the file dnaio-0.4-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: dnaio-0.4-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 120.4 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.7

File hashes

Hashes for dnaio-0.4-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8c4953b76fea71022505c59ad567a0c6fba0044286459d229ec8b6702d4a9ac3
MD5 fed91f63b22554f3f80b012a2c17c9c3
BLAKE2b-256 78a722f6662fd7b258284857f27512b8aef4acdd3f04e435e5f58ad2a21631f3

See more details on using hashes here.

File details

Details for the file dnaio-0.4-cp34-cp34m-manylinux1_x86_64.whl.

File metadata

  • Download URL: dnaio-0.4-cp34-cp34m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 120.3 kB
  • Tags: CPython 3.4m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.7

File hashes

Hashes for dnaio-0.4-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 918d72d490e64b64e1049a874fa76de8b398fa031a68f391cacbcb971c331684
MD5 bd9b0bd677f6dc93fa287acbb87cefdb
BLAKE2b-256 ecd95e09df994493bbde2c5e7b7207f45448501669d671275f61ac582088363a

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