// TODO use Character.toLowerCase to avoid creating String objects?
char[] upstream = new String(ds
.getSequence(s.getStart() - 1 - ustream_ds, s.getStart() - 1))
- .toLowerCase(Locale.ROOT).toCharArray();
+ .toLowerCase(Locale.ROOT).toCharArray();
char[] downstream = new String(
ds.getSequence(s_end - 1, s_end + dstream_ds))
- .toLowerCase(Locale.ROOT).toCharArray();
+ .toLowerCase(Locale.ROOT).toCharArray();
char[] coreseq = s.getSequence();
char[] nseq = new char[offset + upstream.length + downstream.length
+ coreseq.length];
*/
final Iterable<AlignmentAnnotation> matchedAlignmentAnnotations = al
.findAnnotations(seq, dsann.getCalcId(), dsann.label);
- if (matchedAlignmentAnnotations == null
- || !matchedAlignmentAnnotations.iterator().hasNext())
+ boolean found = false;
+ if (matchedAlignmentAnnotations != null)
+ {
+ for (AlignmentAnnotation matched : matchedAlignmentAnnotations)
+ {
+ if (dsann.description.equals(matched.description))
+ {
+ found = true;
+ break;
+ }
+ }
+ }
+ if (!found)
{
result.add(dsann);
if (labelForCalcId != null)