|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectstatalign.base.State
public class State
Objects of this class completely describe the state of the MCMC at a certain time. The state space that the chain explores comprises:
Apart from the above listed components State objects also store the Felsenstein likelihoods calculated for each character of each sequence and the full likelihood of the state to facilitate postprocessing based on these values (e.g. ancestral sequence estimation, loglikelihood trace etc.).
Tree node representation assumption: first nl
nodes are the leaves,
then come the ancestral nodes.
Field Summary | |
---|---|
int[][] |
align
Alignment: for each sequence and each character in the sequence the index of the ancestral character that it is aligned to, or -i-1 if it is not homologous to any character in the ancestor (gap) and the next character in the ancestor sequence (to the right) has index i |
double[] |
edgeLen
Edge length to parent, for each node (first nl are leaves) |
double[][][] |
felsen
Felsenstein likelihoods for each sequence and each character therein |
double[] |
indelParams
Indel model parameters (in the order: R, lambda, mu) |
boolean |
isBurnin
true if this state comes from the burnin. |
int[] |
left
Tree representation: left descendant of each node (first nl are leaves), -1 for none |
double |
logLike
Log-likelihood of the state, excluding model extension factors |
java.lang.String[] |
name
Names of the leaf sequences |
int |
nl
Number of leaves (input sequences) |
int |
nn
Number of nodes |
int[] |
parent
Tree representation: parent of each node (first nl are leaves), -1 for none |
int[] |
right
Tree representation: right descendant of each node (first nl are leaves), -1 for none |
int |
root
Root node of the tree |
java.lang.String[] |
seq
All sequences as strings, including most likely ancestral characters |
double[] |
substParams
Substitution model parameters, as given by the substitution plugin |
Constructor Summary | |
---|---|
State(int nn)
Constructs a new State object, filling the given parameter and
pre-allocating arrays (first dimensions only). |
Method Summary | |
---|---|
java.lang.String[] |
getFullAlign()
Returns the multiple alignment of all sequences, including ancestors. |
java.lang.String[] |
getLeafAlign()
Returns the multiple alignment of all leaf sequences. |
java.lang.String |
getNewickString()
Returns the Newick string representation of the tree |
java.lang.String |
getNewickStringWithLabels()
|
java.lang.String[] |
getPairwiseAlign(int node)
Returns string representation of alignment between node and its parent. |
static void |
main(java.lang.String[] args)
|
void |
updateNewickStringWithLabels()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int nn
public int nl
public int root
public int[] left
public int[] right
public int[] parent
public double[] edgeLen
public int[][] align
public double[][][] felsen
public java.lang.String[] seq
public java.lang.String[] name
public double[] indelParams
public double[] substParams
public double logLike
public boolean isBurnin
true
if this state comes from the burnin.
Constructor Detail |
---|
public State(int nn)
State
object, filling the given parameter and
pre-allocating arrays (first dimensions only). Does not create parameter arrays.
nn
- number of nodes total (including leaves)Method Detail |
---|
public java.lang.String[] getPairwiseAlign(int node)
seq
to construct the strings, - is printed for gaps.
Don't call for root, it will produce array bounds errors.
node
- the node to get the alignment for
public java.lang.String[] getLeafAlign()
public java.lang.String[] getFullAlign()
public java.lang.String getNewickString()
public java.lang.String getNewickStringWithLabels()
public void updateNewickStringWithLabels()
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |