final Sequence aseq2 = new Sequence("Seq2", "-LY-");
aseq2.createDatasetSequence();
+ /*
+ * First with no mappings
+ */
AlignedCodonFrame acf = new AlignedCodonFrame();
assertNull(acf.getMappedRegion(seq1, aseq1, 1));
+ /*
+ * Set up the mappings for the exons (upper-case bases)
+ */
MapList map = new MapList(new int[]
{ 2, 4, 6, 6, 8, 9 }, new int[]
{ 1, 2 }, 3, 1);
assertEquals("[5, 5, 7, 8]",
Arrays.toString(acf.getMappedRegion(seq2, aseq2, 2)));
+ /*
+ * No mapping from sequence 1 to sequence 2
+ */
assertNull(acf.getMappedRegion(seq1, aseq2, 1));
}
}