Class UnrootedMLSearcher

    • Constructor Detail

      • UnrootedMLSearcher

        public UnrootedMLSearcher​(Alignment alignment,
                                  SubstitutionModel model)
        Build an unconstrained optimiser based on a randomly generated tree.
        Parameters:
        alignment - the alignment used to represent each OTU
        model - the substitution model that is used for calcuation. If optimisation on the model occurs than this model will be altered
      • UnrootedMLSearcher

        public UnrootedMLSearcher​(Node root,
                                  SubstitutionModel model)
        Create a searcher based on a given tree, that has no alignment specified (useful as backbone tree for attaching new nodes)
        Parameters:
        root - the root of the tree to base things on (doesn't matter if it's rooted)
        model - the substitution model to be used
      • UnrootedMLSearcher

        public UnrootedMLSearcher​(Node root)
        Create a searcher based on a given tree, that has no alignment , or model, specified (useful as backbone tree for attaching new nodes)
        Parameters:
        root - the root of the tree to base things on (doesn't matter if it's rooted)
    • Method Detail

      • getAccessToBranches

        public BranchAccess[] getAccessToBranches()
      • getAccessToNodes

        public NodeAccess[] getAccessToNodes()
      • restoreState

        public void restoreState​(java.lang.Object stateReference)
        Specified by:
        restoreState in interface StateProvider
      • getNNIBranchLengthOptimiseAction

        public UndoableAction getNNIBranchLengthOptimiseAction​(StoppingCriteria.Factory stopper)
        Parameters:
        stopper - The means for determining when a set of round should be stopped
        Returns:
        An undoable action that does the Simulataneous NNI/Branch length of Stephan Guindon
      • mark

        public final void mark()
        Specified by:
        mark in interface Markable
      • undoToMark

        public final void undoToMark()
        Specified by:
        undoToMark in interface Markable
      • testLiklihood

        public void testLiklihood()
      • calculateLogLikelihood

        public double calculateLogLikelihood()
        Likelihood calculation method (not optimisation)
        Returns:
        the log likelihood, based on current model, branchlengths and topology
      • calculateLogLikelihood2

        public double calculateLogLikelihood2()
        An alternative likelihood calculation method (should give same results as other method, and in same time)
        Returns:
        the log likelihood, based on current model, branchlengths and topology
      • calculateSiteDetails

        public SiteDetails calculateSiteDetails()
      • simpleOptimiseLikelihood

        public double simpleOptimiseLikelihood​(double epsilon,
                                               AlgorithmCallback callback)
        Optimise the branch lengths of the tree to obtain the maximum likelihood. Does not change the model or the topology
        Parameters:
        epsilon - the tolerance places for convergence (on the likelihood score)
        callback - a callback to monitor progress
        Returns:
        the resulting likelihood
      • simpleOptimiseLikelihood

        public double simpleOptimiseLikelihood​(StoppingCriteria stopper,
                                               AlgorithmCallback callback)
        Optimise the branch lengths of the tree to obtain the maximum likelihood. Does not change the model or the topology
        Parameters:
        stopper - the stopping criteria (on the likelihood score)
        callback - a callback to monitor progress
        Returns:
        the resulting likelihood
      • buildPALTree

        public Tree buildPALTree()
      • buildPALNode

        public Node buildPALNode()