FastqRecord
in package
Quality is decoded as Phred+33 (Sanger / Illumina 1.8+), the encoding every current sequencer produces : getPhredScores()[$i] = ord(quality[$i]) - 33, ranging from 0 to 93. The older Phred+64 encoding (pre-1.8 Illumina) is out of scope - it has not shipped from a sequencer since 2011 and supporting both would require the caller to specify which one applies per file, for no benefit to any format this project currently reads or writes. FastqReader warns about a file that looks Phred+64 encoded.
Class FastqRecord
Tags
Table of Contents
Constants
- PHRED_OFFSET : mixed = 33
Properties
- $identifier : string
- $quality : string
- $sequence : DnaSequence
Methods
- __construct() : mixed
- FastqRecord constructor.
- getIdentifier() : string
- getLength() : int
- getMeanPhredScore() : float
- getPhredScores() : array<string|int, int>
- getQuality() : string
- getSequence() : DnaSequence
Constants
PHRED_OFFSET
private
mixed
PHRED_OFFSET
= 33
Properties
$identifier
private
string
$identifier
$quality
private
string
$quality
$sequence
private
DnaSequence
$sequence
Methods
__construct()
FastqRecord constructor.
public
__construct(string $sIdentifier, DnaSequence $oSequence, string $sQuality) : mixed
Parameters
- $sIdentifier : string
-
The read ID, without the leading "@"
- $oSequence : DnaSequence
- $sQuality : string
-
One Phred+33 symbol per base of $oSequence, same length
Tags
getIdentifier()
public
getIdentifier() : string
Return values
stringgetLength()
public
getLength() : int
Return values
intgetMeanPhredScore()
public
getMeanPhredScore() : float
Return values
float —Arithmetic mean of getPhredScores() ; 0.0 for a zero-length read
getPhredScores()
public
getPhredScores() : array<string|int, int>
Return values
array<string|int, int> —One Phred quality score (0-93) per base, in read order
getQuality()
public
getQuality() : string
Return values
string —Raw Phred+33-encoded quality string
getSequence()
public
getSequence() : DnaSequence