returns a very large number instead of the function value
if arguments are out of bound (useful for minimization with
minimizers that don't check argument boundaries)
construct bound-checked multivariate function
(a large number will be returned on function evaluation if argument
is out of bounds; default is 1000000)
determine active variables at a point p and corresponding
gradient grad (if a component of p lies on a border and
the corresponding component of the gradient points
out of the border the variable is considered inactive)
chi-square distribution
(distribution of sum of squares of n uniform random variables)
(Parameter: n; mean: n; variance: 2*n)
The chi-square distribution is a special case of the Gamma distribution
(shape parameter = n/2.0, scale = 2.0).
take any tree and afford it with an interface
suitable for a clock-like tree (parameters
are the minimal node height differences at each internal node).
Compare all given hypotheses to the best (ML) hypothesis
and store results in public arrays delta, deltaSE, pval
(which will automatically be created by this procedure).
Determine posterior probabilties and support values
for each hypothesis and store results in public arrays
posterior, support etc which will automatically be
created by this procedure.
Compare all given hypotheses to the best (ML) hypothesis
and store results in public arrays delta, pval
(which will automatically be created by this procedure).
Compare all given hypotheses to the best (ML) hypothesis
and store results in public arrays delta, deltaSE, pval
(which will automatically be created by this procedure).
Determine posterior probabilties and support values
for each hypothesis and store results in public arrays
posterior, support etc which will automatically be
created by this procedure.
Compare all given hypotheses to the best (ML) hypothesis
and store results in public arrays delta, pval
(which will automatically be created by this procedure).
This is an annotation version of the ConcatenatedAlignment
Unlike normal ConcatenatedAlignment, it permits for merges with different numbers
of sequences.
methods for minimization of a real-valued function of
several variables without using derivatives (Brent's modification
of a conjugate direction search method proposed by Powell)
minimization of a real-valued function of
several variables using a the nonlinear
conjugate gradient method where several variants of the direction
update are available (Fletcher-Reeves, Polak-Ribiere,
Beale-Sorenson, Hestenes-Stiefel) and bounds are respected.
conjugateGradientStyle determines the method for the
conjugate gradient direction update
update (0 -> Fletcher-Reeves, 1 -> Polak-Ribiere,
2 -> Beale-Sorenson, Hestenes-Stiefel), the default is 2.
take any tree and afford it with an interface
suitable for a clock-like tree with dated tips (parameters
are the minimal node height differences at each internal node
and the rate).
take any tree and afford it with an interface
suitable for a clock-like tree with dated tips (parameters
are the minimal node height differences at each internal node
and the rate).
defaultStep is a steplength parameter and should be set equal
to the expected distance from the solution (in a line search)
exceptionally small or large values of defaultStep lead to
slower convergence on the first few iterations (the step length
itself is adapted during search), the default value is 1.0
Provides parameter interface to a clock-like genealogy which is
assumed to have some demographic pattern of theta (diversity) as
well as branch parameters (the minimal node height differences
at each internal node).
Estimates the likelihood for a tree using a specified
model of sequence evolution and a sequence alignment and
a specific demographic model as a prior on coalescent intervals.
storage for pairwise distance matrices.
features:
- printing in in PHYLIP format,
- computation of (weighted) squared distance to other distance matrix
- Fills in all of array...
find parameter lambda within the given bounds
that minimizes the univariate function
(due to numerical inaccuaries it may happen
that getPoint for the returned lambda produces
a point that lies
slightly out of bounds)
Computes normalized rate matrix from Q matrix (general reversible model)
- Q_ii = 0
- Q_ij = Q_ji
- Q_ij is stored in R_ij (rate)
- only upper triangular is used
Also updates related MatrixExponential
Returns total sum of pairs alignment distance using gap creation
and extension penalties and transition penalties as defined in the
TransitionPenaltyTable provided.
Returns total sum of pairs alignment penalty using gap creation
and extension penalties and transition penalties in the
TransitionPenaltyTable provided.
Generates a tree which is identical to baseTree but has attributes (defined by attributeName)
at all internal nodes excluding the root node signifying (as a value between 0 and 100) the bootstrap
support by clade (that is the proportion of replicates that produce the sub clade under that node)
Returns an alignment which follows the pattern of the input alignment
except that all sites which do not contain states in dt (excluding the
gap character) are removed.
An alternative version of getSFString which works on the actual string
Returns a string representing the given number to the number
of significant figures requested.
illc should be set to true
if the problem is known to
be ill-conditioned. the default is false. this
variable is automatically set, when the problem
is found to to be ill-conditioned during iterations.
Incomplete Gamma function P(a,x) = 1-Q(a,x)
(a cleanroom implementation of Numerical Recipes gammp(a,x);
in Mathematica this function is 1-GammaRegularized)
Incomplete Gamma function P(a,x) = 1-Q(a,x)
(a cleanroom implementation of Numerical Recipes gammp(a,x);
in Mathematica this function is 1-GammaRegularized)
Computes the likelihood for a tree given a
model of sequence evolution and a sequence alignment;
also optimises tree parameters such as branch lengths
by maximising the likelihood (for optimal performance
special optimisation procedures are
employed for UnconstrainedTree, ClockTree and DatedTipsClockTree;
a general optimisation precedure is used for another
ParameterizedTree).
map external identifiers in the tree to a set of given identifiers
(which can be larger than the set of external identifiers but
must contain all of them)
NOTE: for efficiency it is assumed that the node lists of the tree are
correctly maintained.
Computes Akaike weights and expected Akaike weights
(relative evidence, expected relative evidence)
for a set of models and computes corresponding confidence sets
Provides parameter interface to any clock-like tree with
serially sampled tips (parameters are the minimal node height differences
at each internal node).
take any tree and afford it with an interface
suitable for a clock-like tree (parameters
are the minimal node height differences at each internal node).
approximates numerically the first and second derivatives of a
function of a single variable and approximates gradient and
diagonal of Hessian for multivariate functions
numFuncStops is the number of consecutive positive
evaluations of the stop criterion based on function evaluation
necessary to cause the abortion of the optimization
(default is 4)
Classes dealing with sequence alignments, including methods for reading
and printing in several possible formats, as well as rearranging and
concatenating.
Classes for reading and generating distance matrices, including computation
of pairwise distances for sequence data (maximum-likelihood and observed
distances).
Classes describing substitution models, i.e. rate matrices (e.g., the HKY
matrix) and rate heterogeneity distributions (e.g., the discrete Gamma
distribution), as well as a class for conveniently computing transition
probabilities.
Starting at time zero (i.e. with the interval with largest number of lineages),
the specified small intervals are pooled with the next non-small interval
(if this does not exist then with the previous non-small interval)
Starting at time zero (i.e. with the interval with largest number of lineages),
small intervals (<= minSize) are pooled with the next non-small interval
(if this does not exist then with the previous non-small interval)
controls the printed output from the routine
(0 -> no output, 1 -> print only starting and final values,
2 -> detailed map of the minimization process,
3 -> print also eigenvalues and vectors of the
search directions), the default value is 0
controls the printed output from the routine
(0 -> no output, 1 -> print only starting and final values,
2 -> detailed map of the minimisation process),
the default value is 0
reads aligned sequence data from plain text files.
recognizes PHYLIP 3.4 INTERLEAVED,
PHYLIP SEQUENTIAL,
CLUSTAL and derived formats.
Other features:
- the dot as "copy character" is recognized,
- all base characters are capitalized,
- automatic data type estimation
- determination of corresponding base frequencies.
constructs a tree reading in a New Hampshire treefile, taking care
for internal labels and branch lengths and binary/nonbinary and
rooted/unrooted trees
Given a translation table where the keys are the current
identifier names and the values are the new identifier names,
this method replaces the current identifiers in the tree with new
identifiers.
scbd is a scaling parameter. 1.0 is the default and
indicates no scaling. if the scales for the different
parameters are very different, scbd should be set to
a value of about 10.0.
step is a steplength parameter and should be set equal
to the expected distance from the solution.
exceptionally small or large values of step lead to
slower convergence on the first few iterations
the default value for step is 1.0