X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSequenceI.java;h=0f78bdb4f1fd6341b6d011d4e4fb8063a5a2909d;hb=0e65ec37e2c956e0ad94feda6fd07b7c3a9003ee;hp=e4be5ee3dd299f7f7e46844082f8e2f580e3f318;hpb=df2bf54c7050c42db156e96e73bbabce63e718d7;p=jalview.git diff --git a/src/jalview/datamodel/SequenceI.java b/src/jalview/datamodel/SequenceI.java index e4be5ee..0f78bdb 100755 --- a/src/jalview/datamodel/SequenceI.java +++ b/src/jalview/datamodel/SequenceI.java @@ -176,7 +176,7 @@ public interface SequenceI extends ASequenceI public String getDescription(); /** - * Return the alignment column for a sequence position + * Return the alignment column (from 1..) for a sequence position * * @param pos * lying from start to end @@ -191,16 +191,41 @@ public interface SequenceI extends ASequenceI public int findIndex(int pos); /** - * Returns the sequence position for an alignment position + * Returns the sequence position for an alignment position. * * @param i * column index in alignment (from 0.. + * Example: + * >Seq/8-13 + * ABC--DE-F + * findPositions(1, 4) returns Range(9, 9) // B only + * findPositions(3, 4) returns null // all gaps + * findPositions(2, 6) returns Range(10, 12) // CDE + * findPositions(3, 7) returns Range(11,12) // DE + * + * + * @param fromCol + * first aligned column position (base 0, inclusive) + * @param toCol + * last aligned column position (base 0, inclusive) + * + * @return + */ + public Range findPositions(int fromCol, int toCol); + + /** * Returns an int array where indices correspond to each residue in the * sequence and the element value gives its position in the alignment * @@ -495,4 +520,9 @@ public interface SequenceI extends ASequenceI * @return */ List findFeatures(int from, int to, String... types); + + /** + * Invalidate any cursors on the sequence (e.g. after an edit) + */ + public void zapCursor(); }