Exemple #1
0
 def new_clade(self, node):
     '''Returns a CDAO.Clade object for a given named node.'''
     
     result = self.node_info[node]
     
     kwargs = {}
     if 'branch_length' in result: kwargs['branch_length'] = result['branch_length']
     if 'label' in result: kwargs['name'] = result['label'].replace('_', ' ')
     if 'confidence' in result: kwargs['confidence'] = result['confidence']
     
     clade = CDAO.Clade(**kwargs)
     
     return clade
Exemple #2
0
    def new_clade(self, node):
        """Return a CDAO.Clade object for a given named node."""
        result = self.node_info[node]

        kwargs = {}
        if "branch_length" in result:
            kwargs["branch_length"] = result["branch_length"]
        if "label" in result:
            kwargs["name"] = result["label"].replace("_", " ")
        if "confidence" in result:
            kwargs["confidence"] = result["confidence"]

        clade = CDAO.Clade(**kwargs)

        return clade