statalign.base
Class MainManager

java.lang.Object
  extended by statalign.base.MainManager

public class MainManager
extends java.lang.Object

This is the central class in the information flow amongst classes. This class also manages the main thread that runs the MCMC.

Author:
miklos, novak

Field Summary
static java.lang.String[] alignmentTypes
          Alignment formats in which StatAlign can generate output Implemented formats currently are StatAlign (our own format), Clustal, Fasta, Phylip, Nexus
 DataManager dataMan
          Data manager that handles all input files.
 MainFrame frame
          The main window of the program.
 java.lang.String fullPath
          The full path of the input file from which we read the sequences.
 java.lang.String fullPathWithExtensions
          After adding on extensions from ModelExtension objects.
 InputData inputData
          Reference to all input data required to run StatAlign
 InputGUI inputgui
          The graphical interface of the Input panel
 ModelExtManager modelExtMan
          Manager for model extension plugins
 PostprocessManager postProcMan
          This is the postprocess-manager of our program, which handles the postprocesses applied on the MCMC run.
 java.lang.Class<? extends SubstitutionModel>[] substModels
          Array of substitution model classes that can be selected for an analysis.
 MainThread thread
          Main (background) calculation thread of the application
 
Constructor Summary
MainManager(MainFrame frame)
          A trivial constructor that only sets MainFrame and substModels.
 
Method Summary
 void deactivateRNA()
           
 void finished(int errorCode, java.lang.Exception ex)
          Called when the MCMC thread terminates, signals end of the process back to MainFrame.
 void init(java.util.ArrayList<java.lang.String> args)
          Initialises submanagers after the command line has been processed.
 void start()
          This function starts a new MCMC run.
 void startParallel(int noOfProcesses, int rank)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inputData

public InputData inputData
Reference to all input data required to run StatAlign


postProcMan

public PostprocessManager postProcMan
This is the postprocess-manager of our program, which handles the postprocesses applied on the MCMC run.


dataMan

public DataManager dataMan
Data manager that handles all input files.


modelExtMan

public ModelExtManager modelExtMan
Manager for model extension plugins


substModels

public java.lang.Class<? extends SubstitutionModel>[] substModels
Array of substitution model classes that can be selected for an analysis.


frame

public MainFrame frame
The main window of the program.


inputgui

public InputGUI inputgui
The graphical interface of the Input panel


thread

public MainThread thread
Main (background) calculation thread of the application


fullPath

public java.lang.String fullPath
The full path of the input file from which we read the sequences.


fullPathWithExtensions

public java.lang.String fullPathWithExtensions
After adding on extensions from ModelExtension objects.


alignmentTypes

public static java.lang.String[] alignmentTypes
Alignment formats in which StatAlign can generate output Implemented formats currently are StatAlign (our own format), Clustal, Fasta, Phylip, Nexus

Constructor Detail

MainManager

public MainManager(MainFrame frame)
A trivial constructor that only sets MainFrame and substModels. The MainFrame creates its MainManager, and the MainManager knows who is its owner MainFrame, so it can access GUIs on the MainFrame

Parameters:
frame - The owner of the MainManager, the main window of the graphical interface.
Method Detail

init

public void init(java.util.ArrayList<java.lang.String> args)
Initialises submanagers after the command line has been processed. This is separated from the constructor as some plugins require input from the command line.

Parameters:
params - plugin parameters

start

public void start()
This function starts a new MCMC run. It asks files for writing outputs, and it launches a MainThread that handles the MCMC run.


startParallel

public void startParallel(int noOfProcesses,
                          int rank)

finished

public void finished(int errorCode,
                     java.lang.Exception ex)
Called when the MCMC thread terminates, signals end of the process back to MainFrame.

Parameters:
errorCode - -1: error 0: completed 1: stopped after sampling 2: stopped before sampling

deactivateRNA

public void deactivateRNA()