mobiusklein / glypy

Glycan Analysis and Glycoinformatics Library for Python
Apache License 2.0
27 stars 14 forks source link

Assign branch labels based on length #8

Open mobiusklein opened 9 years ago

mobiusklein commented 9 years ago

Glycan.label_branches curently assigns letter labels based on the order it visits a branch, but it should assign labels closer to a to the longer branch.

It is hard to know which branch is longer at the beginning of the label_branches method, which also computes branch lengths, so perhaps switch this to a two pass algorithm that finds branch length and then assigns labels accordingly.