- // TODO recode to compute newBegin, newEnd, isDelete
- // then perform the action
- int sfBegin = sf.getBegin();
- int sfEnd = sf.getEnd();
- int startCol = findIndex(sfBegin);
- int endCol = findIndex(sfEnd);
- if (startCol >= fromColumn && endCol <= toColumn)
- {
- // within cut region - delete feature
- deleteFeature(sf);
- amended.add(new SequenceFeature[] { sf, null });
- continue;
- }
- if (startCol < fromColumn && endCol > toColumn)
- {
- // feature spans cut region - shift end left
- SequenceFeature copy = new SequenceFeature(sf, sf.getBegin(),
- sf.getEnd() - cutWidth, sf.getFeatureGroup(),
- sf.getScore());
- deleteFeature(sf);
- addSequenceFeature(copy);
- amended.add(new SequenceFeature[] { sf, copy });
- continue;
- }
- // todo partial overlap - delete if contact feature