- return mapping.to == featureSequence ? map.locateInFrom(begin, end)
- : map.locateInTo(begin, end);
+ if (mapping.to == featureSequence)
+ {
+ result = map.locateInFrom(begin, end);
+ if (result == null)
+ {
+ // fudge for feature (e.g. CDS) extending to a mapped stop codon
+ result = map.locateInFrom(begin, end-3);
+ }
+ }
+ else
+ {
+ result = map.locateInTo(begin, end);
+ if (result == null)
+ {
+ // fudge for feature (e.g. CDS) extending to a mapped stop codon
+ result = map.locateInTo(begin, end-3);
+ }
+ }
+ return result;