Skip to main content

Read and write 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.
  • 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.7.0.tar.gz (146.8 kB view details)

Uploaded Source

Built Distributions

dnaio-0.7.0-cp310-cp310-win_amd64.whl (99.5 kB view details)

Uploaded CPython 3.10 Windows x86-64

dnaio-0.7.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (138.5 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

dnaio-0.7.0-cp39-cp39-win_amd64.whl (99.3 kB view details)

Uploaded CPython 3.9 Windows x86-64

dnaio-0.7.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (138.3 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

dnaio-0.7.0-cp38-cp38-win_amd64.whl (99.2 kB view details)

Uploaded CPython 3.8 Windows x86-64

dnaio-0.7.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (138.2 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

dnaio-0.7.0-cp37-cp37m-win_amd64.whl (97.4 kB view details)

Uploaded CPython 3.7m Windows x86-64

dnaio-0.7.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (135.4 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

dnaio-0.7.0-cp36-cp36m-win_amd64.whl (110.5 kB view details)

Uploaded CPython 3.6m Windows x86-64

dnaio-0.7.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (135.6 kB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

File details

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

File metadata

  • Download URL: dnaio-0.7.0.tar.gz
  • Upload date:
  • Size: 146.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for dnaio-0.7.0.tar.gz
Algorithm Hash digest
SHA256 03a370a645a61cd7dfb7591d989faa9426ea3a0691e83c95374c23171206f45c
MD5 d63c1e6bf0ddd135d27230d710f77d5f
BLAKE2b-256 13f417aab3fed884434418744dd1d020b344b90ac96512d8cd68308fd0796c63

See more details on using hashes here.

File details

Details for the file dnaio-0.7.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: dnaio-0.7.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 99.5 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for dnaio-0.7.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8032690e9c556397f2d6b284bb997957a31c4e5cff49a8c3feaddbd52883ba7d
MD5 a5c568071d9556815d21154d04e49730
BLAKE2b-256 951d417953ce81ea0dc25602f41c1ca932a1aadf5f02079fa1ffe638c7d2b161

See more details on using hashes here.

File details

Details for the file dnaio-0.7.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.7.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 d7c55f692d66c94be3f6ae8944ffe4e502c862db17fa72125ef0045217329607
MD5 d195206e76c2a1a1a7067ba1888067c8
BLAKE2b-256 1fec20d92b0a8ecf892cd5b4e8fbe25ae30976a391b85a49df365164ef5ba8a8

See more details on using hashes here.

File details

Details for the file dnaio-0.7.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: dnaio-0.7.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 99.3 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for dnaio-0.7.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 05875eeff58cc8e00c25798b26154772ef7866a93327c4f8cbf9f952442b7135
MD5 25fff7419ee4cafe1da1ead0767927c9
BLAKE2b-256 03889a32e3235f59229e1ed381f0c6076e5bee057c5a9b8f4e93e40deadd2b15

See more details on using hashes here.

File details

Details for the file dnaio-0.7.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.7.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 cad1b493cc0395078c4671ba29df356f1927b580ef2b2ba7f3c68e9d0ecfd010
MD5 a04268be995093739e34cfcb5602234e
BLAKE2b-256 3e53d74d81bcee59ebcc1a6e3ce31f9b4c589473573064fec4350f091b0375c8

See more details on using hashes here.

File details

Details for the file dnaio-0.7.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: dnaio-0.7.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 99.2 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for dnaio-0.7.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 f9ad534dca81966d996f23f6cd1a41075b0ce51e4e6718177419a150b12aa4d8
MD5 f4ee0c39152a339318aaf8c0a9d7ed8f
BLAKE2b-256 3ec50c32123d30c9d1ed9292333e8bc94df0333cae6b44fc69063a959acb85bb

See more details on using hashes here.

File details

Details for the file dnaio-0.7.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.7.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 d8e701011eaa41287ce5c280804f9df997966c28357bd44a15043ee50e68daee
MD5 438b09c85e3b45cb2716fa8346b60df1
BLAKE2b-256 a374b2091dfc712c6f84ee955483f2dd2c58209249a1718a529163b1074b7d18

See more details on using hashes here.

File details

Details for the file dnaio-0.7.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: dnaio-0.7.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 97.4 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for dnaio-0.7.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 5c9b85d282ae314de93b1612468a536a3c6cf45216a1d4ebf5407c7d33dbde98
MD5 537f5bac1c6a3830a817e0427b574380
BLAKE2b-256 6806a6527e430dfa2dff74aa57ff9321feaa45bd9e45a053e434aca99c90e22a

See more details on using hashes here.

File details

Details for the file dnaio-0.7.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.7.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 639f7cc2008e884b49a71e68df8a53652fe9a144e248a50b9a707690291c7aed
MD5 b0c51f3108cfccabaefc6aaeb6a3cc2f
BLAKE2b-256 3c918de3592bffeb516d443a9ecb36acb64a43bf4285888474a66d1443d59e21

See more details on using hashes here.

File details

Details for the file dnaio-0.7.0-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: dnaio-0.7.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 110.5 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for dnaio-0.7.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 4b53212807b8006a0eb7cc71e0b098debfb896bb655494c5ca116e770f2b7c7c
MD5 c56369bbeced20a426b1d11a5a06d9b4
BLAKE2b-256 0c36e61e3f1a1f35aaae72216086356e40992a99f54039b8c4cd295ee73af8ff

See more details on using hashes here.

File details

Details for the file dnaio-0.7.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.7.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 4cd15f0ea43e52afa4f4ece50e15310ec1005066365935d7576e0fc1640ea734
MD5 13b403d35bf33cf78082ee88d8c8b726
BLAKE2b-256 fb7c1e9ac831dc2904a84a1d1c9eec3d8169c21fd2652541d1d23fd8dd5686be

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