import jalview.datamodel.features.SequenceFeaturesI;
+import java.util.BitSet;
import java.util.List;
import java.util.Vector;
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();
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
*
* Answers a list of all sequence features associated with this sequence. The
* list may be held by the sequence's dataset sequence if that is defined.
*
- * @return hard reference to array
+ * @return
*/
public List<SequenceFeature> getSequenceFeatures();
public void transferAnnotation(SequenceI entry, Mapping mp);
/**
- * @param index
- * The sequence index in the MSA
- */
- public void setIndex(int index);
-
- /**
- * @return The index of the sequence in the alignment
- */
- public int getIndex();
-
- /**
* @return The RNA of the sequence in the alignment
*/
* @return
*/
List<SequenceFeature> findFeatures(int fromCol, int toCol, String... types);
+
+ /**
+ * Method to call to indicate that the sequence (characters or alignment/gaps)
+ * has been modified. Provided to allow any cursors on residue/column
+ * positions to be invalidated.
+ */
+ void sequenceChanged();
+
+ /**
+ *
+ * @return BitSet corresponding to index [0,length) where Comparison.isGap()
+ * 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);
}