Read FASTA and FASTQ files efficiently
Project description
dnaio parses FASTQ and FASTA
dnaio
is a Python 3.5+ 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.4.tar.gz
.
File metadata
- Download URL: dnaio-0.4.4.tar.gz
- Upload date:
- Size: 125.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2d11a99815e8470bdf2f264e1fd5ae2536d78bfc5f736c62210f242a422fb8c |
|
MD5 | 6f533011765682d5b5c871efa096a127 |
|
BLAKE2b-256 | 3fc88dfbd5608bbcd968efebcbcb804276898e9fc3da8f874726b973444b0859 |
File details
Details for the file dnaio-0.4.4-cp39-cp39-manylinux1_x86_64.whl
.
File metadata
- Download URL: dnaio-0.4.4-cp39-cp39-manylinux1_x86_64.whl
- Upload date:
- Size: 119.6 kB
- Tags: CPython 3.9
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06014c5e5510fa540371e1f1bcda421adf453319ecea1fab2b4d6970e54ef4d8 |
|
MD5 | 56e68c227e26b6d3896b57990e3572ac |
|
BLAKE2b-256 | f012885bf0bbec1a481c9ee1907a57a91a4e7d41ed99d10ca3f4eb102b67242b |
File details
Details for the file dnaio-0.4.4-cp38-cp38-manylinux1_x86_64.whl
.
File metadata
- Download URL: dnaio-0.4.4-cp38-cp38-manylinux1_x86_64.whl
- Upload date:
- Size: 120.0 kB
- Tags: CPython 3.8
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c3994cf275d3c302c4d29ff6de354aaeaee144966def6cb29dd6ab8b70a86bc |
|
MD5 | 4062ddbf97aca26910338136c2576eb3 |
|
BLAKE2b-256 | 3d4432c40907dc73796bf6c0a099400f0580ebbda3a6341470fb83fea892fd66 |
File details
Details for the file dnaio-0.4.4-cp37-cp37m-manylinux1_x86_64.whl
.
File metadata
- Download URL: dnaio-0.4.4-cp37-cp37m-manylinux1_x86_64.whl
- Upload date:
- Size: 116.9 kB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | acbe8b04349c6ab55355a561a2dd7dfed0e3e74dfefeab2e44c32605b0d68d5f |
|
MD5 | c460b14cd6363704559328ba0cf69e6d |
|
BLAKE2b-256 | 621012b2540845178d09ec696846a860c7714496c5674fa83d5b4be345ce4469 |
File details
Details for the file dnaio-0.4.4-cp36-cp36m-manylinux1_x86_64.whl
.
File metadata
- Download URL: dnaio-0.4.4-cp36-cp36m-manylinux1_x86_64.whl
- Upload date:
- Size: 117.1 kB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbc85feef740a8402a8189d84e30f1261bdb330e8318be0fbac85bd2ac12e3c9 |
|
MD5 | 63f9470d423338a564148cbb56b27986 |
|
BLAKE2b-256 | d1aa5681ed78e84d434b48dff8b2b3902b79f2f56bb517358f62f12dc9852dad |
File details
Details for the file dnaio-0.4.4-cp35-cp35m-manylinux1_x86_64.whl
.
File metadata
- Download URL: dnaio-0.4.4-cp35-cp35m-manylinux1_x86_64.whl
- Upload date:
- Size: 115.8 kB
- Tags: CPython 3.5m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f405ae25f11152896960444d77fdc9bb800490b92dfa12df3c9d33a3cfafaa0e |
|
MD5 | 6b0656c63a2edb6b8303ace5a8d0db3c |
|
BLAKE2b-256 | 4056eb94ba7e7a38fdfcceb623ea5856f2cf386015721dbc77834cb17f917759 |