+
+ // TODO - stash feature list and search incrementally
+ List<SequenceFeature> allFeatures = null;
+ if (frm != null)
+ {
+ allFeatures = frm.findFeaturesAtResidue(seq, seq.getStart(),
+ seq.getEnd());
+ }
+ else
+ {
+ allFeatures = sf.getAllFeatures(null);
+ }
+ // so we can check we are advancing when debugging
+ long fpos = 0;
+
+ for (SequenceFeature feature : allFeatures)