--- id: dnaio version: "1.2.4" license: MIT license_treatment: permissive maintenance: aging --- # dnaio — Read and write FASTA and FASTQ files efficiently License: permissive · Maintenance: aging · Downloads: 92.4K/mo ## What it is and what it does dnaio is a Python library for reading and writing FASTQ, FASTA, and uBAM sequence files with a focus on parsing speed and efficiency. It originated as part of the Cutadapt tool and has been refined since becoming standalone. The library automatically detects and handles compressed files (.gz, .bz2, .xz, .zst) and supports both single-file and two-file paired-end workflows, as well as interleaved paired-end formats. It can parse uBAM files directly from ONT basecallers like dorado. The main entry point is dnaio.open(), which returns an iterator over sequence records. Each record exposes name, sequence, and quality attributes. The library prioritizes FASTQ and uBAM parsing; FASTA parsing is supported but not as heavily optimized. It does not support multi-line FASTQ files. Installation is straightforward via pip, with optional zstandard support for .zst compression. Use it for: - Parse large FASTQ files from sequencing runs in genomics pipelines without loading entire files into memory - Read uBAM output directly from ONT dorado basecaller for real-time or batch processing - Handle automatically-compressed FASTQ/FASTA files across multiple compression formats in a single workflow - Process paired-end sequencing data stored in two separate files or a single interleaved file - Extract sequence and quality information for downstream bioinformatics analysis (alignment, QC, filtering) ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. dnaio reads and writes FASTQ, FASTA, and uBAM files with optimized parsing for bioinformatics workflows, automatically handling compressed formats like .gz, .bz2, .xz, and .zst. Yes, if you work with FASTQ, FASTA, or uBAM files in bioinformatics. dnaio is production-stable (Development Status 5), has no known vulnerabilities, and offers efficient parsing with minimal dependencies (only xopen). The MIT license is unrestricted. Maintenance is aging (306 days since last release), but the repo remains active and the library is mature. Install friction is medium due to compiled components, but prebuilt wheels are available for modern Python and common platforms. ## Install pip install dnaio uv add dnaio poetry add dnaio ## Installing dnaio Before you install: Medium install friction due to compiled components (Cython-based), but prebuilt wheels cover modern Python versions (3.10–3.14) and major platforms. Last release was 306 days ago; repo is active and not archived, though maintenance pace is aging. License in practice: MIT license is permissive; you can use, modify, and distribute dnaio freely in commercial and private projects with minimal restrictions. Quickstart: pip install dnaio import dnaio with dnaio.open("reads.fastq.gz") as f: for record in f: print(record.name, len(record.sequence)) Requires Python 3.10 or later. Optional: install zstandard for .zst file support. Verify before relying: - Performance benchmarks comparing dnaio to other FASTQ parsers in the ecosystem - Memory footprint for large files (e.g., multi-gigabyte FASTQ datasets) - Interleaved paired-end parsing behavior and API details ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: medium - Maintenance: aging - Downloads: 92.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags fastq parser python, fasta file reader, ubam parsing, bioinformatics sequence files, compressed fastq handling, paired-end fastq, sequence data io, bioinformatics, sequence-parsing, genomics [View on SkillFed](https://skillfed.io/packages/dnaio) · [View on PyPI](https://pypi.org/project/dnaio/)