Skip to main content

Read FASTA and FASTQ files efficiently

Project description

Travis PyPI

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

Uploaded Source

Built Distributions

dnaio-0.2-cp37-cp37m-manylinux1_x86_64.whl (415.6 kB view details)

Uploaded CPython 3.7m

dnaio-0.2-cp36-cp36m-manylinux1_x86_64.whl (418.9 kB view details)

Uploaded CPython 3.6m

dnaio-0.2-cp35-cp35m-manylinux1_x86_64.whl (408.6 kB view details)

Uploaded CPython 3.5m

dnaio-0.2-cp34-cp34m-manylinux1_x86_64.whl (418.5 kB view details)

Uploaded CPython 3.4m

File details

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

File metadata

  • Download URL: dnaio-0.2.tar.gz
  • Upload date:
  • Size: 138.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3

File hashes

Hashes for dnaio-0.2.tar.gz
Algorithm Hash digest
SHA256 9207f9d00d6b3ed12536160acea598922e6ab7cc98f463ba94dc7c6040292fcb
MD5 18cfe7a6d500d0c5fc6ca54106e9551d
BLAKE2b-256 746dbc26d144dbf2cbd67ea5f7361455605ccdf5d9517610233094261a8fda1c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dnaio-0.2-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 415.6 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3

File hashes

Hashes for dnaio-0.2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 42f001c815cdd4a4f286328a767f45582c9df83bad7e56d8de06e13469b43dbc
MD5 216b7f126d3abf816a588c06fa598486
BLAKE2b-256 ca7564a89852b0f7ba8650f2b81e5519e90850058b2474d0b921a6f4a2dba26a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dnaio-0.2-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 418.9 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3

File hashes

Hashes for dnaio-0.2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e4c856f86a15e52d83224463aaa074501e8f7d2204cd9fef56460f7e74ef9e54
MD5 103c674c79596019677eed2785075da9
BLAKE2b-256 6d443b3343845c2c678640d479c69a18384b361e873c88865afaa3ff7d9a4e23

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dnaio-0.2-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 408.6 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3

File hashes

Hashes for dnaio-0.2-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 049598c04ca6ec9a35f936264045dc81ddb8a721a133167cd93e5ed789a75164
MD5 f242dc004112a5697dd252ec543a57a5
BLAKE2b-256 3a2817da52ba84b326db26b2ebb5709b51f5ab29392b9f62e3b0597e6607d31f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dnaio-0.2-cp34-cp34m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 418.5 kB
  • Tags: CPython 3.4m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3

File hashes

Hashes for dnaio-0.2-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 125eefad203bda9c5cf28add213a5f40b31df6c80e7a54ad71e5fe8cbae7f7ab
MD5 dfb885a0eeff3250596341ca20f30d6f
BLAKE2b-256 649a998cda0f198cabdb1cf2109e3be1a18277e940c0a3d69d86797526e5ec53

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