Permalink
Browse files

Remove node_ids from NeXML.Clades.

  • Loading branch information...
1 parent 6f6b4f5 commit ea92853833ef5ff2dd14ead526b4b047b62e9c6e @bendmorris bendmorris committed with etal Feb 13, 2013
Showing with 3 additions and 2 deletions.
  1. +2 −1 Bio/Phylo/NeXMLIO.py
  2. +1 −1 Tests/test_Phylo_NeXML.py
View
@@ -122,7 +122,6 @@ def parse(self, values_are_confidence=False, rooted=False):
this_node = node_dict[node.id] = {}
if 'otu' in node.attrib and node.attrib['otu']: this_node['name'] = node.attrib['otu']
if 'root' in node.attrib and node.attrib['root'] == 'true': root = node.id
- this_node['node_id'] = node.id
for child in node._children:
if child.tag == qUri('nex:meta'):
@@ -271,5 +270,7 @@ def _write_tree(self, clade, tree, parent=None, rooted=False):
if not clade.is_terminal():
for new_clade in clade.clades:
tus.update(self._write_tree(new_clade, tree, parent=clade))
+
+ del clade.node_id
return tus
@@ -91,7 +91,7 @@ def assert_property(prop_name):
p2 = sorted([getattr(n, prop_name) for n in t2.get_terminals()])
self.assertEqual(p1,p2)
- for prop_name in ('name', 'node_id', 'branch_length', 'confidence'):
+ for prop_name in ('name', 'branch_length', 'confidence'):
assert_property(prop_name)
test_write.__doc__ = "Write and re-parse the phylogenies in %s." % source

0 comments on commit ea92853

Please sign in to comment.