Read FASTA and FASTQ files efficiently
Project description
dnaio parses FASTQ and FASTA
dnaio
is a Python 3 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. You shouldn’t use them anyway.
- 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-0.4.1.tar.gz
.
File metadata
- Download URL: dnaio-0.4.1.tar.gz
- Upload date:
- Size: 123.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 371a461bac0e821ff52f6235f0de4533ac73b0e990b470e9625486f2e6df2cd7 |
|
MD5 | a53de47c81f5b76f528ca594bbc0d85d |
|
BLAKE2b-256 | 731fa481d0c6869b10ba81089dee7d020aaf2ba7b9b2fba50c94074a3e03cae7 |
File details
Details for the file dnaio-0.4.1-cp38-cp38-manylinux1_x86_64.whl
.
File metadata
- Download URL: dnaio-0.4.1-cp38-cp38-manylinux1_x86_64.whl
- Upload date:
- Size: 122.1 kB
- Tags: CPython 3.8
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f23e90fd8cb8e072637aeb12b4b704a4b539d9103f6e1cce819446017f1a4455 |
|
MD5 | 57e895ecf90c8b8b37456a1a39039cbd |
|
BLAKE2b-256 | 96cc38f2f6d3f99381721b34efbfd8b004f2a955a59148386ac2d31d52f1c8c0 |
File details
Details for the file dnaio-0.4.1-cp37-cp37m-manylinux1_x86_64.whl
.
File metadata
- Download URL: dnaio-0.4.1-cp37-cp37m-manylinux1_x86_64.whl
- Upload date:
- Size: 122.1 kB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae1129dd868dacd3010d78dfdd8213ac61db528a5136817870793f042c1dd1e6 |
|
MD5 | 8b33304c5849ce20bb4bfa8b253db2f4 |
|
BLAKE2b-256 | 2846da3d546ea2188a9d6e6484234eb641f2536a6022bc0e830a39c28d96b1c2 |
File details
Details for the file dnaio-0.4.1-cp36-cp36m-manylinux1_x86_64.whl
.
File metadata
- Download URL: dnaio-0.4.1-cp36-cp36m-manylinux1_x86_64.whl
- Upload date:
- Size: 122.6 kB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7e8fec4aaeca9fda043e5305cefe8ade22fed46a253bb57ebd74a0a17ec5871 |
|
MD5 | 17e1cb593fb3d3edd94ef665b68b09c5 |
|
BLAKE2b-256 | aed6ef34693a9bfb850c1fb2d8941e942c04dfdfe516d3697dbfc051cd7c2562 |
File details
Details for the file dnaio-0.4.1-cp35-cp35m-manylinux1_x86_64.whl
.
File metadata
- Download URL: dnaio-0.4.1-cp35-cp35m-manylinux1_x86_64.whl
- Upload date:
- Size: 121.2 kB
- Tags: CPython 3.5m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82e4b2979dce400e2181d363db307136a9213ca0291b96427b55597760ec8ea1 |
|
MD5 | 2633b5f29ba2b2ce079ebd877482bd3a |
|
BLAKE2b-256 | 85ac5693fb9bad796ffdd6f59b01b33a3c092ecadfb4c69e81cc8b15ade5c221 |
File details
Details for the file dnaio-0.4.1-cp34-cp34m-manylinux1_x86_64.whl
.
File metadata
- Download URL: dnaio-0.4.1-cp34-cp34m-manylinux1_x86_64.whl
- Upload date:
- Size: 121.1 kB
- Tags: CPython 3.4m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2cb610ed9a6f7177046f94b01746c5e136046d2c8a92a0df84a0674b19cccc3 |
|
MD5 | f22b87cd03f0d7f42daa25a999fb10d9 |
|
BLAKE2b-256 | cc5f7a84eb0b29978279cbb93e53d354d137910e6758e2b7fe65586a3f4f2a8e |