}
/**
- * Aligning protein from cDNA yet to be implemented, does nothing.
+ * Aligning protein from cDNA.
*
* @throws IOException
*/
@Test
public void testAlignAs_proteinAsCdna() throws IOException
{
+ // see also AlignmentUtilsTests
AlignmentI al1 = loadAlignment(CDNA_SEQS_1, "FASTA");
AlignmentI al2 = loadAlignment(AA_SEQS_1, "FASTA");
- String before0 = al2.getSequenceAt(0).getSequenceAsString();
- String before1 = al2.getSequenceAt(1).getSequenceAsString();
+ AlignedCodonFrame acf = new AlignedCodonFrame();
+ MapList ml = new MapList(new int[]
+ { 1, 12 }, new int[]
+ { 1, 4 }, 3, 1);
+ acf.addMap(al1.getSequenceAt(0), al2.getSequenceAt(0), ml);
+ acf.addMap(al1.getSequenceAt(1), al2.getSequenceAt(1), ml);
+ al2.addCodonFrame(acf);
((Alignment) al2).alignAs(al1, false, true);
- assertEquals(before0, al2.getSequenceAt(0).getSequenceAsString());
- assertEquals(before1, al2.getSequenceAt(1).getSequenceAsString());
+ assertEquals("K-Q-Y-L-", al2.getSequenceAt(0).getSequenceAsString());
+ assertEquals("-R-F-P-W", al2.getSequenceAt(1).getSequenceAsString());
}
/**