def patristic_distance(tree, taxon1, taxon2): deprecate.dendropy_deprecation_warning( preamble="Deprecated since DendroPy 4: The 'dendropy.treecalc.patristic_distance()' function has moved to 'dendropy.calculate.treemeasure.patristic_distance()'.", old_construct="from dendropy import treecalc\npdm = treecalc.patristic_distance(...)", new_construct="from dendropy.calculate import treemeasure\npdm = treemeasure.patristic_distance(...)", ) return treemeasure.patristic_distance(tree=tree, taxon1=taxon1, taxon2=taxon2)
def patristic_distance(tree, taxon1, taxon2): deprecate.dendropy_deprecation_warning( preamble="Deprecated since DendroPy 4: The 'dendropy.treecalc.patristic_distance()' function has moved to 'dendropy.calculate.treemeasure.patristic_distance()'.", old_construct="from dendropy import treecalc\npdm = treecalc.patristic_distance(...)", new_construct="from dendropy.calculate import treemeasure\npdm = treemeasure.patristic_distance(...)") return treemeasure.patristic_distance( tree=tree, taxon1=taxon1, taxon2=taxon2)
def _chk_distance(t1, t2, exp_distance): tax1 = self.tree.taxon_namespace.get_taxon(label=t1) tax2 = self.tree.taxon_namespace.get_taxon(label=t2) pd = treemeasure.patristic_distance(self.tree, tax1, tax2) self.assertEqual(pd, exp_distance)