X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSequenceI.java;h=6e6d1aada4a1e4c5067ecda1dc3fd2e9d7444abd;hb=232f7d67b34c8e52c85d9fdf6d81392b889458c5;hp=6992a8db9aee7b69bea20bed1fa2fd1189569bc4;hpb=35e6fbcf5ba60709ffccaf02df6c8b414dfa2647;p=jalview.git diff --git a/src/jalview/datamodel/SequenceI.java b/src/jalview/datamodel/SequenceI.java index 6992a8d..6e6d1aa 100755 --- a/src/jalview/datamodel/SequenceI.java +++ b/src/jalview/datamodel/SequenceI.java @@ -119,9 +119,9 @@ public interface SequenceI extends ASequenceI 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(); @@ -203,6 +203,16 @@ public interface SequenceI extends ASequenceI public int findPosition(int i); /** + * Returns the from-to sequence positions (start..) for the given column + * positions (1..), or null if no residues are included in the range + * + * @param fromColum + * @param toColumn + * @return + */ + public Range findPositions(int fromColum, int toColumn); + + /** * Returns an int array where indices correspond to each residue in the * sequence and the element value gives its position in the alignment * @@ -515,4 +525,13 @@ public interface SequenceI extends ASequenceI * returns true. */ BitSet getInsertionsAsBits(); + + /** + * Replaces every occurrence of c1 in the sequence with c2 and returns the + * number of characters changed + * + * @param c1 + * @param c2 + */ + public int replace(char c1, char c2); }