statalign.model.subst.plugins
Class AminoAcidModel

java.lang.Object
  extended by statalign.model.subst.SubstitutionModel
      extended by statalign.model.subst.plugins.AminoAcidModel
Direct Known Subclasses:
Blosum, CpRev, Dayhoff, Jones, MtMam, MtREV, RtREV, Vt, Wag

public abstract class AminoAcidModel
extends SubstitutionModel

Common superclass for amino acid substitution models.

Author:
novak

Field Summary
static java.lang.String type
           
 
Fields inherited from class statalign.model.subst.SubstitutionModel
alphabet, attachedScoringScheme, d, e, menuName, params, v, w
 
Constructor Summary
AminoAcidModel()
           
 
Method Summary
 double acceptable(RawSequences r)
          This function decides if the model can accept the input sequences.
 java.awt.Color getColor(char c)
          Returns the color of a character.
 char mostLikely(double[] seq)
          Returns the most likely character given the Felsentein likelihood array.
 java.lang.String print()
          Dummy function with the possibility of further developments.
 void restoreParameter()
          Empty method provided for models with no parameters (the evolutionary time is represented in the edge lengths).
 double sampleParameter()
          It does nothing and returns 0, i.e log-probability 1.
 
Methods inherited from class statalign.model.subst.SubstitutionModel
getMenuName, getMenuName, getPrior, getType, getType, updateSpan, updateTransitionMatrix
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

public static final java.lang.String type
See Also:
Constant Field Values
Constructor Detail

AminoAcidModel

public AminoAcidModel()
Method Detail

getColor

public java.awt.Color getColor(char c)
Returns the color of a character. Magenta characters are 'RHK', red characters are 'AVFPMILW', blue characters are 'DE' and green characters are 'STYCNGQ'.

Specified by:
getColor in class SubstitutionModel
Parameters:
c - character whose background colour is to be returned

print

public java.lang.String print()
Dummy function with the possibility of further developments.

Specified by:
print in class SubstitutionModel
Returns:
the resulting String

restoreParameter

public void restoreParameter()
Empty method provided for models with no parameters (the evolutionary time is represented in the edge lengths).

Specified by:
restoreParameter in class SubstitutionModel

sampleParameter

public double sampleParameter()
It does nothing and returns 0, i.e log-probability 1.

Specified by:
sampleParameter in class SubstitutionModel
Returns:
log(fwd proposal probability/bwd proposal probability) [i.e. inverse Hastings ratio]

acceptable

public double acceptable(RawSequences r)
This function decides if the model can accept the input sequences.

Specified by:
acceptable in class SubstitutionModel
Parameters:
r - raw sequences
Returns:
the value telling how well the substitution model likes the sequences.

mostLikely

public char mostLikely(double[] seq)
Returns the most likely character given the Felsentein likelihood array.

Specified by:
mostLikely in class SubstitutionModel