import jalview.api.FeaturesSourceI;
import jalview.bin.Cache;
import jalview.bin.Jalview;
+import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.HiddenColumns;
import jalview.datamodel.PDBEntry;
return alignFrame;
}
+ public void LoadFileOntoAlignmentWaitTillLoaded(AlignViewport viewport,
+ String file, DataSourceType sourceType, FileFormatI format)
+ {
+ this.viewport = viewport;
+ this.file = file;
+ this.protocol = sourceType;
+ this.format = format;
+ _LoadAlignmentFileWaitTillLoaded();
+ }
+
+ protected void _LoadAlignmentFileWaitTillLoaded()
+ {
+ Thread loader = new Thread(this);
+ loader.start();
+
+ while (loader.isAlive())
+ {
+ try
+ {
+ Thread.sleep(500);
+ } catch (Exception ex)
+ {
+ }
+ }
+ }
+
public void updateRecentlyOpened()
{
Vector recent = new Vector();
}
// append to existing alignment
viewport.addAlignment(al, title);
+ if (source instanceof HMMFile)
+ {
+ AlignmentI alignment = viewport.getAlignment();
+ SequenceI seq = alignment
+ .getSequenceAt(alignment.getAbsoluteHeight() - 1);
+ seq.setIsHMMConsensusSequence(true);
+ AlignmentAnnotation[] annots = viewport.getAlignment()
+ .getAlignmentAnnotation();
+ for (AlignmentAnnotation annot : annots)
+ {
+ if ("RF".equals(annot.label)
+ || annot.label.contains("Reference"))
+ {
+ seq.mapToReference(annot);
+ break;
+ }
+ }
+ alignment.deleteSequence(alignment.getAbsoluteHeight() - 1);
+ alignment.insertSequenceAt(0, seq);
+ viewport.getAlignPanel().adjustAnnotationHeight();
+ viewport.updateSequenceIdColours();
+
+ }
}
else
{