*/
Hashtable viewportsAdded;
+ Hashtable annotationIds = new Hashtable();
+
String uniqueSetSuffix = "";
{
Annotation an = new Annotation();
- if (aa[i].label.equals("Quality") ||
- aa[i].label.equals("Conservation") ||
- aa[i].label.equals("Consensus"))
+ if(aa[i].annotationId!=null)
+ {
+ annotationIds.put(aa[i].annotationId, aa[i]);
+ }
+
+ an.setId(aa[i].annotationId);
+
+ if (aa[i]==av.quality ||
+ aa[i]==av.conservation ||
+ aa[i]==av.consensus)
{
an.setLabel(aa[i].label);
an.setGraph(true);
System.out.println("Successfully loaded archive file");
return af;
}
+ ex.printStackTrace();
System.err.println("Exception whilst loading jalview XML file : " +
ex + "\n");
continue;
}
+ if (an[i].getId() != null
+ && annotationIds.containsKey(an[i].getId()))
+ {
+ al.addAnnotation(
+ (jalview.datamodel.AlignmentAnnotation)annotationIds.get(an[i].getId())
+ );
+
+ continue;
+ }
+
AnnotationElement[] ae = an[i].getAnnotationElement();
jalview.datamodel.Annotation[] anot = new jalview.datamodel.Annotation[al.getWidth()];
- for (int aa = 0; aa < ae.length; aa++)
+ for (int aa = 0; aa < ae.length && aa<anot.length; aa++)
{
anot[ae[aa].getPosition()] = new jalview.datamodel.Annotation(ae[aa].getDisplayCharacter(),
ae[aa].getDescription(),
an[i].getDescription(), anot);
}
+ if(an[i].getId()!=null)
+ {
+ annotationIds.put(an[i].getId(), jaa);
+ jaa.annotationId = an[i].getId();
+ }
+
if(an[i].getSequenceRef()!=null)
{
jaa.createSequenceMapping(
for (int s = 0; s < groups[i].getSeqCount(); s++)
{
String seqId = groups[i].getSeq(s)+"";
- seqs.addElement((jalview.datamodel.SequenceI) seqRefIds.get(seqId));
+ jalview.datamodel.SequenceI ts = (jalview.datamodel.SequenceI)
+ seqRefIds.get(seqId);
+
+ if (ts != null)
+ seqs.addElement(ts);
}
+ if(seqs.size()<1)
+ continue;
+
jalview.datamodel.SequenceGroup sg = new jalview.datamodel.SequenceGroup(seqs,
groups[i].getName(), cs, groups[i].getDisplayBoxes(),
groups[i].getDisplayText(), groups[i].getColourText(),
af.alignPanels.clear();
af.closeMenuItem_actionPerformed(true);
+ /* if(ap.av.alignment.getAlignmentAnnotation()!=null)
+ {
+ for(int i=0; i<ap.av.alignment.getAlignmentAnnotation().length; i++)
+ {
+ if(!ap.av.alignment.getAlignmentAnnotation()[i].autoCalculated)
+ {
+ af.alignPanel.av.alignment.getAlignmentAnnotation()[i] =
+ ap.av.alignment.getAlignmentAnnotation()[i];
+ }
+ }
+ } */
+
return af.alignPanel;
}
}