Skip to content

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

License

Notifications You must be signed in to change notification settings

lrobidou/fastxgz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);
}

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages