Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

MAEPlugin.analysis
Class NormalizationPlugin  view NormalizationPlugin download NormalizationPlugin.java

java.lang.Object
  extended byMAEPlugin.MAEPlugin
      extended byMAEPlugin.CheckBoxMenuPlugin
          extended byMAEPlugin.analysis.AnalysisPlugin
              extended byMAEPlugin.analysis.NormalizationPlugin
All Implemented Interfaces:
java.util.EventListener, java.awt.event.ItemListener, MAEPlugin.Normalization, MAEPlugin.PluginStub

public abstract class NormalizationPlugin
extends AnalysisPlugin
implements MAEPlugin.Normalization

This class extends the analysis MAEPlugin base class to implement the Normalization base class. The "active normalization" is a static reference that all Normalization classes share. Whichever one is active will be the one used. Created on September 7, 2001, 5:46 PM

This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government. As a work of the United States Government there is no associated copyright. It is offered as open source software under the Mozilla Public License (version 1.1) subject to the limitations noted in the accompanying LEGAL file. This notice must be included with the code. The MAExplorer Mozilla and Legal files are available on http://maexplorer.sourceforge.net/.

Version:
$Date: 2003/03/03 16:22:10 $ / $Revision: 1.6 $

Field Summary
protected static MAEPlugin.Normalization activeNormalization
          Pointer to the current active Normalization object.
protected  java.lang.Object sample
           
 
Fields inherited from class MAEPlugin.MAEPlugin
DBUG_MAEP, jarResources, registryMaxSize
 
Fields inherited from interface MAEPlugin.PluginStub
PLUGIN_VERSION
 
Constructor Summary
NormalizationPlugin()
          NormalizationPlugin() - Default Constructor puts default menu name in menu.
NormalizationPlugin(java.lang.String menuLabel)
          NormalizationPlugin() - Default Constructor puts menu name in menu.
NormalizationPlugin(java.lang.String menuLabel, java.lang.String pluginFileName)
          NormalizationPlugin() - Default Constructor puts menu name in menu and file name.
 
Method Summary
abstract  float[] calcIntensityScaleExtrema(float maxRI, float minRI, float maxRaw, float minRaw, int sampleNbr)
          calcIntensityScaleExtrema() - compute scaled Intensity upper and lower limits of raw data for each sample.
abstract  void close(boolean preserveDataStructuresFlag)
          close() - close the plugin
static void disableNormalizationPlugin()
          disableNormalizationPlugin() - clear activeNormalization state.
abstract  boolean finishPipeline(int optArg)
          finishPipeline() - finish filter at end of normalization of all genes (if required).
static MAEPlugin.Normalization getActiveNormalization()
          getActiveNormalization() - Bean-style method for getting the activeNormalization.
static boolean getNormalizationState()
          getNormalizationState() - Static method for using testing getActiveNormalization().
 java.lang.Object getSample()
          getSample() - used to Get the primary sample, to get the variables
 void pluginHalt()
          pluginHalt() - stop the plugin
 void pluginMain()
          pluginMain() is the method activated when end-users check a checkbox API.
abstract  void recalcNormalizationExtrema()
          recalcNormalizationExtrema() - set the extreama for all samples for this plugin
abstract  boolean resetPipeline(int optArg)
          resetPipeline() - reset filter at start of data Normalization.
abstract  float scaleIntensityData(float rawData)
          scaleIntensityData() - scale raw intensity data as fct of normalization mode.
abstract  float scaleIntensityData(float rawIntensity, float rawBkgrd, int mid, int gid, int sampleIdx)
          scaleIntensityData() - the gene normalization operating on gene mid for sampleIdx where the data is ether extracted here or from the resetPipeline pre-analysis.
abstract  float scaleIntensityData(float rawData, int mid, int gid, int sampleNbr)
          scaleIntensityData() - scale raw intensity data as fct of normalization mode.
 void setActiveNormalization(MAEPlugin.Normalization obj)
          setActiveNormalization() - Bean-style method for setting the activeNormalization.
 void setSample(java.lang.Object obj)
          setSample() - method used to set primary variables from the sample.
abstract  void updateCurGene(int mid)
          updateCurGene() - abstract method end-users must implement to use the API.
abstract  void updateFilter()
          updateFilter() - abstract method end-users must implement to use the API.
abstract  void updateLabels()
          updateLabels() - abstract method end-users must implement to use the API.
abstract  void updateSlider()
          updateSlider() - abstract method end-users must implement to use the API.
 
Methods inherited from class MAEPlugin.CheckBoxMenuPlugin
getState, itemStateChanged, setState
 
Methods inherited from class MAEPlugin.MAEPlugin
getFlag, getInstance, getMAEStub, getMenuHook, getMenuInsertionPointName, getMenuItem, getNumberPlugins, getPluginDescription, getPluginFileName, getPluginName, getPlugins, menuActivated, pluginInit, removePlugin, setFlag, setJarResources, setMAEStub, setMenuHook, setMenuInsertionPointName, setMenuItem, setMenuLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface MAEPlugin.Normalization
getState, setState
 

Field Detail

activeNormalization

protected static MAEPlugin.Normalization activeNormalization
Pointer to the current active Normalization object. Reference to this object allows normalization methods to find the active normalization. This is static since only one normalization method may be active at a time. If the value is null, then there is NO active NormalizationPlugin even if several are loaded.


sample

protected java.lang.Object sample
Constructor Detail

NormalizationPlugin

public NormalizationPlugin()
NormalizationPlugin() - Default Constructor puts default menu name in menu.


NormalizationPlugin

public NormalizationPlugin(java.lang.String menuLabel)
NormalizationPlugin() - Default Constructor puts menu name in menu.


NormalizationPlugin

public NormalizationPlugin(java.lang.String menuLabel,
                           java.lang.String pluginFileName)
NormalizationPlugin() - Default Constructor puts menu name in menu and file name.

Method Detail

pluginMain

public final void pluginMain()
pluginMain() is the method activated when end-users check a checkbox API. This is unlike other plugins in that analysis will be done passively.

Specified by:
pluginMain in interface MAEPlugin.PluginStub

disableNormalizationPlugin

public static final void disableNormalizationPlugin()
disableNormalizationPlugin() - clear activeNormalization state. If the state is null, then there are no active normalization plugins even if one or more is loaded.


getNormalizationState

public static final boolean getNormalizationState()
getNormalizationState() - Static method for using testing getActiveNormalization(). It is used in MaeJavaAPI. If there is no active NormalizationPlugin instance, then this is false.


getActiveNormalization

public static final MAEPlugin.Normalization getActiveNormalization()
getActiveNormalization() - Bean-style method for getting the activeNormalization. If there is no active NormalizationPlugin instance, then this is null.


setActiveNormalization

public final void setActiveNormalization(MAEPlugin.Normalization obj)
setActiveNormalization() - Bean-style method for setting the activeNormalization. This method calls underlying methods in MAExplorer to treat the checkbox as a radio button and make sure that it disables other Normalization methods whether built-in or other normalization plugins.


pluginHalt

public void pluginHalt()
pluginHalt() - stop the plugin

Specified by:
pluginHalt in interface MAEPlugin.PluginStub

getSample

public final java.lang.Object getSample()
getSample() - used to Get the primary sample, to get the variables

Specified by:
getSample in interface MAEPlugin.Normalization

setSample

public final void setSample(java.lang.Object obj)
setSample() - method used to set primary variables from the sample.

Specified by:
setSample in interface MAEPlugin.Normalization

resetPipeline

public abstract boolean resetPipeline(int optArg)
resetPipeline() - reset filter at start of data Normalization. We will test for ALL GENES (if required) using the midOK[] boolean created here to later determine if we actually perform the test. This sets up the state that may be used during the pipeline operation.

Specified by:
resetPipeline in interface MAEPlugin.Normalization

finishPipeline

public abstract boolean finishPipeline(int optArg)
finishPipeline() - finish filter at end of normalization of all genes (if required). This may be used to clean up the state after the pipeline operation.

Specified by:
finishPipeline in interface MAEPlugin.Normalization

calcIntensityScaleExtrema

public abstract float[] calcIntensityScaleExtrema(float maxRI,
                                                  float minRI,
                                                  float maxRaw,
                                                  float minRaw,
                                                  int sampleNbr)
calcIntensityScaleExtrema() - compute scaled Intensity upper and lower limits of raw data for each sample. It is called to get extrema for use in scaling displays and other computations where the limits must be known.

Specified by:
calcIntensityScaleExtrema in interface MAEPlugin.Normalization

scaleIntensityData

public abstract float scaleIntensityData(float rawData)
scaleIntensityData() - scale raw intensity data as fct of normalization mode. This is called on a per-spot basis.

Specified by:
scaleIntensityData in interface MAEPlugin.Normalization

scaleIntensityData

public abstract float scaleIntensityData(float rawData,
                                         int mid,
                                         int gid,
                                         int sampleNbr)
scaleIntensityData() - scale raw intensity data as fct of normalization mode. There is a (gid,sampleNbr) dependence on the normalization. This is called on a per-spot basis.

Specified by:
scaleIntensityData in interface MAEPlugin.Normalization

scaleIntensityData

public abstract float scaleIntensityData(float rawIntensity,
                                         float rawBkgrd,
                                         int mid,
                                         int gid,
                                         int sampleIdx)
scaleIntensityData() - the gene normalization operating on gene mid for sampleIdx where the data is ether extracted here or from the resetPipeline pre-analysis. If the normalization is inoperative, then just return 0.0. The mid must be >=0 since -1 indicates an illegal gene. The midOK[mid] must be true, else it indicates an illegal gene. [NOTE] The plugin writer should try to avoid doing special analyses here that need to be computed DURING the processing and instead do the computations during the resetPipeline() operation if possible. That may be able to optimized and the data cached to avoid constant recomputation.

Specified by:
scaleIntensityData in interface MAEPlugin.Normalization

recalcNormalizationExtrema

public abstract void recalcNormalizationExtrema()
recalcNormalizationExtrema() - set the extreama for all samples for this plugin

Specified by:
recalcNormalizationExtrema in interface MAEPlugin.Normalization

updateCurGene

public abstract void updateCurGene(int mid)
updateCurGene() - abstract method end-users must implement to use the API. It is called by the popup Registry for the user to update any dependent data since the current gene has changed.


updateFilter

public abstract void updateFilter()
updateFilter() - abstract method end-users must implement to use the API. It is called by the popup Registry for the user to update any dependent data since the data Filter has changed.


updateSlider

public abstract void updateSlider()
updateSlider() - abstract method end-users must implement to use the API. It is called by the popup Registry for the user to update any dependent data since the threshold sliders have changed. This is invoked from the PopupRegistry.


updateLabels

public abstract void updateLabels()
updateLabels() - abstract method end-users must implement to use the API. It is called by the popup Registry for the user to update any dependent data since some global labels have changed.


close

public abstract void close(boolean preserveDataStructuresFlag)
close() - close the plugin