import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.List;
* jalview.datamodel.AlignmentI#findIndex(jalview.datamodel.SearchResults)
*/
@Override
- public int findIndex(SearchResults results)
+ public int findIndex(SearchResultsI results)
{
int i = 0;
@Override
public String toString()
{
- return new FastaFile().print(getSequencesArray());
+ return new FastaFile().print(getSequencesArray(), true);
}
/**
}
return new int[] { startPos, endPos };
}
+
+ Map<Object, ContactMatrixI> contactmaps = new HashMap<Object, ContactMatrixI>();
+ @Override
+ public
+ ContactListI getContactListFor(AlignmentAnnotation _aa, int column)
+ {
+ ContactMatrixI cm = contactmaps.get(_aa.annotationId);
+ if (cm == null)
+ {
+ return null;
+ }
+ return cm.getContactList(column);
+ }
+
+ @Override
+ public AlignmentAnnotation addContactList(ContactMatrixI cm)
+ {
+ Annotation _aa[] = new Annotation[getWidth()];
+ Annotation dummy = new Annotation(0.0f);
+ for (int i = 0; i < _aa.length; _aa[i++] = dummy)
+ {
+ ;
+ }
+ AlignmentAnnotation aa = new AlignmentAnnotation("Contact Matrix",
+ "Contact Matrix", _aa);
+ aa.graph = AlignmentAnnotation.CUSTOMRENDERER;
+ aa.graphMin = cm.getMin();
+ aa.graphMax = cm.getMax();
+ aa.editable = false;
+ // aa.autoCalculated = true;
+ contactmaps.put(aa.annotationId, cm);
+ addAnnotation(aa);
+ return aa;
+ }
}