}
}
setDatasetSequence(seq.getDatasetSequence());
- if (seq.getAnnotation()!=null && alAnnotation!=null) {
+ if (seq.getAnnotation()!=null) {
AlignmentAnnotation[] sqann = seq.getAnnotation();
for (int i=0;i<sqann.length; i++)
{
- boolean found = sqann == alAnnotation;
+ if (sqann[i]==null)
+ {
+ continue;
+ }
+ boolean found = (alAnnotation==null);
if (!found)
{
for (int apos = 0; !found && apos<alAnnotation.length; apos++)
found = (alAnnotation[apos] == sqann[i]);
}
}
- AlignmentAnnotation newann = new AlignmentAnnotation(sqann[i]);
- addAlignmentAnnotation(newann);
+ if (found)
+ {
+ // only copy the given annotation
+ AlignmentAnnotation newann = new AlignmentAnnotation(sqann[i]);
+ addAlignmentAnnotation(newann);
+ }
}
}
if (seq.getPDBId()!=null) {