*
* Calculates the maximum width of the alignment, including gaps.
*
- * @return Greatest sequence length within alignment.
+ * @return Greatest sequence length within alignment, or -1 if no sequences
+ * present
*/
@Override
int getWidth();
* Used to set a particular index of the alignment with the given sequence.
*
* @param i
- * Index of sequence to be updated.
+ * Index of sequence to be updated. if i>length, sequence will be
+ * added to end, with no intervening positions.
* @param seq
- * New sequence to be inserted.
+ * New sequence to be inserted. The existing sequence at position i
+ * will be replaced.
+ * @return existing sequence (or null if i>current length)
*/
- void setSequenceAt(int i, SequenceI seq);
+ SequenceI replaceSequenceAt(int i, SequenceI seq);
/**
* Deletes a sequence from the alignment
void addCodonFrame(AlignedCodonFrame codons);
/**
- * add a set of aligned codons mappings for this alignment, apart from any
- * duplicates which are ignored
- *
- * @param codons
- */
- void addCodonFrames(Iterable<AlignedCodonFrame> codons);
-
- /**
* remove a particular codon frame reference from this alignment
*
* @param codons
* @param results
* @return -1 or index of sequence in alignment
*/
- int findIndex(SearchResults results);
+ int findIndex(SearchResultsI results);
/**
* append sequences and annotation from another alignment object to this one.
* @return
*/
public int[] getVisibleStartAndEndIndex(List<int[]> hiddenCols);
+
+ /**
+ * resolve a contact list instance (if any) associated with the annotation row
+ * and column position
+ *
+ * @param _aa
+ * @param column
+ * @return
+ */
+ ContactListI getContactListFor(AlignmentAnnotation _aa, int column);
+
+ AlignmentAnnotation addContactList(ContactMatrixI cm);
}