Read
Date: 2014-10-01

artificialFastqGenerator

## Class Read

- java.lang.Object
- - artificialFastqGenerator.AbstractRead
  - - artificialFastqGenerator.Read

-     public class Read
      extends AbstractRead

  An instance of this class corresponds to a read in an artificial fastq file. It has fields for its Nucleobase sequence, unique integer ID, the other read in the pair, its encoded quality scores, and the genotypes which actually get read (i.e. may contain error). Copyright (C) 2012 The Institute of Cancer Research (ICR). This file is part of ArtificialFastqGenerator v1.0.0. ArtificialFastqGenerator is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Public License along with this program. If not, see Authour's contact email: Matthew.Frampton@icr.ac.uk

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Read(java.util.ArrayList<Nucleobase> sequence, long uniqueID, Read pairedEndRead, boolean leftPEAndNeedsWriting, char[] encodedQualityScores, char[] genotypesThatAreRead, int xCoordinate, int yCoordinate)` Initialise a new Read object.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getDebugString()` Get the debug string for this read object.
    `Read` | `getPairedEndRead()` Get the read with which this read object forms a pair.
    `boolean` | `isLeftReadAndNeedsWriting()` Get whether the Read object is a left read and needs writing.
    `void` | `setLeftReadAndNeedsWriting(boolean trueOrFalse)` Set whether the Read object is a left read and needs writing.
    `void` | `setPairedEndRead(Read pairedEndRead)` Set the read with which this read object forms a pair.
    `java.lang.String` | `toString()` Get the string that represents this read object.
    `void` | `updateNucleobaseCoverage(Read read)` For each of the reference genome nucleobases in this read, add the read into the nucleobase's covering reads ArrayList.

    - ### Methods inherited from class artificialFastqGenerator.AbstractRead

      `getSequence, setSequence`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Read

          public Read(java.util.ArrayList<Nucleobase> sequence,
              long uniqueID,
              Read pairedEndRead,
              boolean leftPEAndNeedsWriting,
              char[] encodedQualityScores,
              char[] genotypesThatAreRead,
              int xCoordinate,
              int yCoordinate)

      Initialise a new Read object.
      Parameters:
        `sequence` - - the sequence of nucleobases in this read.
        `uniqueID` - - the read's unique integer ID.
        `pairedEndRead` - - the other read with which this one forms a pair.
        `leftPEAndNeedsWriting` - - true if the read is a left read and needs writing, else false.
        `encodedQualityScores` - - the encoded quality scores for this read.
        `genotypesThatAreRead` - - the genotypes that get read.
        `xCoordinate` - - the read's x-coordinate.
        `yCoordinate` - - the read's y-coordinate.

  - ### Method Detail

    - #### setLeftReadAndNeedsWriting

          public void setLeftReadAndNeedsWriting(boolean trueOrFalse)

      Set whether the Read object is a left read and needs writing.
      Parameters:
        `trueOrFalse` - - true if the read is a left read and needs writing, else false.

    - #### isLeftReadAndNeedsWriting

          public boolean isLeftReadAndNeedsWriting()

      Get whether the Read object is a left read and needs writing.
      Returns:
        leftPEAndNeedsWriting - whether the read is a left read and needs writing (hasn't been written yet), else false.

    - #### getPairedEndRead

          public Read getPairedEndRead()

      Get the read with which this read object forms a pair.
      Returns:
        pairedEndRead - the read with which this read forms a pair.

    - #### setPairedEndRead

          public void setPairedEndRead(Read pairedEndRead)

      Set the read with which this read object forms a pair.
      Parameters:
        `pairedEndRead` - - the read with which this read forms a pair.

    - #### updateNucleobaseCoverage

          public void updateNucleobaseCoverage(Read read)

      For each of the reference genome nucleobases in this read, add the read into the nucleobase's covering reads ArrayList.
      Parameters:
        `read` - - this read.

    - #### toString

          public java.lang.String toString()

      Get the string that represents this read object.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        returnString - the string that represents this read object.

    - #### getDebugString

          public java.lang.String getDebugString()

      Get the debug string for this read object.
      Returns:
        returnString - the debug string that represents this read object.