statalign.postprocess.plugins
Class ConsensusNetwork

java.lang.Object
  extended by statalign.postprocess.Postprocess
      extended by statalign.postprocess.plugins.ConsensusNetwork

public class ConsensusNetwork
extends Postprocess

This is the postprocessmanager for showing the consensus network.

Author:
miklos, novak, wood

Field Summary
 javax.swing.JPanel pan
           
 
Fields inherited from class statalign.postprocess.Postprocess
active, alignmentType, file, hasToolBar, mcmc, outputable, outputFile, postprocessable, postprocessWrite, rnaAssociated, sampling, screenable, selected, show
 
Constructor Summary
ConsensusNetwork()
          It construct a postprocess that is screenable (=can be shown on the GUI), outputable (= can be written into th elog file) but not postprocessable (= cannot generate its own output file).
 
Method Summary
 void afterLastSample()
          Empty function, since there is nothing to do after the last sample in this postprocess thread.
 void beforeFirstSample(InputData inputData)
          Initializes the graphical interface.
 java.lang.String getFileExtension()
          Returns default file extension that is to appended to the input file name to get the file this plugin is writing into.
 javax.swing.Icon getIcon()
          It generates a new icon based on the figure in file icons/calignment.gif
 javax.swing.JPanel getJPanel()
          It constructs a new JPanel, and returns with it
 java.lang.String getTabName()
          It returns with its tab name, 'Alignment'
 double getTabOrder()
          Specifies the order of the tab for this plugin in the GUI.
 java.lang.String getTip()
          It returns with the tip of the tabulated panel 'Current alignment in the Markov chain' (shown when mouse is moved over the panel)
 void newSample(State state, int no, int total)
          At each MCMC sampling point, the current alignment is shown on the GUI.
 void setSampling(boolean enabled)
          Toggles sampling mode.
 
Methods inherited from class statalign.postprocess.Postprocess
addTrack, getDependences, getModExtPlugins, getToolBarItems, getTracks, init, newPeek, newSample, newStep, refToDependences, reloadPanel, setSelected
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pan

public javax.swing.JPanel pan
Constructor Detail

ConsensusNetwork

public ConsensusNetwork()
It construct a postprocess that is screenable (=can be shown on the GUI), outputable (= can be written into th elog file) but not postprocessable (= cannot generate its own output file).

Method Detail

getJPanel

public javax.swing.JPanel getJPanel()
It constructs a new JPanel, and returns with it

Specified by:
getJPanel in class Postprocess
Returns:
Returns with the panel of the GUI

getIcon

public javax.swing.Icon getIcon()
It generates a new icon based on the figure in file icons/calignment.gif

Specified by:
getIcon in class Postprocess
Returns:
Returns with the icon that will appear on the label of the tabulated panel.

getTabName

public java.lang.String getTabName()
It returns with its tab name, 'Alignment'

Specified by:
getTabName in class Postprocess
Returns:
Returns with the name that will appear on the label of the tabulated panel.

getTip

public java.lang.String getTip()
It returns with the tip of the tabulated panel 'Current alignment in the Markov chain' (shown when mouse is moved over the panel)

Specified by:
getTip in class Postprocess

getTabOrder

public double getTabOrder()
Description copied from class: Postprocess
Specifies the order of the tab for this plugin in the GUI.

E.g. we probably always want the "sequence input"-tab to appear first and therefore it returns a 1.0d here. The "current alignment"-tab returns 2.0d here and so if we want to make a tab get ordered between the "sequence input" and the "current alignment"-tabs we just make that plugin return 1.5d or something similar here. By default tabs get ordered last.

Overrides:
getTabOrder in class Postprocess
Returns:
the tab order of the tab associated with this plugin, if running in a GUI.

getFileExtension

public java.lang.String getFileExtension()
Description copied from class: Postprocess
Returns default file extension that is to appended to the input file name to get the file this plugin is writing into.

Overrides:
getFileExtension in class Postprocess

beforeFirstSample

public void beforeFirstSample(InputData inputData)
Initializes the graphical interface.

Overrides:
beforeFirstSample in class Postprocess

newSample

public void newSample(State state,
                      int no,
                      int total)
At each MCMC sampling point, the current alignment is shown on the GUI. Also, it writes the current alignment into the log file when in sampling mode.

Overrides:
newSample in class Postprocess
Parameters:
state - A State object representing the current state of the chain
no - The number of the current sample
total - The number of the total samples

setSampling

public void setSampling(boolean enabled)
Toggles sampling mode.

Specified by:
setSampling in class Postprocess
Parameters:
enabled - Set it true if you need samples.

afterLastSample

public void afterLastSample()
Empty function, since there is nothing to do after the last sample in this postprocess thread.

Overrides:
afterLastSample in class Postprocess