Package htsjdk.samtools.fastq
Class FastqRecord
java.lang.Object
htsjdk.samtools.fastq.FastqRecord
- All Implemented Interfaces:
Serializable
Simple representation of a FASTQ record, without any conversion
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFastqRecord(FastqRecord other) Copy constructorFastqRecord(String readName, byte[] readBases, String qualityHeader, byte[] baseQualities) Constructor for byte[] arraysFastqRecord(String readName, String readBases, String qualityHeader, String baseQualities) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionbooleanbyte[]Get the base qualities as binary PHRED scores (not ASCII)Get the base quality headerGet the base qualities encoded as a FASTQ stringbyte[]Get the DNA sequence.Deprecated.since 02/2017.intGet the read lengthGet the read nameGet the DNA sequenceinthashCode()intlength()Deprecated.since 02/2017.Returns the record as the String FASTQ format.toString()ReturnstoFastQString().
-
Constructor Details
-
FastqRecord
Default constructor- Parameters:
readName- the read name (withoutFastqConstants.SEQUENCE_HEADER)readBases- the read sequence basesqualityHeader- the quality header (withoutFastqConstants.SEQUENCE_HEADER)baseQualities- the base quality scores
-
FastqRecord
Constructor for byte[] arrays- Parameters:
readName- the read name (withoutFastqConstants.SEQUENCE_HEADER)readBases- the read sequence bases as ASCII bytes ACGTN=.qualityHeader- the quality header (withoutFastqConstants.SEQUENCE_HEADER)baseQualities- the base qualities as binary PHRED scores (not ASCII)
-
FastqRecord
Copy constructor- Parameters:
other- record to copy
-
-
Method Details
-
getReadHeader
Deprecated.since 02/2017. UsegetReadName()instead- Returns:
- the read name
-
getReadName
Get the read name- Returns:
- the read name (may be
null).
-
getReadString
Get the DNA sequence- Returns:
- read sequence as a string of ACGTN= (may be
null).
-
getReadBases
public byte[] getReadBases()Get the DNA sequence.- Returns:
- read sequence as ASCII bytes ACGTN=;
SAMRecord.NULL_SEQUENCEif no bases are present.
-
getBaseQualityString
Get the base qualities encoded as a FASTQ string- Returns:
- the quality string (may be
null).
-
getBaseQualities
public byte[] getBaseQualities()Get the base qualities as binary PHRED scores (not ASCII)- Returns:
- the base quality;
SAMRecord.NULL_QUALSif no bases are present.
-
getReadLength
public int getReadLength()Get the read length- Returns:
- number of bases in the read
-
getBaseQualityHeader
Get the base quality header- Returns:
- the base quality header (may be
null).
-
length
Deprecated.since 02/2017. UsegetReadLength()insteadshortcut to getReadString().length() -
hashCode
public int hashCode() -
equals
-
toFastQString
Returns the record as the String FASTQ format.- See Also:
-
toString
ReturnstoFastQString(). WARNING: This method will be changed in the future for a simpler representation of the object. For code relying on the formatting as a FASTQ String, please refactor your code to usetoFastQString().
-