19 releases (breaking)
0.16.0 | Oct 22, 2024 |
---|---|
0.14.0 | Aug 4, 2024 |
0.13.0 | Jul 14, 2024 |
0.10.0 | Dec 14, 2023 |
0.1.1 | Jul 21, 2021 |
#2624 in Parser implementations
1,715 downloads per month
Used in 38 crates
(3 directly)
60KB
1K
SLoC
noodles-fastq handles the reading and writing of the FASTQ format.
FASTQ is a text format with no formal specification and only has de facto rules. It typically consists of a list of records, each with four lines: a definition (read name and description), a sequence, a plus line, and quality scores.
The read name is prefixed with an @
(at sign) character and includes an optional description,
delimited by a space (
) or horizontal tab (\t
). The sequence is a list of bases encoded
using IUPAC base symbols. The plus line is effectively a separator, sometimes repeating the
read name and optional description, and is commonly discarded. The quality scores is list of
Phred quality scores (commonly but not guaranteed to be offset by 33) and is parallel to each
base in the sequence. That is, each record can be described like the following:
@<name>[< |\t>description]
<sequence>
+[<name>[< |\t>description]]
<quality scores>
Examples
Read all records from a file
use noodles_fastq as fastq;
let mut reader = File::open("sample.fq")
.map(BufReader::new)
.map(fastq::io::Reader::new)?;
for result in reader.records() {
let record = result?;
// ...
}
Dependencies
~0.6–6.5MB
~37K SLoC