git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-2842 remove infinite loop in cursor move
[jalview.git]
/
src
/
jalview
/
datamodel
/
SequenceI.java
diff --git
a/src/jalview/datamodel/SequenceI.java
b/src/jalview/datamodel/SequenceI.java
index
1615bee
..
9ad0a61
100755
(executable)
--- 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);
/**
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 char[] getSequence();
@@
-203,6
+203,16
@@
public interface SequenceI extends ASequenceI
public int findPosition(int i);
/**
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
*
* Returns an int array where indices correspond to each residue in the
* sequence and the element value gives its position in the alignment
*
@@
-266,7
+276,7
@@
public interface SequenceI extends ASequenceI
* 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.
*
* 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 List<SequenceFeature> getSequenceFeatures();
@@
-439,17
+449,6
@@
public interface SequenceI extends ASequenceI
public void transferAnnotation(SequenceI entry, Mapping mp);
/**
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 The RNA of the sequence in the alignment
*/
@@
-501,6
+500,13
@@
public interface SequenceI extends ASequenceI
* @return
*/
List<SequenceFeature> findFeatures(int fromCol, int toCol, String... types);
* @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();
/**
*
/**
*
@@
-508,4
+514,13
@@
public interface SequenceI extends ASequenceI
* returns true.
*/
BitSet getInsertionsAsBits();
* 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);
}
}