*/
package jalview.analysis;
-import java.util.Locale;
-
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import java.util.NoSuchElementException;
import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
+import jalview.datamodel.ContactMatrixI;
import jalview.datamodel.DBRefEntry;
import jalview.datamodel.GeneLociI;
import jalview.datamodel.IncompleteCodonException;
*/
final Iterable<AlignmentAnnotation> matchedAlignmentAnnotations = al
.findAnnotations(seq, dsann.getCalcId(), dsann.label);
- if (!matchedAlignmentAnnotations.iterator().hasNext())
+ if (matchedAlignmentAnnotations == null
+ || !matchedAlignmentAnnotations.iterator().hasNext())
{
result.add(dsann);
if (labelForCalcId != null)
startRes = selectionGroup.getStartRes();
endRes = selectionGroup.getEndRes();
}
- copyAnn.restrict(startRes, endRes);
+ copyAnn.restrict(startRes, endRes + 0);
/*
* Add to the sequence (sets copyAnn.datasetSequence), unless the
*/
if (!seq.hasAnnotation(ann))
{
+ ContactMatrixI cm = seq.getDatasetSequence()
+ .getContactMatrixFor(ann);
+ if (cm != null)
+ {
+ seq.addContactListFor(copyAnn, cm);
+ }
seq.addAlignmentAnnotation(copyAnn);
}
// adjust for gaps
copyAnn.visible = true;
}
}
+
}
/**