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

Uploaded Source

Built Distributions

dnaio-0.5.0-cp39-cp39-manylinux1_x86_64.whl (120.2 kB view details)

Uploaded CPython 3.9

dnaio-0.5.0-cp38-cp38-manylinux1_x86_64.whl (120.6 kB view details)

Uploaded CPython 3.8

dnaio-0.5.0-cp37-cp37m-manylinux1_x86_64.whl (117.5 kB view details)

Uploaded CPython 3.7m

dnaio-0.5.0-cp36-cp36m-manylinux1_x86_64.whl (117.7 kB view details)

Uploaded CPython 3.6m

File details

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

File metadata

  • Download URL: dnaio-0.5.0.tar.gz
  • Upload date:
  • Size: 126.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for dnaio-0.5.0.tar.gz
Algorithm Hash digest
SHA256 6d01979159057954a265d81767f8cb26721a6d3a458601a73d1647792a50134c
MD5 10305d50b64fc3150f0f985b842ab611
BLAKE2b-256 7532710e24c5bb31ad680969a042428dedfa5741aee987afc2c7d177d3e4928f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dnaio-0.5.0-cp39-cp39-manylinux1_x86_64.whl
  • Upload date:
  • Size: 120.2 kB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for dnaio-0.5.0-cp39-cp39-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 442f0c91f9778123dcbc26ce9999eaa6addfdfae2da74d3b270df0ea91137001
MD5 3c52bffafc1ff548ba7b05f527d0cbea
BLAKE2b-256 f9dd3c656880b5ea4570b67f50f46c66437ecad2f8cfd4f6460b8b87763f06ee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dnaio-0.5.0-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 120.6 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for dnaio-0.5.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8d79112afc880e9a728e5a515d36e4e4a57cc69df9dd9ddb2d99f9de800a25c0
MD5 74b966205ef24821ef7cf712160cf084
BLAKE2b-256 98715ab89a02f9d84226a87fe7d12f84518a52cf72a2efa392e77e1567512d4a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dnaio-0.5.0-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 117.5 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for dnaio-0.5.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 3e977fc748425acc8fe0762c13eb61e0352e9f7405fb175de41e3b6e2f9a8dca
MD5 dac574216d8ad787e27cb09410089f84
BLAKE2b-256 3f132ab2591e68dc726100048c83d4f258e3517137dfc36c055a0df4603302d0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dnaio-0.5.0-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 117.7 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for dnaio-0.5.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a78de552ba1495540cd6f174363f6b28433eae86eb748f94a58a3a5683284175
MD5 63dff9635a7839c85d447f4bfedf58eb
BLAKE2b-256 1e979f0b5e894e2ba89c71d7008e01c592bf18192850b83e60aa161fe2f1bb92

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