X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FAlignmentI.java;h=76d1a485df422ff597611d82c07d092d42cba4f9;hb=e224b72118c12cd77ae96f0f8d86c123e0416dc7;hp=67e574347e6e2355678ad8bf38a71ce2199fd7e6;hpb=be32c14cd8e48fe0a207cd7030cb9cd46f894678;p=jalview.git diff --git a/src/jalview/datamodel/AlignmentI.java b/src/jalview/datamodel/AlignmentI.java index 67e5743..76d1a48 100755 --- a/src/jalview/datamodel/AlignmentI.java +++ b/src/jalview/datamodel/AlignmentI.java @@ -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 @@ -517,4 +516,40 @@ public interface AlignmentI extends AnnotatedCollectionI * @return */ Set getSequenceNames(); + + /** + * Checks if the alignment has at least one sequence with one non-gaped + * residue + * + * @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); }