Nucleobase
Date: 2014-10-01

artificialFastqGenerator

## Class Nucleobase

- java.lang.Object
- - artificialFastqGenerator.Nucleobase

-     public class Nucleobase
      extends java.lang.Object

  An instance of the Nucleobase class corresponds to a nucleobase in the human reference genome. It has fields for its genotype, unique integer ID, target coverage, covering reads (i.e. those reads in which it is contained), and coverage. 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
    `Nucleobase(char genotype, long uniqueID, int targetCoverage)` Initialise a new Nucleobase object.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCoveringRead(Read read)` Add a read to the list of reads which cover this nucleobase.
    `char` | `getComplementGenotype()` GEt the complement of the nucleobase's genotype.
    `int` | `getCoverage()` Get the coverage for this nucleobase i.e.
    `java.util.ArrayList<Read>` | `getCoveringReads()` Get the list of covering reads - the reads which include this nucleobase.
    `char` | `getGenotype()` Get the nucleobase's genotype.
    `int` | `getTargetCoverage()` Get the target coverage for this nucleobase (the number of reads that we want to include this nucleobase).
    `long` | `getUniqueID()` Get the nucleobase's unique integer ID.
    `boolean` | `hasTargetCoverage()` Checks whether a nucleobase's coverage matches its target coverage.
    `void` | `setGenotype(char genotype)` Set the nucleobase's genotype.
    `void` | `setTargetCoverage(int targetCoverage)` Set the target coverage for this nucleobase (the number of reads we want to include this nucleobase).
    `java.lang.String` | `toString()`

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

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

- - ### Constructor Detail

    - #### Nucleobase

          public Nucleobase(char genotype,
                    long uniqueID,
                    int targetCoverage)

      Initialise a new Nucleobase object.
      Parameters:
        `genotype` - - the nucleobase's genotype.
        `uniqueID` - - the nucleobase's unique integer ID.
        `targetCoverage` - - the nucleobase's target coverage.

  - ### Method Detail

    - #### getGenotype

          public char getGenotype()

      Get the nucleobase's genotype.
      Returns:
        genotype - the nucleobase's genotype.

    - #### getComplementGenotype

          public char getComplementGenotype()

      GEt the complement of the nucleobase's genotype.
      Returns:
        complementGenotype - the complement of the nucleobase's genotype.

    - #### setGenotype

          public void setGenotype(char genotype)

      Set the nucleobase's genotype.

    - #### addCoveringRead

          public void addCoveringRead(Read read)

      Add a read to the list of reads which cover this nucleobase.
      Parameters:
        `read` - - the read which covers this nucleobase.

    - #### getCoverage

          public int getCoverage()

      Get the coverage for this nucleobase i.e. the number of reads which include it.
      Returns:
        coverage - coverage of the nucleobase.

    - #### getCoveringReads

          public java.util.ArrayList<Read> getCoveringReads()

      Get the list of covering reads - the reads which include this nucleobase.
      Returns:
        coveringReads - the ArrayList containing the reads which cover this nucleobase.

    - #### getUniqueID

          public long getUniqueID()

      Get the nucleobase's unique integer ID.
      Returns:
        uniqueID - the nucleobase's unique integer ID.

    - #### getTargetCoverage

          public int getTargetCoverage()

      Get the target coverage for this nucleobase (the number of reads that we want to include this nucleobase).
      Returns:
        targetCoverage - the nucleobase's target coverage.

    - #### setTargetCoverage

          public void setTargetCoverage(int targetCoverage)

      Set the target coverage for this nucleobase (the number of reads we want to include this nucleobase).
      Parameters:
        `targetCoverage` - - the nucleobase's target coverage.

    - #### hasTargetCoverage

          public boolean hasTargetCoverage()

      Checks whether a nucleobase's coverage matches its target coverage.
      Returns:
        coverageMatchesTarget - true if the coverage is >= than the target, else false.

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`