+
+ /**
+ * Recover protein MSA from tdi msa
+ *
+ * @throws IOException
+ */
+ @Test(groups = { "Functional" })
+ public void testAlignAs_prot_tdi() throws Exception
+ {
+ // see also AlignmentUtilsTests
+ AlignmentI al1 = loadAlignment(TD_SEQS_2, FileFormat.Fasta);
+ AlignmentI al2 = loadAlignment(AA_SEQS_2_DS, FileFormat.Fasta);
+ al1.setDataset(null);
+ al2.setDataset(null);
+ AlignmentI al1copy = new Alignment(al1);
+ AlignmentI al2copy = new Alignment(al2);
+ AlignmentUtils.map3diPeptideToProteinAligment(al2, al1);
+ if (al2.getCodonFrames().isEmpty()) {al2.getCodonFrames().addAll(al1.getCodonFrames()); }
+ else {al1.getCodonFrames().addAll(al2.getCodonFrames()); };
+
+ ((Alignment) al2).alignAs(al1);
+ assertEquals("-NMP-R", al1.getSequenceAt(0).getSequenceAsString());
+ assertEquals("VX--YA", al1.getSequenceAt(1).getSequenceAsString());
+ assertEquals("-KQY-L", al2.getSequenceAt(0).getSequenceAsString());
+ assertEquals("RF--PW", al2.getSequenceAt(1).getSequenceAsString());
+
+ }