Convert identity.identify from a linear search to a tree search using residue_list_to_tree. Currently the function calls identity.is_a on every monosaccharide in the index, which is costly. Instead, it should try to narrow the possibilities by traversing a tree of collections of residues to limit the number of direct comparisons.
However, this breaks down as the error tolerance increases. How to handle?
Convert
identity.identify
from a linear search to a tree search usingresidue_list_to_tree
. Currently the function callsidentity.is_a
on every monosaccharide in the index, which is costly. Instead, it should try to narrow the possibilities by traversing a tree of collections of residues to limit the number of direct comparisons.However, this breaks down as the error tolerance increases. How to handle?