apollo.gui
Class SequenceSelector

java.lang.Object
  extended by apollo.gui.SequenceSelector

public class SequenceSelector
extends java.lang.Object

Searches for and maintains a list of matches of a search sequence in a SequenceI. The class handles reverse complement by reverse complementing the search sequence so that the whole SequenceI object sequence does not have to be reverse complemented - that could use a lot of memory. Coordinate conversions are done within the class to generate correct coordinates. The matches to the search SequenceI are generated when the object is created. They can be accessed one at a time using the getNextAsSeqFeature() and getNextAsLong(). areMoreMatches() indicates if there are more matches to get. moveToSeqPosition() sets the current SEQUENCE position to the value specified, with the match position moved to the first match at a position equal to or after the specified sequence position.


Constructor Summary
SequenceSelector(RangeI sf, java.lang.String queryStr)
           
SequenceSelector(RangeI sf, java.lang.String queryStr, boolean reverseComplement)
           
SequenceSelector(RangeI sf, java.lang.String queryStr, boolean reverseComplement, boolean useRegExp)
           
 
Method Summary
 int findMatches()
          Finds positions in the sequence which match the query sequence.
 int getMatchCount()
          Returns the number of matches to the query string found in the sequence
 java.util.Vector getMatches()
          Returns a vector of SeqFeatures for the find display
 java.util.Vector getZones()
          Returns a simple vector of match positions to BaseEditorPanel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequenceSelector

public SequenceSelector(RangeI sf,
                        java.lang.String queryStr)

SequenceSelector

public SequenceSelector(RangeI sf,
                        java.lang.String queryStr,
                        boolean reverseComplement)

SequenceSelector

public SequenceSelector(RangeI sf,
                        java.lang.String queryStr,
                        boolean reverseComplement,
                        boolean useRegExp)
Method Detail

findMatches

public int findMatches()
Finds positions in the sequence which match the query sequence.


getMatchCount

public int getMatchCount()
Returns the number of matches to the query string found in the sequence


getMatches

public java.util.Vector getMatches()
Returns a vector of SeqFeatures for the find display


getZones

public java.util.Vector getZones()
Returns a simple vector of match positions to BaseEditorPanel. We pull apart the "(\d+)-(\d+)" pattern here and just return the match position vector so that BaseEditorPanel doesn't need to know about ORO and pattern matching and all that good stuff