|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectstatalign.model.subst.SubstitutionModel
public abstract class SubstitutionModel
Superclass of the substitution models.
Field Summary | |
---|---|
char[] |
alphabet
This array contains the potential characters of the alphabet. |
SubstitutionScore |
attachedScoringScheme
This scoring scheme is used for constructing an initial tree. |
double[] |
d
The rate matrix must be diagonalized and represented in a v d w product, where d is a diagonal matrix. |
double[] |
e
This array tells the equilibrium distribution |
static java.lang.String |
menuName
Sets the name of the model plugin that will appear in the menu when declared with the same name and type. |
double[] |
params
Model parameters. |
static java.lang.String |
type
Tells whether your plugin is a nucleotide or protein model (or something else) when declared with the same name and type. |
double[][] |
v
The rate matrix must be diagonalized and represented in a v d w product, where d is a diagonal matrix |
double[][] |
w
The rate matrix must be diagonalized and represented in a v d w product, where d is a diagonal matrix |
Constructor Summary | |
---|---|
SubstitutionModel()
|
Method Summary | |
---|---|
abstract double |
acceptable(RawSequences r)
If a model cannot accept the currently loaded sequences (for example, because the sequences contains a character that is not part of the model) then it returns a negative number. |
abstract java.awt.Color |
getColor(char c)
Returns the colour associated with the character. |
java.lang.String |
getMenuName()
Retrieves the static field menuName of the class of the object the
method is called on. |
static java.lang.String |
getMenuName(java.lang.Class<? extends SubstitutionModel> cl)
Retrieves menuName static field of a SubstitutionModel plug-in class. |
double |
getPrior()
Returns the prior for the substitution parameters. |
java.lang.String |
getType()
Retrieves the static field type of the class of the object the
method is called on. |
static java.lang.String |
getType(java.lang.Class<? extends SubstitutionModel> cl)
Retrieves the static field type of a SubstitutionModel plug-in class. |
abstract char |
mostLikely(double[] seq)
|
abstract java.lang.String |
print()
Represents model state as a String (usually parameter values concatenated) |
abstract void |
restoreParameter()
Restores state just before the call of sampleParameter |
abstract double |
sampleParameter()
Abstract method to sample a new model parameter and update v,w,d,e accordingly. |
void |
updateSpan(double newSpan)
|
double[][] |
updateTransitionMatrix(double[][] transitionMatrix,
double edgeLength)
Updates externally stored transition matrix using current values of v, w, d, e and current edge length. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public double[][] v
public double[][] w
public double[] d
public double[] e
public char[] alphabet
public double[] params
public static java.lang.String type
public static java.lang.String menuName
public SubstitutionScore attachedScoringScheme
Constructor Detail |
---|
public SubstitutionModel()
Method Detail |
---|
public void updateSpan(double newSpan)
public abstract double acceptable(RawSequences r)
r
- raw sequences
public double[][] updateTransitionMatrix(double[][] transitionMatrix, double edgeLength)
transitionMatrix
- reference to matrix to store results, null to create newedgeLength
- evolutionary time
public abstract double sampleParameter()
public abstract void restoreParameter()
public abstract java.lang.String print()
public abstract java.awt.Color getColor(char c)
c
- character whose background colour is to be returnedpublic abstract char mostLikely(double[] seq)
public java.lang.String getType()
type
of the class of the object the
method is called on.
See getType(Class cl)
for details.
public static java.lang.String getType(java.lang.Class<? extends SubstitutionModel> cl)
type
of a SubstitutionModel plug-in class.
In the class it must be declared public static String
.
Searches the class hierarchy upwards until a class with the field declared is found.
cl
- class extending SubstitutionModel
type
or "unknown" if the field
is null or emptypublic java.lang.String getMenuName()
menuName
of the class of the object the
method is called on.
See getMenuName(Class cl)
for details.
public static java.lang.String getMenuName(java.lang.Class<? extends SubstitutionModel> cl)
menuName
static field of a SubstitutionModel plug-in class.
In the class it must be declared public static String
.
cl
- class extending SubstitutionModel
menuName
or the simple name of
cl
if the field doesn't exist or is nullpublic double getPrior()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |