/*
* convert chromosomal location to sequence coordinates
+ * - may be reverse strand (convert to forward for sequence feature)
* - null if a partially overlapping feature
*/
int[] seqLocation = mapping.locateInFrom(start, end);
if (seqLocation != null)
{
- count += addAlleleFeatures(seq, variant, seqLocation[0],
- seqLocation[1], forwardStrand);
+ int featureStart = Math.min(seqLocation[0], seqLocation[1]);
+ int featureEnd = Math.max(seqLocation[0], seqLocation[1]);
+ count += addAlleleFeatures(seq, variant, featureStart, featureEnd,
+ forwardStrand);
}
}