Merge branch 'develop' into features/JAL-845splitPaneMergeDevelop
[jalview.git] / src / jalview / datamodel / AlignmentI.java
index ac2596a..526f362 100755 (executable)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -219,6 +219,15 @@ public interface AlignmentI extends AnnotatedCollectionI
   void setAnnotationIndex(AlignmentAnnotation aa, int index);
 
   /**
+   * Delete all annotations, including auto-calculated if the flag is set true.
+   * Returns true if at least one annotation was deleted, else false.
+   * 
+   * @param includingAutoCalculated
+   * @return
+   */
+  boolean deleteAllAnnotations(boolean includingAutoCalculated);
+
+  /**
    * Deletes a specific AlignmentAnnotation from the alignment, and removes its
    * reference from any SequenceI or SequenceGroup object's annotation if and
    * only if aa is contained within the alignment's annotation vector.
@@ -369,6 +378,11 @@ public interface AlignmentI extends AnnotatedCollectionI
   Set<AlignedCodonFrame> getCodonFrames();
 
   /**
+   * Set the codon frame mappings (replacing any existing set).
+   */
+  void setCodonFrames(Set<AlignedCodonFrame> acfs);
+
+  /**
    * get codon frames involving sequenceI
    */
   List<AlignedCodonFrame> getCodonFrame(SequenceI seq);
@@ -503,4 +517,13 @@ public interface AlignmentI extends AnnotatedCollectionI
    * @return
    */
   Set<String> getSequenceNames();
+
+  /**
+   * Returns a (possibly empty) alignment whose sequences are aligned to match
+   * the current alignment, as mapped by the given codon mappings.
+   * 
+   * @param codonFrames
+   * @return
+   */
+  AlignmentI getAlignedComplement(Set<AlignedCodonFrame> codonFrames);
 }