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

Uploaded Source

Built Distributions

dnaio-0.4.2-cp38-cp38-manylinux1_x86_64.whl (126.2 kB view details)

Uploaded CPython 3.8

dnaio-0.4.2-cp37-cp37m-manylinux1_x86_64.whl (125.7 kB view details)

Uploaded CPython 3.7m

dnaio-0.4.2-cp36-cp36m-manylinux1_x86_64.whl (126.3 kB view details)

Uploaded CPython 3.6m

dnaio-0.4.2-cp35-cp35m-manylinux1_x86_64.whl (124.6 kB view details)

Uploaded CPython 3.5m

File details

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

File metadata

  • Download URL: dnaio-0.4.2.tar.gz
  • Upload date:
  • Size: 125.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.7

File hashes

Hashes for dnaio-0.4.2.tar.gz
Algorithm Hash digest
SHA256 fa55a45bfd5d9272409b714158fb3a7de5dceac1034a0af84502c7f503ee84f8
MD5 380bb013a9294f62c6f6862750079151
BLAKE2b-256 be464aebdff29822d98010b2b6b5b50f690e9a804cbd072787e2642b43e7f3f3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dnaio-0.4.2-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 126.2 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.7

File hashes

Hashes for dnaio-0.4.2-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 d67d58b95e6f44090ee1f97964908e860b220e46f16a673f4d6423657da7d717
MD5 2a3b89493790b3c34cf6e99d370e698f
BLAKE2b-256 bf1a631558a0f66edfe91192a889d9177b115da2ceee8d5b0cae2c59a116c986

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dnaio-0.4.2-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 125.7 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.7

File hashes

Hashes for dnaio-0.4.2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 9392545ce718b51b1b250bbb619c7bf1134089ab68e10bdfe0d7b870aa094ca7
MD5 e3276e8410af33ed0957bb1d56c2555e
BLAKE2b-256 d5856ca6367492d5a1d39d8a43860d8c2c51e1070bc3f568433b8f91b2708f84

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dnaio-0.4.2-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 126.3 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.7

File hashes

Hashes for dnaio-0.4.2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 1fde52eae00b6d721a00054fc0685ea1c8b456c0d71809c24bfd54d425baaaf8
MD5 adda4cf664ab32b21701e7498c4d9884
BLAKE2b-256 f25739874cddcb57683c18591ed4c4ad899f56aaaa039e801e7facea59d32258

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dnaio-0.4.2-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 124.6 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.7

File hashes

Hashes for dnaio-0.4.2-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 69ce73c2a8a12678f384ae5a8f2359377d266ce4b8614095a069cabe7b06425c
MD5 68ac7f2b0491af29eb58e4739e2550b2
BLAKE2b-256 f769eaac59fd2af374d40bcec2975616904a945e1f89546ff3d04b1bc9340a96

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