* if this is a virtual features, convert begin/end to the
* coordinates of the sequence it is mapped to
*/
- int[] beginRange = null;
- int[] endRange = null;
+ int[] beginRange = null; // feature start in local coordinates
+ int[] endRange = null; // feature end in local coordinates
if (mf != null)
{
- beginRange = mf.getMappedPositions(begin, begin);
- endRange = mf.getMappedPositions(end, end);
+ if (feature.isContactFeature())
+ {
+ /*
+ * map start and end points individually
+ */
+ beginRange = mf.getMappedPositions(begin, begin);
+ endRange = begin == end ? beginRange
+ : mf.getMappedPositions(end, end);
+ }
+ else
+ {
+ /*
+ * map the feature extent
+ */
+ beginRange = mf.getMappedPositions(begin, end);
+ endRange = beginRange;
+ }
if (beginRange == null || endRange == null)
{
// something went wrong