*
* 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();
* @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.
* @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)
*
* @return
*/
- Set<AlignedCodonFrame> getCodonFrames();
+ List<AlignedCodonFrame> getCodonFrames();
/**
- * Set the codon frame mappings (replacing any existing set).
+ * Set the codon frame mappings (replacing any existing list).
*/
- void setCodonFrames(Set<AlignedCodonFrame> acfs);
+ void setCodonFrames(List<AlignedCodonFrame> acfs);
/**
* get codon frames involving sequenceI
* @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<SequenceI> 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<int[]> hiddenCols);
}