X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fdatamodel%2FAlignmentI.java;h=8ddba6c56b9a6e4de36b7cecf56711fd9fd77b34;hb=6fc163433164d93374330fa0a603eea1e1fd42b3;hp=f1238ffda2a975f196f890d8a62594051ef76a40;hpb=36dceb54710feb97a81f4bd69ad051f316141dc3;p=jalview.git diff --git a/src/jalview/datamodel/AlignmentI.java b/src/jalview/datamodel/AlignmentI.java index f1238ff..8ddba6c 100755 --- a/src/jalview/datamodel/AlignmentI.java +++ b/src/jalview/datamodel/AlignmentI.java @@ -41,7 +41,8 @@ public interface AlignmentI extends AnnotatedCollectionI * * 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(); @@ -107,11 +108,14 @@ public interface AlignmentI extends AnnotatedCollectionI * 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 @@ -363,14 +367,6 @@ public interface AlignmentI extends AnnotatedCollectionI 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 codons); - - /** * remove a particular codon frame reference from this alignment * * @param codons @@ -430,7 +426,7 @@ public interface AlignmentI extends AnnotatedCollectionI * @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. @@ -560,4 +556,16 @@ public interface AlignmentI extends AnnotatedCollectionI * @return */ public int[] getVisibleStartAndEndIndex(List 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); }