|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectstatalign.postprocess.Postprocess
public abstract class Postprocess
Common ancestor for post-processing plugin classes. Comments for plugin developers:
Field Summary | |
---|---|
boolean |
active
True if plugin is active (must produce its output) either because other plugins depend on it or because it is selected |
java.lang.String |
alignmentType
This string tells the alignment type in which alignment must be presented |
java.io.FileWriter |
file
This is the logfile writer that is written during the running and gets information from all postprocesses. |
boolean |
hasToolBar
True, if the plugin implements the getToolBarItems() function. |
Mcmc |
mcmc
TODO: REMOVE!!!!!!!!!! |
boolean |
outputable
True if this class can generate an output |
java.io.FileWriter |
outputFile
This is the output file writer, that is written by a specific postprocess. |
boolean |
postprocessable
True if this class can generate a postprocess file |
boolean |
postprocessWrite
True if it writes a postprocess file |
boolean |
rnaAssociated
True if it should show only when running an RNA/DNA file |
boolean |
sampling
True if it writes into the log file |
boolean |
screenable
True if it can generate a GUI. |
boolean |
selected
True if plugin is selected in the menu (and thus a tab is created for the plugin in the main window that can be used to allow the user to change settings before MCMC start and to show runtime information afterwards) |
boolean |
show
True if a GUI must be shown to the user. |
Constructor Summary | |
---|---|
Postprocess()
|
Method Summary | |
---|---|
void |
addTrack(Track track)
NB because the track is added as a Pair, it will be passed by reference, which allows it to be modified from the place where it was added, i.e. |
void |
afterLastSample()
This function is called after the MCMC runs. |
void |
beforeFirstSample(InputData inputData)
Called before MCMC start. |
java.lang.String[] |
getDependences()
Override this and return an array of full-qualified class names of the plugins this plugin depends on. |
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. |
abstract javax.swing.Icon |
getIcon()
|
abstract javax.swing.JPanel |
getJPanel()
|
java.util.List<ModelExtension> |
getModExtPlugins()
|
abstract java.lang.String |
getTabName()
|
double |
getTabOrder()
Specifies the order of the tab for this plugin in the GUI. |
abstract java.lang.String |
getTip()
Returns with the tip information (shown when the mouse cursor is moved over the label of the tabulated panel) |
java.util.ArrayList<javax.swing.JComponent> |
getToolBarItems()
Returns the toolbar that this plugin uses. |
java.util.ArrayList<Track> |
getTracks()
The extra tracks to be plotted |
void |
init(ModelExtManager modelExtMan)
Called by PostprocessManager after setting the show field to allow initialisation,
possibly involving GUI (toolbar etc.) |
void |
newPeek(State state)
Allows peeking into the Markov chain before actual sampling begins. |
void |
newSample(McmcModule coreModel,
State state,
int no,
int total)
|
void |
newSample(State state,
int no,
int total)
This function is called when we sample from the Markov chain. |
void |
newStep(McmcStep mcmcStep)
Called after a new step is made. |
void |
refToDependences(Postprocess[] plugins)
Override this to get access to instances of the plugins your plugin depends on. |
void |
reloadPanel()
Reinitializes panel to accommodate a new GUI |
abstract void |
setSampling(boolean enabled)
This function switches on or off the sampling mode. |
void |
setSelected(boolean selected)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public Mcmc mcmc
public boolean hasToolBar
getToolBarItems()
function.
Defaults to false.
public boolean selected
public boolean screenable
public boolean show
public boolean active
public boolean outputable
public boolean postprocessable
public boolean sampling
public boolean postprocessWrite
public boolean rnaAssociated
public java.lang.String alignmentType
public java.io.FileWriter file
public java.io.FileWriter outputFile
Constructor Detail |
---|
public Postprocess()
Method Detail |
---|
public java.util.ArrayList<Track> getTracks()
public void addTrack(Track track)
track
- public void init(ModelExtManager modelExtMan)
PostprocessManager
after setting the show
field to allow initialisation,
possibly involving GUI (toolbar etc.)
public abstract java.lang.String getTabName()
public abstract javax.swing.Icon getIcon()
public abstract javax.swing.JPanel getJPanel()
public void reloadPanel()
public abstract java.lang.String getTip()
public double getTabOrder()
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.
public java.lang.String getFileExtension()
public java.lang.String[] getDependences()
public void refToDependences(Postprocess[] plugins)
plugins
- reference to Postprocess objects in the order they are specified
in getDependences() or null if it returns nullpublic void beforeFirstSample(InputData inputData)
public void newStep(McmcStep mcmcStep)
public void newPeek(State state)
newSample(State, int, int)
. Unlike that method, this one is called both
during and after the burn-in period.
state
- A State
object representing the current state of the chainpublic void newSample(State state, int no, int total)
newPeek(State state)
,
this method is only called after the burn-in period.
state
- A State
object representing the current state of the chainno
- The number of the current sampletotal
- The number of the total samplespublic void newSample(McmcModule coreModel, State state, int no, int total)
public abstract void setSampling(boolean enabled)
enabled
- Set it true if you need samples.public void afterLastSample()
public java.util.ArrayList<javax.swing.JComponent> getToolBarItems()
public java.util.List<ModelExtension> getModExtPlugins()
public void setSelected(boolean selected)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |