Read and write FASTA and FASTQ files efficiently
Project description
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.
Links
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
File details
Details for the file dnaio-1.0.1.tar.gz
.
File metadata
- Download URL: dnaio-1.0.1.tar.gz
- Upload date:
- Size: 45.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48cb0a8763d91aee329414f7756ee635dd78f6c059d5dbd0de78fb3b15f8a32a |
|
MD5 | f4a13861a2b9ce4bfba11ed8b4c02b1d |
|
BLAKE2b-256 | 456529b0648880cc84906c5e66433b89cd63f1b001fe46c33761091302dd65ea |
File details
Details for the file dnaio-1.0.1-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: dnaio-1.0.1-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 74.5 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d69fd1052619f10e73a83d476e3fb31638f7cdca82192c404c52cbb1a0aceff |
|
MD5 | f55d8d952dccca8878464f9239eefa0e |
|
BLAKE2b-256 | 45375672f2dc5f5514d8650525693a93c9e505633d4e85d607529bdec156b58c |
File details
Details for the file dnaio-1.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: dnaio-1.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 93.0 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6e079e0669e7e471cb284b9b068fb9113c4e8f4e288523472c289a77b224286 |
|
MD5 | 9aba09a3c6513f5a1a3d5fe723979975 |
|
BLAKE2b-256 | 354b7d85ad5a23585885554b6209c6a9cef2b9a060e5fa09a6cead48089eac0e |
File details
Details for the file dnaio-1.0.1-cp312-cp312-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: dnaio-1.0.1-cp312-cp312-macosx_10_9_x86_64.whl
- Upload date:
- Size: 79.7 kB
- Tags: CPython 3.12, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 026d05c085f36bd24b5893147db9d7ee70164def01ca84ee95c6db71175965d2 |
|
MD5 | 9c86882901d3faa320e0f360b573e1fa |
|
BLAKE2b-256 | a9cb7ae5bed0e95f559b5cce19f346c218b319fd8b2e5c3daee2554b8cf45271 |
File details
Details for the file dnaio-1.0.1-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: dnaio-1.0.1-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 75.4 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8ca9254459f1af6b2ec9da8e0c1b0195e8da07839e89323723ad68ca1323220 |
|
MD5 | 2c12e5d844a04a576f11f0de0b05308b |
|
BLAKE2b-256 | fc60e1f1110d3761428c8d8b4a11dfea05be950a353d3dd811de718b50292cd3 |
File details
Details for the file dnaio-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: dnaio-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 95.4 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62720ee3cd5d2115ad0361c8105b7396e0c974aeae3b41179526f678bb8ce12d |
|
MD5 | e249adeedb8f8f2771341193e2a1378d |
|
BLAKE2b-256 | 0426bdba4509f4199fc62aeb813117189e4663ff286dcf730c160ead9a81fbd3 |
File details
Details for the file dnaio-1.0.1-cp311-cp311-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: dnaio-1.0.1-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 79.5 kB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0857646933aaba566a0fd4e80c82b4708bb8a403cd5d20d56dbb935b5e52724a |
|
MD5 | d5f7af987972256d00f78035aaa67f40 |
|
BLAKE2b-256 | 47ce0a05197fce4e57c4f27fd9060b2cf278fc7f62c0d56e67432c56ce4c36a0 |
File details
Details for the file dnaio-1.0.1-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: dnaio-1.0.1-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 75.7 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d7c7cafdeefe7caa5f657fd2474128521b702ff67f5dea401359919fb333f3c |
|
MD5 | d79bb2e29bbe46999b8b4e42ddebc429 |
|
BLAKE2b-256 | 88b884bc12b793d7db212f33dc8ae0d019c84d3b7d38e060d0d4611a433b349e |
File details
Details for the file dnaio-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: dnaio-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 95.2 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a19ffc4bf85f80afcb11e87c23dd300bb245d3d5175ec6a92a02dc8ef0efda0 |
|
MD5 | 35f1c56dbb2c53c613ede9ab34ff0943 |
|
BLAKE2b-256 | d47003177592f7a956130c7465c0b40be8cc51eb0efa58e4b54eaedec7d5ccba |
File details
Details for the file dnaio-1.0.1-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: dnaio-1.0.1-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 79.4 kB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e89563d50802146027acfe9a342114d832fc3647d00f4508440cfbbe87406b20 |
|
MD5 | 41bc5d8d92ae67645c8e61a58ad0cdd6 |
|
BLAKE2b-256 | f9f1ceffe473737e159ea02aff4425bb8a3ce6d43be86c4c8240a88eaf71c729 |
File details
Details for the file dnaio-1.0.1-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: dnaio-1.0.1-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 76.2 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc4fd172952a80fbd9c0009d35e1469cf15ea09627b9d7222ca3076ea65f34ca |
|
MD5 | a9643f578ca2fb2936c395daeaa71eea |
|
BLAKE2b-256 | 8a6b4b8a2679a7d5ef799b9b6dc8b12ae49a73e3ab3fbda9cbef3845319a50f5 |
File details
Details for the file dnaio-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: dnaio-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 95.7 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6e5207ccf8b1531c889647030327e96bdad938ecd543573fe5ae3c5fae2c8bf |
|
MD5 | ce28f19dba3c4eef8331009e39eeabda |
|
BLAKE2b-256 | 414fa7489292f2108d5de8fe20d69965ab9e9cce00c18903ac76f4292a060fe4 |
File details
Details for the file dnaio-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: dnaio-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 79.9 kB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 560ae9a37d6006aa0db7aacd3dc388b5320e1f79c0290a50b962505118a46017 |
|
MD5 | 5614779bd3015084237cd9786fc19448 |
|
BLAKE2b-256 | 059a2c90db5748ef01f6c6975d58e5c1658beb7f303fb27071b6531c4e6d2219 |
File details
Details for the file dnaio-1.0.1-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: dnaio-1.0.1-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 76.3 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1132a1cfe64ea9e74a64f3c3abc2dc043502edc5cd839d01adf8ba1caab8c07 |
|
MD5 | 081c1762644d5c33329a74562d6b75af |
|
BLAKE2b-256 | d7e59121acae9ca35aeb545c603dcb4390b21dd3be4df326fa82691ec2ee6899 |
File details
Details for the file dnaio-1.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: dnaio-1.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 95.8 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6b7d2078299d9eba6326126043f4533aae8ca0bf56b6f4795c4cec44eb85967 |
|
MD5 | 07c39497348c7ffd80ea81e035a05f6d |
|
BLAKE2b-256 | c1326e58a2a3736be9ef2aace4c36fed0118ec984e7519dff94cfd57cf65058c |
File details
Details for the file dnaio-1.0.1-cp38-cp38-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: dnaio-1.0.1-cp38-cp38-macosx_10_9_x86_64.whl
- Upload date:
- Size: 79.6 kB
- Tags: CPython 3.8, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62514adf166f8cc8d4677d945eaedcecf84194492e796c78e0f0464da438dcb6 |
|
MD5 | 8981abc8a3c7c9bf3792f51f3b8135d9 |
|
BLAKE2b-256 | 3064a5535410871a6a62638aad868320e4a2e2bdf6a19dc69ceb398fa8fd41a6 |