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
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