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

Only report the maximal match set for a Find pattern

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: In Progress
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.10.0b1
    • Fix Version/s: 2.10.1
    • Component/s: jvdesktop, jvlite
    • Labels:
      None

      Description

      Example:
      >s1
      aaaaMMMMMMMMMMMaaa

      Using the following code fragment:
      af = new jalview.io.FileLoader().LoadFileWaitTillLoaded("s1 aaaaaaMMMMMMMMMMMMMMMaaaa",jalview.io.FormatAdapter.PASTE)
      f = new jalview.analysis.Finder(af.getViewport().getAlignment(),null)
      f.setFindAll(true)
      f.find("M+")
      println f.getSearchResults().toString()

      Results in output:
      [6MMMMMMMMMMMMMMM7MMMMMMMMMMMMMM8MMMMMMMMMMMMM9MMMMMMMMMMMM10MMMMMMMMMMM11MMMMMMMMMM12MMMMMMMMM13MMMMMMMM14MMMMMMM15MMMMMM16MMMMM17MMMM18MMM19MM20M]


      For a run of matches, a match is produced at each point where the pattern still matches. Similarly, using the same pattern in the find dialog and hitting 'Find next' steps through the run of Ms. Find should only report the longest of these matches.

        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: