Service
Table of Contents
Classes
- FastqReader
- A standalone, persistence-independent text reader, in the same spirit as Domain\Cloning's
GffFeatureReader : FASTQ has no entry delimiters DatabaseParserFactory could recognize, and no
Doctrine entity to persist into. A record is an identifier line ("@..."), its sequence, a
separator line ("+...") and its quality string. Most files write the sequence and the quality on
one line each, but the original Sanger format let both wrap over several lines, and readers are
expected to accept it (Cock et al., Nucleic Acids Res. 2010, 38:1767) : the sequence runs until
the "+" line, the quality until it is as long as the sequence. A quality line may itself start
with "@" or "+", so a quality line is only taken while it keeps the quality no longer than the
sequence ; a quality left short is reported, and the next line read as the next record. A record
that does not fit this shape, or whose sequence/quality content is rejected by FastqRecord's own
validation, is skipped and reported in FastqImportResult::getWarnings() rather than thrown,
exactly like GffFeatureReader treats a malformed GFF3 line. Blank lines between records are
ignored.
- FastqWriter
- One record is four lines - "@identifier", the sequence, a bare "+", the quality - the sequence and
the quality on a single line each : the wrapped layout some old tools wrote is ambiguous (a quality
line may start with "@" or "+") and no current tool expects it. The "+" line does not repeat the
identifier, which the format allows and nobody needs. The quality is Phred+33, as FastqRecord
holds it. FastqReader reads back what this writes.