Skip to main content

Read and write FASTA and FASTQ files efficiently

Project description

GitHub Actions badge PyPI badge Codecov badge

dnaio processes FASTQ and FASTA files

dnaio is a Python 3.7+ library for very efficient parsing and writing of FASTQ and also FASTA files. The code was previously part of the Cutadapt tool and has been improved significantly 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")

For more, see the tutorial and API documentation.

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.

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

Uploaded Source

Built Distributions

dnaio-0.10.0-cp311-cp311-win_amd64.whl (61.9 kB view details)

Uploaded CPython 3.11 Windows x86-64

dnaio-0.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (81.0 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

dnaio-0.10.0-cp311-cp311-macosx_10_9_x86_64.whl (69.8 kB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

dnaio-0.10.0-cp310-cp310-win_amd64.whl (63.1 kB view details)

Uploaded CPython 3.10 Windows x86-64

dnaio-0.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (81.8 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

dnaio-0.10.0-cp310-cp310-macosx_10_9_x86_64.whl (71.5 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

dnaio-0.10.0-cp39-cp39-win_amd64.whl (65.3 kB view details)

Uploaded CPython 3.9 Windows x86-64

dnaio-0.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (86.2 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

dnaio-0.10.0-cp39-cp39-macosx_10_9_x86_64.whl (72.9 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

dnaio-0.10.0-cp38-cp38-win_amd64.whl (65.2 kB view details)

Uploaded CPython 3.8 Windows x86-64

dnaio-0.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (86.2 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

dnaio-0.10.0-cp38-cp38-macosx_10_9_x86_64.whl (71.3 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

dnaio-0.10.0-cp37-cp37m-win_amd64.whl (64.5 kB view details)

Uploaded CPython 3.7m Windows x86-64

dnaio-0.10.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (85.4 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

dnaio-0.10.0-cp37-cp37m-macosx_10_9_x86_64.whl (70.5 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: dnaio-0.10.0.tar.gz
  • Upload date:
  • Size: 45.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.15

File hashes

Hashes for dnaio-0.10.0.tar.gz
Algorithm Hash digest
SHA256 de51a50948f00b864297d74eddb588fbee5ac229855754e77564d18b24619d18
MD5 3641c1437a9ddec8ec65213ae078285e
BLAKE2b-256 edfcd46a2dd24b238fbf4592a699b1250399ccb1bb8a516ee9c0fc9f30deae17

See more details on using hashes here.

File details

Details for the file dnaio-0.10.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: dnaio-0.10.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 61.9 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.15

File hashes

Hashes for dnaio-0.10.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 eb75552d373669ca205b2f98d374f960a448da59eeb8f6977c57df52924c2caf
MD5 c5d6e6d079b9fa423548270764d73ecb
BLAKE2b-256 6db335785095063e3acee880aa754c5ff9bd022e94b8a0129f349190237681d8

See more details on using hashes here.

File details

Details for the file dnaio-0.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 47232242cf8ddb7df3da26006b22fc28ff87e08d8b36f4f84dc1e2a60bb6f354
MD5 995e55ab6255338a69e11f405b0db288
BLAKE2b-256 98eef8cffc886bc4d611c0c6d40589977b21201be54489dad043aa2feb504dc2

See more details on using hashes here.

File details

Details for the file dnaio-0.10.0-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.10.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f9dc2171e777e3d35391fdcd09e92bdaa121cb7fe426c50633372da1bef93961
MD5 686ef2d7a87c5068aed2f8c26d315e1d
BLAKE2b-256 8ed731ca67bb9dfeb80ae7996be5595092f2b89276774575ac2d295248537a8c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dnaio-0.10.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 63.1 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.15

File hashes

Hashes for dnaio-0.10.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 baf3a9be3b14a444c51011711365234efa26d2e57574579c0f46e6a61bbed84c
MD5 92307a41fc78d207cfc420dc82bf62d6
BLAKE2b-256 f0715b9c8cabdd041635e7f33080271c73cfc2e36ccadff7bc48a76907142577

See more details on using hashes here.

File details

Details for the file dnaio-0.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 aa38e2215a2774929207f7a8da906fdd831d468a555e635b6ec570f2acf2e82d
MD5 3dee09fcdd93d76414d75d3f111d8880
BLAKE2b-256 8b87d106d352cea8c3b7624b651e0686b0618cf0b20991bedeae26b38248610c

See more details on using hashes here.

File details

Details for the file dnaio-0.10.0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.10.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f9ff5cd7166b5d8c260c24c4f8e922e6e04c77310b743705072fb2d543c31314
MD5 bff1cfedc61a02a927aa4de6adac40bb
BLAKE2b-256 1540b6b2994c3043f37526703940936746b2223d8e645c6c23f0d13760240e7a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dnaio-0.10.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 65.3 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.15

File hashes

Hashes for dnaio-0.10.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 1448d222cb942ff28b8e99ee1c615204be160be3db395aa5f4ca19ab4cca496f
MD5 8cbb7d07c69ecb0e5bf9b645e37fc68f
BLAKE2b-256 5133b449aacf7a95b063c23e797df700bd886b0886ae6d92d6dc0f515c5ef610

See more details on using hashes here.

File details

Details for the file dnaio-0.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9c1dea14ce39268f4f7b958fac402d7e6387e6594b68a8283f8f82a37c104104
MD5 bccc9c535f63a8d6eb9d0b45eee32e73
BLAKE2b-256 8d53201c155abbafa941904c54703394e67fdc50a829431443bc6a1bf7bb409c

See more details on using hashes here.

File details

Details for the file dnaio-0.10.0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.10.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 93e46cb77b0012af380824f9f6b274425afa52b588c699fbb75dbb3a7ebcf94c
MD5 4cdee84a584c42aac6d1e65e6c9be67d
BLAKE2b-256 d38084463056baca36b5b1c872cf71229043e706e01431566c332119750e7d92

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dnaio-0.10.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 65.2 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.15

File hashes

Hashes for dnaio-0.10.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 630d7f5cd07a3536deb5d31d3f03c9acfab609d211cd5c51d9ab8e046fa2f805
MD5 4c7b76c692d04a991e028439de342ca8
BLAKE2b-256 228973346b0a97cc7f9f7263ec58102239a257b83e481bc060bfb38f11a14be9

See more details on using hashes here.

File details

Details for the file dnaio-0.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5b11e0dec5195db7206a1a5bb1adfa31054757bb5354c90e933c43753edd05be
MD5 ff31229b03c0e6767863323cf82d13fc
BLAKE2b-256 2265ada27ba32523b6606f1c3b42949f06ab59393d48d0aab5bda699d2a7f2c8

See more details on using hashes here.

File details

Details for the file dnaio-0.10.0-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.10.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 044c1170ee5a5680c7932e28b9b4b0bc21c481b1a7ef1ce016ece772b321ebe7
MD5 9338203248b0abd9f410ccdb514305b7
BLAKE2b-256 7763149e8bd29aafa95e57ffa6eabf7094d3e4831eb86dddd987d241bd7a2d37

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dnaio-0.10.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 64.5 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.15

File hashes

Hashes for dnaio-0.10.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 7b980099c591f870c224ee5158641b8ed65853eb01e4dac7d84f58f1c567623f
MD5 a017db47ee8a9640aeb5ff0ef567de13
BLAKE2b-256 37f1356b6c27235fdc9dd2f448246cf2c0c0bdecaf4ba4048c2c4ed6f75f9f95

See more details on using hashes here.

File details

Details for the file dnaio-0.10.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.10.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a2cd08f600bded04fbe35eeb18345d5a1be2a830a3c655f136739ee11adfe82c
MD5 0b5661c8792bc846ce89206ff643d8ff
BLAKE2b-256 399d4fe14354b3c6e89f11ed92a5d4af9ff793f8eb3f9e55470191efae0918fe

See more details on using hashes here.

File details

Details for the file dnaio-0.10.0-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for dnaio-0.10.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 dd10fb44dd23829c006dd4d9201b4c7fff7e06b617655f9b453155dbb85f5058
MD5 f5e9250ed0364d1b3e5fc1bb77a17d68
BLAKE2b-256 9c61f607201c98524d5a836141b703685c484675046cb7cd2877e7db2ee10352

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