GlobalSingleBulgeLoopMethod
Date: 2014-08-08

melting.patternModels.singleBulge

## Class GlobalSingleBulgeLoopMethod

- java.lang.Object
- - melting.patternModels.PatternComputation
  - - melting.patternModels.singleBulge.GlobalSingleBulgeLoopMethod

- All Implemented Interfaces:
    PatternComputationMethod
  Direct Known Subclasses:
    Serra07SingleBulgeLoop, Tanaka04SingleBulgeLoop

      public abstract class GlobalSingleBulgeLoopMethod
      extends PatternComputation

  This class represents one single bulge loop model. It extends PatternComputation. Int this model, the penalty for the single bulge loop is a global penalty for the pattern composed of the single bulge loop surrounded by the adjacent base pairs in the duplex. Ex : the thermodynamic parameters for (ATG, T-C) : (T,-) is the single bulge loop, (A,T) and (G,C) are the adjacent base pairs.

- - ### Field Summary

    - ### Fields inherited from class melting.patternModels.PatternComputation

      `collector, fileName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GlobalSingleBulgeLoopMethod()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ThermoResult` | `computeThermodynamics(NucleotidSequences sequences, int pos1, int pos2, ThermoResult result)`
    `protected int[]` | `correctPositions(int pos1, int pos2, int duplexLength)` corrects the pattern positions in the duplex to have the adjacent base pair of the pattern included in the subsequence between the positions pos1 and pos2
    `boolean` | `isMissingParameters(NucleotidSequences sequences, int pos1, int pos2)` Check if one thermodynamic parameter is missing to compute the enthalpy and entropy of the pattern at the positions pos1 and pos2.

    - ### Methods inherited from class melting.patternModels.PatternComputation

      `getCollector, getData, getDataFileName, initialiseFileName, isApplicable, loadData, loadFile`

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

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

- - ### Constructor Detail

    - #### GlobalSingleBulgeLoopMethod

          public GlobalSingleBulgeLoopMethod()

  - ### Method Detail

    - #### computeThermodynamics

          public ThermoResult computeThermodynamics(NucleotidSequences sequences,
                                           int pos1,
                                           int pos2,
                                           ThermoResult result)

      Specified by:
        `computeThermodynamics` in interface `PatternComputationMethod`
      Specified by:
        `computeThermodynamics` in class `PatternComputation`
      Parameters:
        `sequences` - which contains the sequences entered by the user.
        `result` - which contains the computed enthalpy, entropy and melting temperature.
      Returns:
        ThermoResult result which contains the incremented enthalpy and entropy values.

    - #### isMissingParameters

          public boolean isMissingParameters(NucleotidSequences sequences,
                                    int pos1,
                                    int pos2)

      Description copied from interface: `PatternComputationMethod`
      Check if one thermodynamic parameter is missing to compute the enthalpy and entropy of the pattern at the positions pos1 and pos2.
      Specified by:
        `isMissingParameters` in interface `PatternComputationMethod`
      Overrides:
        `isMissingParameters` in class `PatternComputation`
      Parameters:
        `sequences` - which contains the sequences entered by the user.
      Returns:
        false if one necessary thermodynamic parameter is missing.

    - #### correctPositions

          protected int[] correctPositions(int pos1,
                               int pos2,
                               int duplexLength)

      corrects the pattern positions in the duplex to have the adjacent base pair of the pattern included in the subsequence between the positions pos1 and pos2
      Parameters:
        `pos1` - : starting position of the internal loop
        `pos2` - : ending position of the internal loop
        `duplexLength` - : total length of the duplex
      Returns:
        int [] positions : new positions of the subsequence to have the pattern surrounded by the adjacent base pairs in the duplex.