/*
* scenario:
* dna1 --> [4, 6] [10,12] --> pep1
- * dna2 --> [1, 3] [7, 9] [13,15] --> pep1
+ * dna2 --> [1, 3] [7, 9] [13,15] --> pep2
*/
SequenceI dna1 = new Sequence("dna1", "aaaGGGcccTTTaaa");
SequenceI dna2 = new Sequence("dna2", "GGGcccTTTaaaCCC");
dna.setDataset(null);
/*
+ * put a variant feature on dna2 base 8
+ * - should transfer to cds2 base 5
+ */
+ dna2.addSequenceFeature(new SequenceFeature("variant", "hgmd", 8, 8,
+ 0f, null));
+
+ /*
* need a sourceDbRef if we are to construct dbrefs to the CDS
* sequence from the dna contig sequences
*/
assertSame(cds2Dss, m.getSequence());
assertEquals(7, m.getStart());
assertEquals(9, m.getEnd());
+
+ /*
+ * check cds2 acquired a variant feature in position 5
+ */
+ SequenceFeature[] sfs = cds2Dss.getSequenceFeatures();
+ assertNotNull(sfs);
+ assertEquals(1, sfs.length);
+ assertEquals("variant", sfs[0].type);
+ assertEquals(5, sfs[0].begin);
+ assertEquals(5, sfs[0].end);
}
/**