fastxgz

Crates.iofastxgz
lib.rsfastxgz
version0.4.0
sourcesrc
created_at2023-09-18 13:56:21.433469
updated_at2024-08-27 13:57:40.007571
descriptionA fasta/fastq parser for both compressed and not compressed files.
homepage
repositoryhttps://github.com/lrobidou/fastxgz
max_upload_size
id975938
size50,956
Lucas Robidou (lrobidou)

documentation

README

fastxgz

fastx parser for rust. Supports both Gz and not gz files.

Description

This parser can iterate over the reads of a fasta/fastq file, potentially compressed (gz). Compressed files should end in ".gz". This parser can also iterate over the k-mers of every read, or even the hash of these k-mers.

Please see the rust documentation for details and examples.

This parser is meant to be convenient to use. Though not meant to be fast, its speed for enumerating the lines of a fastq file from an SSD on a laptop is only 28% slower than wc -l.

How to use this

Simply add the following to your Cargo.toml file:

[dependencies]
fastxgz = "{X}.{Y}.{Z}"  # Please check and use the newest version

then:

use fastxgz::fasta_reads;

let reads = fasta_reads("data/tests/test.fa").expect("The file cannot be opened.");
for read in reads {
    println!("{}", read);
}
Commit count: 5

cargo fmt