def test_lf_display(self): """str of likelihood functions should not fail""" for (dummy, model) in self.ordered_by_complexity: di = Nucleotide(motif_length=2, mprob_model=model) di.adaptMotifProbs(self.cond_root_probs, auto=True) lf = di.makeLikelihoodFunction(self.tree) s = str(lf)
def test_reconstruct_ancestor(self): """should be able to reconstruct ancestral sequences under all models""" for (mprobs, model) in self.ordered_by_complexity: di = Nucleotide(motif_length=2, mprob_model=model) di.adaptMotifProbs(mprobs, auto=True) lf = di.makeLikelihoodFunction(self.tree) lf.setParamRule('length', is_independent=False, init=0.4) lf.setAlignment(self.aln) ancestor = lf.reconstructAncestralSeqs()