Skip to content

Commit 126596b

Browse files
committed
bug checking internal node. allow - or _ in internal node
1 parent dda0387 commit 126596b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

FastOMA/check_fastoma_input.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def add_internal_node_prune(species_tree,species_names):
137137
counter_internal += 1
138138
node_names.add(node.name)
139139
logger_hog.debug("The internal node name was too small or repeated "+node_name+" which is changed to "+node.name)
140-
elif any(not c.isalnum() for c in node_name):
140+
elif not all(e.isalnum() or e=="_" or e=="-" for e in node_name): #any(not c.isalnum() for c in node_name):
141141
node_name_new = ''.join(e for e in node_name if e.isalnum() or e=="_" or e=="-") # removing special chars
142142
if node_name_new in node_names:
143143
node.name =node_name_new+"_"+str(counter_internal)

0 commit comments

Comments
 (0)