|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectstatalign.model.ext.ModelExtManager
public class ModelExtManager
Interface between StatAlign core and the ModelExtension
plugins.
Not visible to plugins.
Constructor Summary | |
---|---|
ModelExtManager(MainManager mainMan)
|
Method Summary | |
---|---|
void |
addToFilenameExtension(java.lang.String s)
|
void |
afterAlignChange(Tree tree,
Vertex selectRoot,
boolean accepted)
|
void |
afterEdgeLenChange(Tree tree,
Vertex vertex,
boolean accepted)
|
void |
afterFirstHalfBurnin()
|
void |
afterIndelParamChange(Tree tree,
Hmm hmm,
McmcMove m,
boolean accepted)
|
void |
afterModExtParamChange(Tree tree,
boolean accepted)
|
void |
afterSampling()
|
void |
afterSubstParamChange(Tree tree,
SubstitutionModel model,
int ind,
boolean accepted)
|
void |
afterTreeChange(Tree tree,
Vertex nephew,
boolean accepted)
|
void |
beforeAlignChange(Tree tree,
Vertex selectRoot)
|
void |
beforeEdgeLenChange(Tree tree,
Vertex vertex)
|
void |
beforeIndelParamChange(Tree tree,
Hmm hmm,
McmcMove m)
|
void |
beforeModExtParamChange(Tree tree)
|
void |
beforeSampling(Tree tree)
Calls McmcModule.beforeSampling(Tree) on each active plugin. |
void |
beforeSubstParamChange(Tree tree,
SubstitutionModel model,
int ind)
|
void |
beforeTreeChange(Tree tree,
Vertex nephew)
|
double |
calcLogEm(int[] aligned)
|
void |
dataAdded(java.io.File file,
DataType data)
Called in GUI mode only when new data is added to the analysis. |
java.lang.String |
getFilenameExtension()
|
Mcmc |
getMcmc()
Allows access to the Mcmc class. |
java.lang.String |
getMcmcInfo()
|
int |
getParamChangeWeight()
|
java.util.List<ModelExtension> |
getPluginList()
Returns the (unmodifiable) list of recognised ModelExtension plugins. |
void |
incrementWeights()
|
void |
init(java.util.ArrayList<java.lang.String> args)
Discovers model extension plugins and initialises them. |
void |
initRun(InputData inputData)
Determines the list of active ModelExtension plugins. |
boolean |
isParamChangeAccepted(double logProposalRatio,
McmcMove m)
|
double |
logLikeAlignChange(Tree tree,
Vertex selectRoot)
Calculates the total log-likelihood of the state by adding the log-likelihood factor contributions from all model extension plugins to the log-likelihood of the tree. |
double |
logLikeEdgeLenChange(Tree tree,
Vertex vertex)
Calculates the total log-likelihood of the state by adding the log-likelihood factor contributions from all model extension plugins to the log-likelihood of the tree. |
double |
logLikeIndelParamChange(Tree tree,
Hmm hmm,
McmcMove m)
Calculates the total log-likelihood of the state by adding the log-likelihood factor contributions from all model extension plugins to the log-likelihood of the tree. |
double |
logLikeModExtParamChange(Tree tree)
Calculates the total log-likelihood of the state by adding the log-likelihood factor contributions from all model extension plugins to the log-likelihood of the tree. |
double |
logLikeSubstParamChange(Tree tree,
SubstitutionModel model,
int ind)
Calculates the total log-likelihood of the state by adding the log-likelihood factor contributions from all model extension plugins to the log-likelihood of the tree. |
double |
logLikeTreeChange(Tree tree,
Vertex nephew)
Calculates the total log-likelihood of the state by adding the log-likelihood factor contributions from all model extension plugins to the log-likelihood of the tree. |
void |
modifyProposalWidths()
|
boolean |
proposeParamChange(Tree tree)
|
void |
setMcmc(Mcmc mcmc)
|
double |
totalLogLike(Tree tree)
Calculates the total log-likelihood of the state by adding the log-likelihood factor contributions from all model extension plugins to the log-likelihood of the tree. |
double |
totalLogPrior(Tree tree)
Calculates the log of total prior probability by including contributions from model extension plugins. |
void |
zeroAllMoveCounts()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ModelExtManager(MainManager mainMan)
Method Detail |
---|
public void addToFilenameExtension(java.lang.String s)
public java.lang.String getFilenameExtension()
public void init(java.util.ArrayList<java.lang.String> args)
public void initRun(InputData inputData) throws java.lang.IllegalArgumentException
ModelExtension
plugins.
Calls ModelExtension.initRun(statalign.base.InputData)
on each of them.
inputData
- input data
java.lang.IllegalArgumentException
public void setMcmc(Mcmc mcmc)
public Mcmc getMcmc()
public void beforeSampling(Tree tree)
McmcModule.beforeSampling(Tree)
on each active plugin.
tree
- current treepublic void afterSampling()
public double totalLogLike(Tree tree)
tree
- the current tree
public double totalLogPrior(Tree tree)
tree
- the current tree
public int getParamChangeWeight()
public java.lang.String getMcmcInfo()
public void beforeModExtParamChange(Tree tree)
public boolean proposeParamChange(Tree tree)
public boolean isParamChangeAccepted(double logProposalRatio, McmcMove m)
public void modifyProposalWidths()
public void zeroAllMoveCounts()
public double logLikeModExtParamChange(Tree tree)
tree
- the current tree
public void afterModExtParamChange(Tree tree, boolean accepted)
public void beforeAlignChange(Tree tree, Vertex selectRoot)
public double logLikeAlignChange(Tree tree, Vertex selectRoot)
tree
- the current tree
public void afterAlignChange(Tree tree, Vertex selectRoot, boolean accepted)
public void beforeTreeChange(Tree tree, Vertex nephew)
public double logLikeTreeChange(Tree tree, Vertex nephew)
tree
- the current tree
public void afterTreeChange(Tree tree, Vertex nephew, boolean accepted)
public void beforeEdgeLenChange(Tree tree, Vertex vertex)
public double logLikeEdgeLenChange(Tree tree, Vertex vertex)
tree
- the current tree
public void afterEdgeLenChange(Tree tree, Vertex vertex, boolean accepted)
public void beforeIndelParamChange(Tree tree, Hmm hmm, McmcMove m)
public double logLikeIndelParamChange(Tree tree, Hmm hmm, McmcMove m)
tree
- the current tree
public void afterIndelParamChange(Tree tree, Hmm hmm, McmcMove m, boolean accepted)
public void beforeSubstParamChange(Tree tree, SubstitutionModel model, int ind)
public double logLikeSubstParamChange(Tree tree, SubstitutionModel model, int ind)
tree
- the current tree
public void afterSubstParamChange(Tree tree, SubstitutionModel model, int ind, boolean accepted)
public java.util.List<ModelExtension> getPluginList()
ModelExtension
plugins.
public void afterFirstHalfBurnin()
public void incrementWeights()
public double calcLogEm(int[] aligned)
aligned
- Vector indicating which characters are aligned to the current
column in the subtrees below.
public void dataAdded(java.io.File file, DataType data)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |