X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSequenceI.java;h=15b61d2b4dcda5be93d6e01f1885aa8bb8b40009;hb=383bcec2f07e63081a697118554154100d599079;hp=6992a8db9aee7b69bea20bed1fa2fd1189569bc4;hpb=136c0793b90b72b928c4d77dc109dd5c644e00d3;p=jalview.git diff --git a/src/jalview/datamodel/SequenceI.java b/src/jalview/datamodel/SequenceI.java index 6992a8d..15b61d2 100755 --- a/src/jalview/datamodel/SequenceI.java +++ b/src/jalview/datamodel/SequenceI.java @@ -21,8 +21,10 @@ package jalview.datamodel; import jalview.datamodel.features.SequenceFeaturesI; +import jalview.util.MapList; import java.util.BitSet; +import java.util.Iterator; import java.util.List; import java.util.Vector; @@ -110,18 +112,20 @@ public interface SequenceI extends ASequenceI * get a range on the sequence as a string * * @param start - * position relative to start of sequence including gaps (from 0) + * (inclusive) position relative to start of sequence including gaps + * (from 0) * @param end - * position relative to start of sequence including gaps (from 0) + * (exclusive) position relative to start of sequence including gaps + * (from 0) * * @return String containing all gap and symbols in specified range */ public String getSequenceAsString(int start, int end); /** - * Get the sequence as a character array + * Answers a copy of the sequence as a character array * - * @return seqeunce and any gaps + * @return */ public char[] getSequence(); @@ -192,17 +196,31 @@ 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 (column) position. If at a + * gap, returns the position of the next residue to the right. If beyond the + * end of the sequence, returns 1 more than the last residue position. * * @param i * column index in alignment (from 0.. it); + + /** + * Locate the first position in this sequence which is not contained in an + * iterator region. If no such position exists, return 0 + * + * @param it + * iterator over regions + * @return first residue not contained in regions + */ + public int firstResidueOutsideIterator(Iterator it); }