phylo2vec.utils.newick.remove_parent_labels

phylo2vec.utils.newick.remove_parent_labels#

phylo2vec.utils.newick.remove_parent_labels(newick: str) str[source]#

Remove parent labels from the Newick string

Example: “(((2,1)4,0)5,3)6;;” –> “(((2,1),0),3);”

Parameters:

newick (str) – Newick representation of a tree

Returns:

newick – Newick string without parental/internal labels

Return type:

str