PatternComputationMethod
Date: 2014-08-08

melting.methodInterfaces

## Interface PatternComputationMethod

- All Known Implementing Classes:
    AllawiSantalucia97, AllawiSantaluciaPeyret97_98_99mm, AllawiSantaluciaPeyret97_98_99tanmm, Asanuma05Azobenzene, Bommarito00SingleDanglingEnd, Breslauer86, Broda05CNGRepeats, CricksNNMethod, DecomposedInitiation, Freier86, GlobalInitiation, GlobalSingleBulgeLoopMethod, InosineNNMethod, LockedAcidNNMethod, McTigue04LockedAcid, Owczarzy11LockedAcid, Owczarzy11SingleMismatchLockedAcid, Owczarzy11TandemLockedAcid, PatternComputation, Santalucia04, Santalucia04InternalLoop, Santalucia04LongBulgeLoop, Santalucia04SingleBulgeLoop, Santalucia05Inosine, Santalucia96, SecondDanglingEndMethod, Serra05DoubleDanglingEnd, Serra06_08SingleDanglingEnd, Serra06DoubleDanglingEnd, Serra07SingleBulgeLoop, Serra12Wobble, SingleDanglingEndMethod, Sugimoto01Hydroxyadenine, Sugimoto02DNADanglingEnd, Sugimoto02RNADanglingEnd, Sugimoto95, Sugimoto96, SugimotoLongDanglingEndMethod, Tanaka04, Tanaka04SingleBulgeLoop, Turner06, Turner06InternalLoop, Turner06mm, Turner99_06LongBulgeLoop, Turner99_06SingleBulgeLoop, Turner99_06tanmm, Turner99Wobble, Watkins11mm, Xia98, Znosko071x2Loop, Znosko07Inosine, Znosko07mm, Znosko08mm, ZnoskoMethod

      public interface PatternComputationMethod

  This interface is implemented by classes which contain a method or model to compute the pattern enthalpy and entropy.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ThermoResult` | `computeThermodynamics(NucleotidSequences sequences, int pos1, int pos2, ThermoResult result)`
    `DataCollect` | `getCollector()` This method is called to get the DataCollect of the implemented class.
    `java.lang.String` | `getDataFileName(java.lang.String methodName)`
    `void` | `initialiseFileName(java.lang.String methodName)` If a file name is entered by the user, the file name of the model becomes the file name entered by the user, otherwise the default file name of the model is used.
    `boolean` | `isApplicable(Environment environment, int pos1, int 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.
    `void` | `loadData(java.util.HashMap<java.lang.String,java.lang.String> options)` To load the necessary thermodynamic parameters of the implemented class.
    `void` | `loadFile(java.lang.String name, DataCollect collector)` To load the thermodynamic parameters from the file "name" and stock them in the map of a DataCollect object.

- - ### Method Detail

    - #### isApplicable

          boolean isApplicable(Environment environment,
                             int pos1,
                             int pos2)

      Parameters:
        `environment` -
        `pos1.` - Start position of the pattern in the sequence.
        `pos2.` - End position of the pattern in the sequence.
      Returns:
        false if the model used to compute the enthalpy and entropy of the pattern at the positions pos1 and pos2 is not applicable with the environment. If the environment can make the results less reliable, a warning message will appear.

    - #### computeThermodynamics

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

      Parameters:
        `sequences` - which contains the sequences entered by the user.
        `pos1.` - Start position of the pattern in the sequence.
        `pos2.` - End position of the pattern in the sequence.
        `result` - which contains the computed enthalpy, entropy and melting temperature.
      Returns:
        ThermoResult result which contains the incremented enthalpy and entropy values.

    - #### isMissingParameters

          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.
      Parameters:
        `sequences` - which contains the sequences entered by the user.
        `pos1.` - Start position of the pattern in the sequence.
        `pos2.` - End position of the pattern in the sequence.
      Returns:
        false if one necessary thermodynamic parameter is missing.

    - #### getCollector

          DataCollect getCollector()

      This method is called to get the DataCollect of the implemented class.
      Returns:
        DataCollect object of the implemented class.

    - #### loadData

          void loadData(java.util.HashMap<java.lang.String,java.lang.String> options)

      To load the necessary thermodynamic parameters of the implemented class.
      Parameters:
        `options` - which contains the current options. (default options and options entered by the user)

    - #### loadFile

          void loadFile(java.lang.String name,
                      DataCollect collector)

      To load the thermodynamic parameters from the file "name" and stock them in the map of a DataCollect object.
      Parameters:
        `name` - : the file name where to find the thermodynamic parameters
        `collector` - : The object which stocks the different thermodynamic parameters in a map.

    - #### getDataFileName

          java.lang.String getDataFileName(java.lang.String methodName)

      Parameters:
        `methodName` - : method or model name entered by the user.
      Returns:
        the file name entered by the user if he wrote a name file preceded by ":" in the method or model name otherwise the default file name of the model.

    - #### initialiseFileName

          void initialiseFileName(java.lang.String methodName)

      If a file name is entered by the user, the file name of the model becomes the file name entered by the user, otherwise the default file name of the model is used.
      Parameters:
        `methodName` - : method or model name entered by the user.