Uploaded image for project: 'Jalview'
  1. Jalview
  2. JAL-2562

Verify and fix tests, javadoc and use of SequenceI.findPosition

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 2.11.0
    • Component/s: Datamodel
    • Labels:

      Description

      SequenceI.findPosition takes indices on aligned positions, and returns values [SequenceI.getStart(),SequenceI.getEnd()].

      For a gapped position, its javadoc states that the left-most position is returned. This is not actually the case, and calling code has logic to handle the result in these cases. Test code actually states this mismatch in behaviour.

      0. The leftmost position logic needs reinstatement, or javadoc needs changing.
      1. findPosition needs to return a range including 'Before' and 'After', as well as [SequenceI.getStart(),SequenceI.getEnd()].
      2. Ideally, findIndex and findPosition should return results that resolve to each-other's argument ranges.
      3. tests and callers need fixing to remove excessive logic.

      Most of this will be carried out under JAL-2526..

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jprocter James Procter
              Reporter:
              jprocter James Procter
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: