NucleobaseAndReadFactory
Date: 2014-10-01

artificialFastqGenerator

## Class NucleobaseAndReadFactory

- java.lang.Object
- - artificialFastqGenerator.NucleobaseAndReadFactory

-     public class NucleobaseAndReadFactory
      extends java.lang.Object

  An instance of this class can be used to create new Nucleobase and Read objects. 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
    `NucleobaseAndReadFactory(int startingXCoord, int startingYCoord, int readLength, boolean useRealQualityScores, boolean simulateErrorInRead, java.lang.String fastq1ForQualityScoresPath, java.lang.String fastq2ForQualityScoresPath)` Initialises a new NucleobaseAndReadFactory object.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Nucleobase` | `createNucleobase(char genotype)` Create a Nucleobase object.
    `void` | `createPairedEndReads(java.util.ArrayList<Nucleobase> leftEndSequence, java.util.ArrayList<Nucleobase> rightEndSequence)` Create a pair of reads.
    `long` | `getNumACGTBasesCalled()` Get the number of ACGT nucleobases that have been called.
    `long` | `getNumBaseCallErrors()` Get the number of base call errors that have been simulated.
    `long` | `getNumNucleobasesCreated()` Get the number of nucleobases that have been created.
    `long` | `getNumReadsCreated()` Get the number of reads that have been created.
    `void` | `logOverallErrorStats()` Log the overall error statistics.
    `void` | `resetFieldsForNewChromosome()` Reset fields ready to process a new chromosome.

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

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

- - ### Constructor Detail

    - #### NucleobaseAndReadFactory

          public NucleobaseAndReadFactory(int startingXCoord,
                                  int startingYCoord,
                                  int readLength,
                                  boolean useRealQualityScores,
                                  boolean simulateErrorInRead,
                                  java.lang.String fastq1ForQualityScoresPath,
                                  java.lang.String fastq2ForQualityScoresPath)

      Initialises a new NucleobaseAndReadFactory object.
      Parameters:
        `startingXCoord` - - the starting X coordinate.
        `startingYCoord` - - the starting Y coordinate.
        `readLength` - - the lenght of each read.
        `useRealQualityScores` - - true if using quality scores from an existing fastq file, else false.
        `simulateErrorInRead` - - true if simulating error in reads, else false.
        `fastq1ForQualityScoresPath` - - the 1st fastq file whose quality scores are used.
        `fastq2ForQualityScoresPath` - - the 2nd fastq file whose quality scores are used.

  - ### Method Detail

    - #### createNucleobase

          public Nucleobase createNucleobase(char genotype)

      Create a Nucleobase object.
      Parameters:
        `genotype` - - the nucleobase's genotype.
      Returns:
        newNucleobase - a new nucleobase object.

    - #### createPairedEndReads

          public void createPairedEndReads(java.util.ArrayList<Nucleobase> leftEndSequence,
                                  java.util.ArrayList<Nucleobase> rightEndSequence)

      Create a pair of reads.
      Parameters:
        `leftEndSequence` - - the sequence of nucleobases for the left read.
        `rightEndSequence` - - the sequence of nucleobases for the right read.

    - #### getNumNucleobasesCreated

          public long getNumNucleobasesCreated()

      Get the number of nucleobases that have been created.
      Returns:
        numNucleobasesCreated - the number of Nucleobase objects that have been created so far.

    - #### getNumReadsCreated

          public long getNumReadsCreated()

      Get the number of reads that have been created.
      Returns:
        numReadsCreated - the number of Read objects that have been created so far.

    - #### getNumBaseCallErrors

          public long getNumBaseCallErrors()

      Get the number of base call errors that have been simulated.
      Returns:
        numBaseCallErrors - the number of base call errors that have been simulated.

    - #### getNumACGTBasesCalled

          public long getNumACGTBasesCalled()

      Get the number of ACGT nucleobases that have been called.
      Returns:
        numACGTBasesCalled - the number of ACGT nucleobases that have been called.

    - #### logOverallErrorStats

          public void logOverallErrorStats()

      Log the overall error statistics.

    - #### resetFieldsForNewChromosome

          public void resetFieldsForNewChromosome()

      Reset fields ready to process a new chromosome.