public class Simulate
extends java.lang.Object
Constructor and Description |
---|
Simulate(Model m,
Tree t,
Parameters p)
Creates an object to simulate data for a given model, tree and parameters.
|
Simulate(Model m,
Tree t,
Parameters p,
Alignment unobserved)
Creates an object to simulate data for a given model, tree, parameters
and unobserved states.
|
Simulate(Model m,
Tree t,
Parameters p,
Alignment unobserved,
Constrainer con)
Creates an object to simulate data for a given model, tree, parameters,
unobserved states and constraints.
|
Modifier and Type | Method and Description |
---|---|
Alignment |
getAlignment(int length)
Gets a simulated alignment, not returing the state of internal nodes
|
Alignment |
getAlignment(int length,
boolean internal)
Gets a simulated alignment
|
Alignment |
getAlignment(int length,
boolean internal,
java.util.Map<java.lang.String,java.lang.String> recode)
Gets a simulated alignment.
|
Alignment |
getAlignment(int length,
java.util.Map<java.lang.String,java.lang.String> recode)
Gets a simulated alignment, not returing the state of internal nodes.
|
Site |
getSite()
Gets a simulated site without returning the state of the internal nodes
|
Site |
getSite(boolean internal)
Gets a simulated site
|
Site |
getSite(boolean internal,
java.util.Map<java.lang.String,java.lang.String> recode)
Gets a simulated site.
|
Site |
getSite(java.util.Map<java.lang.String,java.lang.String> recode)
Gets a simulated site without returning the state of the internal nodes.
|
public Simulate(Model m, Tree t, Parameters p) throws RateCategory.RateException, Model.ModelException, TreeException, Parameters.ParameterException
m
- The modelt
- The treep
- The parametersRateCategory.RateException
- Thrown if there is an issue with
a rate category in the model (e.g. a badly formatted rate).Model.ModelException
- Thrown if there is a problem with the
model (e.g. the rate categories differ in their states)TreeException
- Thrown if there is a problem with the tree.Parameters.ParameterException
- Thrown if there is a problem
with the parameters (e.g. a requied parameter is not present)public Simulate(Model m, Tree t, Parameters p, Alignment unobserved) throws RateCategory.RateException, Model.ModelException, TreeException, Parameters.ParameterException
m
- The modelt
- The treep
- The parametersunobserved
- The unobserved statesRateCategory.RateException
- Thrown if there is an issue with
a rate category in the model (e.g. a badly formatted rate).Model.ModelException
- Thrown if there is a problem with the
model (e.g. the rate categories differ in their states)TreeException
- Thrown if there is a problem with the tree.Parameters.ParameterException
- Thrown if there is a problem
with the parameters (e.g. a requied parameter is not present)public Simulate(Model m, Tree t, Parameters p, Alignment unobserved, Constrainer con) throws RateCategory.RateException, Model.ModelException, TreeException, Parameters.ParameterException
m
- The modelt
- The treep
- The parametersunobserved
- The unobserved statescon
- The constraintsRateCategory.RateException
- Thrown if there is an issue with
a rate category in the model (e.g. a badly formatted rate).Model.ModelException
- Thrown if there is a problem with the
model (e.g. the rate categories differ in their states)TreeException
- Thrown if there is a problem with the tree.Parameters.ParameterException
- Thrown if there is a problem
with the parameters (e.g. a requied parameter is not present)public Site getSite() throws TreeException
TreeException
- Thrown if the constrainer has a problem with the treepublic Site getSite(java.util.Map<java.lang.String,java.lang.String> recode) throws TreeException
recode
- Map of recodingsTreeException
- Thrown if the constrainer has a problem with the treepublic Site getSite(boolean internal) throws TreeException
internal
- Whether to return the state of the internal nodesTreeException
- Thrown if the constrainer has a problem with the treepublic Site getSite(boolean internal, java.util.Map<java.lang.String,java.lang.String> recode) throws TreeException
recode
- Map of recodingsinternal
- Whether to return the state of the internal nodesTreeException
- Thrown if the constrainer has a problem with the treepublic Alignment getAlignment(int length) throws AlignmentException, TreeException
length
- The length of the alignmentAlignmentException
- Thrown if there is a problem with the alignmentTreeException
- Thrown if the constrainer has a problem with the treepublic Alignment getAlignment(int length, boolean internal) throws AlignmentException, TreeException
length
- The length of the alignmentinternal
- Whether to return the state of the internal nodesAlignmentException
- Thrown if there is a problem with the alignmentTreeException
- Thrown if the constrainer has a problem with the treepublic Alignment getAlignment(int length, java.util.Map<java.lang.String,java.lang.String> recode) throws AlignmentException, TreeException
length
- The length of the alignmentrecode
- Map of recodingsAlignmentException
- Thrown if there is a problem with the alignmentTreeException
- Thrown if the constrainer has a problem with the treepublic Alignment getAlignment(int length, boolean internal, java.util.Map<java.lang.String,java.lang.String> recode) throws AlignmentException, TreeException
length
- The length of the alignmentinternal
- Whether to return the state of the internal nodesrecode
- Map of recodingsAlignmentException
- Thrown if there is a problem with the alignmentTreeException
- Thrown if the constrainer has a problem with the tree