}
/**
+ * Make a 'copy' alignment - sequences have new copies of features and
+ * annotations, but share the original dataset sequences.
+ */
+ public Alignment(AlignmentI al)
+ {
+ SequenceI[] seqs = al.getSequencesArray();
+ for (int i = 0; i < seqs.length; i++)
+ {
+ seqs[i] = new Sequence(seqs[i]);
+ }
+ initAlignment(seqs);
+ }
+
+ /**
* Make an alignment from an array of Sequences.
*
* @param sequences
return dataset;
}
+ /**
+ * Align this alignment like the given (mapped) one.
+ */
@Override
public int alignAs(AlignmentI al)
{
- return alignAs(al, true, true);
+ /*
+ * Currently retains unmapped gaps (in introns), regaps mapped regions
+ * (exons)
+ */
+ return alignAs(al, false, true);
}
/**
* nucleotide bases. Does nothing if alignment of protein from cDNA is
* requested (not yet implemented).
*
+ * Parameters control whether gaps in exon (mapped) and intron (unmapped)
+ * regions are preserved. Gaps that connect introns to exons are treated
+ * conservatively, i.e. only preserved if both intron and exon gaps are
+ * preserved.
+ *
* @param al
+ * @param preserveMappedGaps
+ * if true, gaps within and between mapped codons are preserved
+ * @param preserveUnmappedGaps
+ * if true, gaps within and between unmapped codons are preserved
*/
// @Override
public int alignAs(AlignmentI al, boolean preserveMappedGaps,