You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The method takes an alignment map (a way of representing a pairwise alignment as a map between residue indices) and outputs a string representation. The representation is not unique. For instance "1>2>3>2 4>3" and "4>3 1>2>3>2" are the same alignment. Likewise, "1>2>1" and "2>1>2" are the same alignment. Outputs potentially hinge on the enumeration order of the underlying map.
Possible solutions:
Create a canonical form (e.g. sorted some way). I'm not sure whether this is feasible; general graph canonization is computationally hard, but perhaps the special structure of alignment graphs gives an obvious order
Use a SortedMap (TreeMap) internally. This should make it deterministic, although perhaps not in a simple form
The method was intended as a concise human-readable output of the map, so the order doesn't really matter. Option 2 appears to be the simplest solution. Performance on this method is not critical.
The text was updated successfully, but these errors were encountered:
In #906, @Vidishab18 showed some test cases using AlignmentTools.toConciseAlignmentString can produce different results depending on HashMap iteration order.
The method takes an alignment map (a way of representing a pairwise alignment as a map between residue indices) and outputs a string representation. The representation is not unique. For instance "1>2>3>2 4>3" and "4>3 1>2>3>2" are the same alignment. Likewise, "1>2>1" and "2>1>2" are the same alignment. Outputs potentially hinge on the enumeration order of the underlying map.
Possible solutions:
The method was intended as a concise human-readable output of the map, so the order doesn't really matter. Option 2 appears to be the simplest solution. Performance on this method is not critical.
The text was updated successfully, but these errors were encountered: