phylo2vec.utils.newick.remove_branch_lengths

phylo2vec.utils.newick.remove_branch_lengths#

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

Remove branch lengths annotations from a Newick string

Example: “(((2:0.02,1:0.01),0:0.041),3:1.42);” –> “(((2,1),0),3);”

Parameters:

newick (str) – Newick string

Returns:

newick – Newick string without branch lengths

Return type:

str