Skip to main content

Read and write FASTA and FASTQ files efficiently

Project description

.. image:: https://github.com/marcelm/dnaio/workflows/CI/badge.svg :alt: GitHub Actions badge

.. image:: https://img.shields.io/pypi/v/dnaio.svg?branch=main :target: https://pypi.python.org/pypi/dnaio :alt: PyPI badge

.. image:: https://codecov.io/gh/marcelm/dnaio/branch/master/graph/badge.svg :target: https://codecov.io/gh/marcelm/dnaio :alt: 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 <https://cutadapt.readthedocs.io/>_ tool and has been improved significantly since it has been split out.

Example usage

The main interface is the dnaio.open <https://dnaio.readthedocs.io/en/latest/api.html>_ 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")

See the documentation <https://dnaio.readthedocs.io/>_ for more.

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

  • Documentation <https://dnaio.readthedocs.io/>_
  • Source code <https://github.com/marcelm/dnaio/>_
  • Report an issue <https://github.com/marcelm/dnaio/issues>_
  • Project page on PyPI <https://pypi.python.org/pypi/dnaio/>_

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

Uploaded Source

Built Distributions

dnaio-0.9.0-cp310-cp310-win_amd64.whl (55.4 kB view details)

Uploaded CPython 3.10 Windows x86-64

dnaio-0.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (71.8 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

dnaio-0.9.0-cp39-cp39-win_amd64.whl (57.0 kB view details)

Uploaded CPython 3.9 Windows x86-64

dnaio-0.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (75.5 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

dnaio-0.9.0-cp38-cp38-win_amd64.whl (56.9 kB view details)

Uploaded CPython 3.8 Windows x86-64

dnaio-0.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (76.9 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

dnaio-0.9.0-cp37-cp37m-win_amd64.whl (56.5 kB view details)

Uploaded CPython 3.7m Windows x86-64

dnaio-0.9.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (74.8 kB view details)

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

File details

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

File metadata

  • Download URL: dnaio-0.9.0.tar.gz
  • Upload date:
  • Size: 41.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for dnaio-0.9.0.tar.gz
Algorithm Hash digest
SHA256 f7850149d81848cc6e1c3a5a54f242928323c6b9a8800a7f47b909e655a87c92
MD5 796908050a6fc21f62de27aa5517924c
BLAKE2b-256 a56ee2bc8c1e579d8c53057427414bb93c58f356e2a2d54f8908fd2f7db2a04c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dnaio-0.9.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 55.4 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for dnaio-0.9.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 833e53c3391e05cbcd415d9c4c198b88affa0bc87ef3905bff5b2fc08da2acd3
MD5 c8a24cb000e45c34d0d2f6bbb157340a
BLAKE2b-256 88b419196262ada8ab0c461817bfdb42ae88130856a7d7cd3eaa6533a426f794

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dnaio-0.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2d01346fd8327785259f28c33f015f8b5ec5eaef75eb3fcc66232db23ccf2718
MD5 cb076003df583f7ec88078dd99c62235
BLAKE2b-256 f80f265df23e4d48600ea85d78c0b3da0077fca607affad9588e35a7015e9571

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dnaio-0.9.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 57.0 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for dnaio-0.9.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 8bd15080fade8f5924dfd05dfda1bfaa2a52388d52c0787b6ab28dcaa33716b4
MD5 7680a2ed69edd18bfb8fddc5487203f5
BLAKE2b-256 d32f0142fc0d8536daa50fae34c7e2f041036c7a94b97ccac712c5b36c163908

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dnaio-0.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a341d0f5b9acb56887490677efb0cd61650d301695ff84a7c5b1606020a29cd9
MD5 59467700ef7a545bbbcd8f39b8d2a97e
BLAKE2b-256 291f7ebc11ab079fb18966105f20ba14df3fd5dbaa63c2af1da4e9d23bde640e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dnaio-0.9.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 56.9 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for dnaio-0.9.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 b0f3e3a1a5fa824e31d38ec452057f15728397de7987d4d0a5faaf3c9e1261fd
MD5 fabefdac6cd1e4e75771499fbfb37367
BLAKE2b-256 60d99685367c19aa2c2e9071bb992f5ad71355b711dbc07e3b4ef3dff404452f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dnaio-0.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c1fe8d042bb3608bcf90caa174d3dc53551c3d84a76f1add711828d14f2410fd
MD5 59942a4a672015f2c751474c52907e19
BLAKE2b-256 7ce4e17a90bc2cf8212069e87b82bc433c54b04f93e21d962e445e9ee783648b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for dnaio-0.9.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 5a62984790d223b9289de5525fc27905c4a5989932808a15e56bd0758087d77d
MD5 1039095cec2edce4690fc76f193d521e
BLAKE2b-256 3145abf2bf72b2e54c5703766ee1508018249b88456862a244f77568be8ffbcd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dnaio-0.9.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 25ee10d3af04e7f808a504530a345d655c7d031c72bdd36d24e98d0c5f9acf88
MD5 a97c83d429cff8aa002940d638121848
BLAKE2b-256 32cc06d8e3262e5f4c8a931807cfd0500a31873bdd5417ed77a5d77072686c3b

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