X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FAlignmentI.java;h=c15bb99b84c393da6f4b0afacc731f3aa5c1f95c;hb=90ad4273c7105b7763247192e1c6739eed30ba4c;hp=8194bf0fa4a0c77534d63d1daec30fd392cfd15a;hpb=72738726bce0733f652a5dbcc9db7c5a13bc2d80;p=jalview.git diff --git a/src/jalview/datamodel/AlignmentI.java b/src/jalview/datamodel/AlignmentI.java index 8194bf0..c15bb99 100755 --- a/src/jalview/datamodel/AlignmentI.java +++ b/src/jalview/datamodel/AlignmentI.java @@ -305,7 +305,7 @@ public interface AlignmentI extends AnnotatedCollectionI * @return Alignment containing dataset sequences or null of this is a * dataset. */ - Alignment getDataset(); + AlignmentI getDataset(); /** * Set the associated dataset for the alignment, or create one. @@ -313,7 +313,7 @@ public interface AlignmentI extends AnnotatedCollectionI * @param dataset * The dataset alignment or null to construct one. */ - void setDataset(Alignment dataset); + void setDataset(AlignmentI dataset); /** * pads sequences with gaps (to ensure the set looks like an alignment) @@ -375,12 +375,12 @@ public interface AlignmentI extends AnnotatedCollectionI * * @return */ - Set getCodonFrames(); + List getCodonFrames(); /** - * Set the codon frame mappings (replacing any existing set). + * Set the codon frame mappings (replacing any existing list). */ - void setCodonFrames(Set acfs); + void setCodonFrames(List acfs); /** * get codon frames involving sequenceI @@ -473,9 +473,8 @@ public interface AlignmentI extends AnnotatedCollectionI * * @return existing annotation matching the given attributes */ - AlignmentAnnotation findOrCreateAnnotation(String name, - String calcId, boolean autoCalc, SequenceI seqRef, - SequenceGroup groupRef); + AlignmentAnnotation findOrCreateAnnotation(String name, String calcId, + boolean autoCalc, SequenceI seqRef, SequenceGroup groupRef); /** * move the given group up or down in the alignment by the given number of @@ -525,4 +524,32 @@ public interface AlignmentI extends AnnotatedCollectionI * @return */ public boolean hasValidSequence(); + + /** + * Update any mappings to 'virtual' sequences to compatible real ones, if + * present in the added sequences. Returns a count of mappings updated. + * + * @param seqs + * @return + */ + int realiseMappings(List seqs); + + /** + * Returns the first AlignedCodonFrame that has a mapping between the given + * dataset sequences + * + * @param mapFrom + * @param mapTo + * @return + */ + AlignedCodonFrame getMapping(SequenceI mapFrom, SequenceI mapTo); + + /** + * Calculate the visible start and end index of an alignment. The result is + * returned an int array where: int[0] = startIndex, and int[1] = endIndex. + * + * @param hiddenCols + * @return + */ + public int[] getVisibleStartAndEndIndex(List hiddenCols); }