@Override
public void run()
{
- try
- {
- if (calcMan.isPending(this))
- {
- return;
- }
- calcMan.notifyStart(this);
- while (!calcMan.notifyWorking(this))
- {
- try
- {
- if (ap != null)
- {
- // ap.paintAlignment(false);
- }
-
- Thread.sleep(200);
- } catch (Exception ex)
- {
- ex.printStackTrace();
- }
- }
if (alignViewport.isClosed())
{
abortAndDestroy();
if (alignment == null || (aWidth = alignment.getWidth()) < 0)
{
- calcMan.workerComplete(this);
return;
}
strucConsensus = alignViewport.getAlignmentStrucConsensusAnnotation();
if (rnaStruc == null || !rnaStruc.isValidStruc())
{
- calcMan.workerComplete(this);
return;
}
alignment.getWidth(), hStrucConsensus, true, rnaStruc);
} catch (ArrayIndexOutOfBoundsException x)
{
- calcMan.workerComplete(this);
return;
}
alignViewport.setRnaStructureConsensusHash(hStrucConsensus);
// TODO AlignmentAnnotation rnaStruc!!!
updateResultAnnotation(true);
- } catch (OutOfMemoryError error)
- {
- calcMan.disableWorker(this);
-
- // consensus = null;
- // hconsensus = null;
- ap.raiseOOMWarning("calculating RNA structure consensus", error);
- } finally
- {
- calcMan.workerComplete(this);
- if (ap != null)
- {
- ap.paintAlignment(true, true);
- }
- }
}