{
assertEquals((ranges = map.getFromRanges()).size(), 1);
assertEquals(ranges.get(0)[0], 1579);
- assertEquals(ranges.get(0)[1], 2934);
+ assertEquals(ranges.get(0)[1], 2931);
assertEquals((ranges = map.getToRanges()).size(), 1);
assertEquals(ranges.get(0)[0], 1);
assertEquals(ranges.get(0)[1], 451);
{
assertEquals((ranges = map.getFromRanges()).size(), 1);
assertEquals(ranges.get(0)[0], 2928);
- assertEquals(ranges.get(0)[1], 3992);
+ assertEquals(ranges.get(0)[1], 3989);
assertEquals((ranges = map.getToRanges()).size(), 1);
assertEquals(ranges.get(0)[0], 1);
assertEquals(ranges.get(0)[1], 354);
{
assertEquals((ranges = map.getFromRanges()).size(), 1);
assertEquals(ranges.get(0)[0], 4054);
- assertEquals(ranges.get(0)[1], 4848);
+ assertEquals(ranges.get(0)[1], 4845);
assertEquals((ranges = map.getToRanges()).size(), 1);
assertEquals(ranges.get(0)[0], 1);
assertEquals(ranges.get(0)[1], 264);
assertEquals(ranges.get(0)[0], 7022);
assertEquals(ranges.get(0)[1], 7502);
assertEquals(ranges.get(1)[0], 1);
- assertEquals(ranges.get(1)[1], 437);
+ assertEquals(ranges.get(1)[1], 434);
assertEquals((ranges = map.getToRanges()).size(), 1);
assertEquals(ranges.get(0)[0], 1);
assertEquals(ranges.get(0)[1], 305);
// complement(488..1480)
assertEquals((ranges = map.getFromRanges()).size(), 1);
assertEquals(ranges.get(0)[0], 1480);
- assertEquals(ranges.get(0)[1], 488);
+ assertEquals(ranges.get(0)[1], 491);
assertEquals((ranges = map.getToRanges()).size(), 1);
assertEquals(ranges.get(0)[0], 1);
assertEquals(ranges.get(0)[1], 330);
{
int[] exons = new int[] { 11, 15, 21, 25, 31, 38 }; // 18 bp
+ int[] exons_nostop = new int[] { 11, 15, 21, 25, 31, 35 }; // 15 bp
// exact length match:
assertSame(exons, EmblFlatFile.adjustForProteinLength(6, exons));
- // match if we assume exons include stop codon not in protein:
- assertSame(exons, EmblFlatFile.adjustForProteinLength(5, exons));
+ // trimmed if we assume exons include stop codon not in protein:
+ assertEquals(Arrays.toString(exons_nostop), Arrays.toString(EmblFlatFile.adjustForProteinLength(5, exons)));
// truncate last exon by 6bp
int[] truncated = EmblFlatFile.adjustForProteinLength(4, exons);