Class FastqRecord

    • Constructor Detail

      • FastqRecord

        public FastqRecord​(String readName,
                           byte[] readBases,
                           String qualityHeader,
                           byte[] baseQualities)
        Constructor for byte[] arrays
        Parameters:
        readName - the read name (without FastqConstants.SEQUENCE_HEADER)
        readBases - the read sequence bases as ASCII bytes ACGTN=.
        qualityHeader - the quality header (without FastqConstants.SEQUENCE_HEADER)
        baseQualities - the base qualities as binary PHRED scores (not ASCII)
      • FastqRecord

        public FastqRecord​(FastqRecord other)
        Copy constructor
        Parameters:
        other - record to copy
    • Method Detail

      • getReadName

        public String getReadName()
        Get the read name
        Returns:
        the read name (may be null).
      • getReadString

        public String 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_SEQUENCE if no bases are present.
      • getBaseQualityString

        public String 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_QUALS if no bases are present.
      • getReadLength

        public int getReadLength()
        Get the read length
        Returns:
        number of bases in the read
      • getBaseQualityHeader

        public String getBaseQualityHeader()
        Get the base quality header
        Returns:
        the base quality header (may be null).
      • length

        @Deprecated
        public int length()
        Deprecated.
        since 02/2017. Use getReadLength() instead
        shortcut to getReadString().length()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • toString

        public String toString()
        Returns toFastQString(). 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 use toFastQString().
        Overrides:
        toString in class Object