*/
package jalview.datamodel;
-import jalview.analysis.AAFrequency;
-import jalview.analysis.Conservation;
-import jalview.renderer.ResidueShader;
-import jalview.renderer.ResidueShaderI;
-import jalview.schemes.ColourSchemeI;
-
import java.awt.Color;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collection;
import java.util.List;
import java.util.Map;
+import jalview.analysis.AAFrequency;
+import jalview.analysis.Conservation;
+import jalview.renderer.ResidueShader;
+import jalview.renderer.ResidueShaderI;
+import jalview.schemes.ColourSchemeI;
+
/**
* Collects a set contiguous ranges on a set of sequences
*
endRes + 1);
if (seqipos != null)
{
- seqipos.setDescription(seq.getDescription());
- seqipos.setDBRefs(seq.getDBRefs());
- seqipos.setSequenceFeatures(seq.getSequenceFeatures());
- if (seq.getDatasetSequence() != null)
- {
- seqipos.setDatasetSequence(seq.getDatasetSequence());
- }
-
if (seq.getAnnotation() != null)
{
AlignmentAnnotation[] alann = align.getAlignmentAnnotation();
newannot.restrict(startRes, endRes);
newannot.setSequenceRef(seqs[ipos]);
newannot.adjustForAlignment();
+ ContactMatrixI cm = seq
+ .getContactMatrixFor(seq.getAnnotation()[a]);
+ if (cm != null)
+ {
+ seqs[ipos].addContactListFor(newannot, cm);
+ }
seqipos.addAlignmentAnnotation(newannot);
}
}
} catch (java.lang.OutOfMemoryError err)
{
// TODO: catch OOM
- System.out.println("Out of memory loading groups: " + err);
+ jalview.bin.Console
+ .outPrintln("Out of memory loading groups: " + err);
}
return upd;
}
{
return (startRes <= apos && endRes >= apos) && sequences.contains(seq);
}
+
+ ////
+ //// Contact Matrix Holder Boilerplate
+ ////
+ ContactMapHolder cmholder = new ContactMapHolder();
+
+ @Override
+ public Collection<ContactMatrixI> getContactMaps()
+ {
+ return cmholder.getContactMaps();
+ }
+
+ @Override
+ public ContactMatrixI getContactMatrixFor(AlignmentAnnotation ann)
+ {
+ return cmholder.getContactMatrixFor(ann);
+ }
+
+ @Override
+ public ContactListI getContactListFor(AlignmentAnnotation _aa, int column)
+ {
+ return cmholder.getContactListFor(_aa, column);
+ }
+
+ @Override
+ public AlignmentAnnotation addContactList(ContactMatrixI cm)
+ {
+ AlignmentAnnotation aa = cmholder.addContactList(cm);
+
+ Annotation _aa[] = new Annotation[getWidth()];
+ Annotation dummy = new Annotation(0.0f);
+ for (int i = 0; i < _aa.length; _aa[i++] = dummy)
+ {
+ ;
+ }
+ aa.annotations = _aa;
+ // TODO passing annotations back to context to be added
+ return aa;
+ }
+
+ @Override
+ public void addContactListFor(AlignmentAnnotation annotation,
+ ContactMatrixI cm)
+ {
+ cmholder.addContactListFor(annotation, cm);
+ }
+
}