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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for dnaio-0.9.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 833e53c3391e05cbcd415d9c4c198b88affa0bc87ef3905bff5b2fc08da2acd3 |
|
MD5 | c8a24cb000e45c34d0d2f6bbb157340a |
|
BLAKE2b-256 | 88b419196262ada8ab0c461817bfdb42ae88130856a7d7cd3eaa6533a426f794 |
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 |
Hashes for dnaio-0.9.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bd15080fade8f5924dfd05dfda1bfaa2a52388d52c0787b6ab28dcaa33716b4 |
|
MD5 | 7680a2ed69edd18bfb8fddc5487203f5 |
|
BLAKE2b-256 | d32f0142fc0d8536daa50fae34c7e2f041036c7a94b97ccac712c5b36c163908 |
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 |
Hashes for dnaio-0.9.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0f3e3a1a5fa824e31d38ec452057f15728397de7987d4d0a5faaf3c9e1261fd |
|
MD5 | fabefdac6cd1e4e75771499fbfb37367 |
|
BLAKE2b-256 | 60d99685367c19aa2c2e9071bb992f5ad71355b711dbc07e3b4ef3dff404452f |
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 |
Hashes for dnaio-0.9.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a62984790d223b9289de5525fc27905c4a5989932808a15e56bd0758087d77d |
|
MD5 | 1039095cec2edce4690fc76f193d521e |
|
BLAKE2b-256 | 3145abf2bf72b2e54c5703766ee1508018249b88456862a244f77568be8ffbcd |
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 |