}
@Test(groups = "Functional")
- public void TestConstructor()
+ public void testConstructor()
{
SequenceI seq1 = new Sequence("sq1",
"ASFDDABACBACBACBACBACBACBABCABCBACBABCAB");
sg1.setStartRes(2);
sg1.setEndRes(23);
- CigarArray cig = new CigarArray(al, hc, sg1);
+ // Cigar array meanings:
+ // M = match
+ // D = deletion
+ // I = insertion
+ // number preceding M/D/I is the number of residues which
+ // match/are deleted/are inserted
+ // In the CigarArray constructor only matches or deletions are created, as
+ // we are comparing a sequence to its own subsequence (the group) + hidden
+ // columns.
+
+ // no hidden columns case
+ CigarArray cig = new CigarArray(al, null, sg1);
String result = cig.getCigarstring();
+ assertEquals(result, "22M");
+
+ cig = new CigarArray(al, hc, sg1);
+ result = cig.getCigarstring();
assertEquals(result, "1M4D9M5D3M");
// group starts at hidden cols