SequenceFeature[] sf = sequence.getSequenceFeatures();\r
int start = sequence.getStart();\r
int end = sequence.getEnd();\r
+ int startShift = 1-absStart-start; // how much the features are to be shifted by\r
for (int sfi = 0; sfi < sf.length; sfi++)\r
{\r
if (sf[sfi].getBegin() >= start && sf[sfi].getEnd() <= end)\r
{\r
// shift feature along by absstart\r
- sf[sfi].setBegin(sf[sfi].getBegin() + absStart);\r
- sf[sfi].setEnd(sf[sfi].getEnd() + absStart);\r
+ sf[sfi].setBegin(sf[sfi].getBegin() + startShift);\r
+ sf[sfi].setEnd(sf[sfi].getEnd() + startShift);\r
}\r
}\r
}\r