Converting SelectionInterval to SequenceAnnotationGenerator.SelectionRange
I am looking at converting a SequenceAnnotationGenerator to a DocumentOperation. In an effort to keep the internal changes to a minimum for now, I wanted to first take the `SequenceSelection` passed into `getOptions()` for the DocumentOperation to the corresponding `SequenceAnnotationGenerator.SelectionRange`. And then within my plugin code everything would work as-is.
Let's assume there's only one range selected.
For that one range in the `SequenceSelection`, I can get the `SelectionInterval` for it. And I believe this is what I want to convert to a `SequenceAnnotationGenerator.SelectionRange`.
Am I right in thinking `Selection.Interval.getMinResidue()` is a 1:1 ma to `SelectionRange.getFirstSelectedResidue`, and `SelectionInterval.getMaxResidue()` maps to `SelectionRange.getLastSelectedResidue`?
I believe this is the case but want to make sure there aren't assumptions I'm missing.
-
And I see I was wrong. SelectionInterval.getMaxResidue() is exclusive while SelectionRange.getLastSelectedResidue() is inclusive.
Helps if I could read :)0
Please sign in to leave a comment.
Comments
1 comment