|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--MAEPlugin.MAEPlugin | +--MAEPlugin.CheckBoxMenuPlugin | +--MAEPlugin.analysis.AnalysisPlugin | +--MAEPlugin.analysis.NormalizationPlugin | +--GenNormalizationPlugin
This class implements a wrapper for a general purpose class GenericNormalizationPlugin MAExplorer plugin. This lets it exist all of the time in MAExplorer and is activated with a developer wants to debug a new normalization plugin as a installed class prior to deploying and testing it as a PluginLoader .jar file.
See mae.DBUG_GENERIC_NORM_PLUGIN flag to enable this.
[NOTE] if not debugging then comment out all "gnpp." references so it will compile if you remove the actual GenericNormalizationPlugin (i.e., to put it in its own maePlugins/ folder. These are flagged with a "[GNPP] so you can grep for them as "//gnpp." and either add or remove the "//".
Note: It is designed so that it may be used as either as a MAEPlugin or called, when debugging, from the MAExplorer menu if enabled in the main program. NOTE: The debugging menu item is NOT included in official releases and is disabled in the MAExplorer.java main program.
This example can serve as a model of using various MJA API methods for writing a range of NormalizationPlugin implementations. It includes more code than is necessary for most normalization plugins. However, after it is adapted to a particular method, the additional code can be removed to "slim" it down. See (4) below for discussion on the types of data available for writing normalization plugins.
(1) Required methods you must implement for NormalizationPlugins' There are several methods that require you to overide them for this extended type of FilterPlugin.
resetPipeline() - is called by the main MAExplorer data Filter for you to initialize your data prior to processing each gene with geneOperation(mid) calls. This sets the sampleDataType so that the plugin could use it for computing advanced normalizations. finalizePipeline() - is called at the end of the main MAExplorer data Filter for you post-process your data structures if you need to. calcIntensityScaleExtrema() - is called to compute Intensity Scale upper and lower limits extrema of raw data for each sample when the normalization method is changed. recalcNormalizationExtrema() - compute the intensity extreama for each sample and save back in the sample. scaleIntensityData() - is called to scale a data point.
(2) Data structure "SampleStats" can be used for saving sample specific data You can optionally use the local SampleStats class to hold statistics and other data on a per-sample basis and accessed via ssList[0:maxSamples]. You must popupulate this structure if you need it.
(3) Notes on required calls to MJAclasses for extended NormalizationPlugins' We get the state of MAExplorer through various calls to MJAxxxx methods in the initState() method.
(4) Types of data that may be accessed in this generic normalization plugin There are two types of data typically used: a) global (i.e. normalized by a median, Zscore, etc.); and b) data dependent in which all relevant data must be retrieved and used to precompute the analysis method prior to doing the actual normalization. This may be done in the resetPipeline() method which is called at the start of a pipeline processing cycle. Note that there may occasionally be other calls to scaleIntensityData() to scale the data (e.g. when you click on the current spot and it will report the data). It is critical that the resetPipeline() was previously called prior to using scaleIntensityData().
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/.
Field Summary | |
static int |
DBUG_MAX_MIDS
only report mids analysis in this range if DBUG_FLAG is on |
static int |
DBUG_MIN_MIDS
only report mids analysis in this range if DBUG_FLAG is on |
Fields inherited from class MAEPlugin.analysis.NormalizationPlugin |
activeNormalization, sample |
Fields inherited from class MAEPlugin.MAEPlugin |
DBUG_MAEP, jarResources, maestub, menuFlag, menuHook, menuInsertionPointName, menuItem, plugInFileName, plugInName, propertySupport, registry, registryMaxSize |
Fields inherited from interface MAEPlugin.PluginStub |
PLUGIN_VERSION |
Constructor Summary | |
GenNormalizationPlugin(MaeJavaAPI mJA,
boolean doTestDbugFlag)
GenNormalizationPlugin() - constructor ONLY for use with debugging using the mae.DBUG_GENERIC_NORM_PLUGIN flag to add (Analysis | Normalization | Test Generic Norm Plugin [DBUG]) to the normalization menu. |
Method Summary | |
float[] |
calcIntensityScaleExtrema(float maxRI,
float minRI,
float maxRaw,
float minRaw,
int sampleNbr)
calcIntensityScaleExtrema() - compute scaled intensity extrema. |
void |
close(boolean preserveDataStructuresFlag)
close() - close the plugin |
boolean |
finishPipeline(int optArg)
finishPipeline() - overide finish filter at end of normalization of all genes (if required). |
void |
recalcNormalizationExtrema()
recalcNormalizationExtrema() - set the extrema for all samples for this plugin. |
boolean |
resetPipeline(int optArg)
resetPipeline() - reset filter at start of data Normalization. |
float |
scaleIntensityData(float rawIntensityPoint)
scaleIntensityData() - scale raw intensity data as fct of normalization mode. |
float |
scaleIntensityData(float rawIntensity,
float rawBkgrd,
int mid,
int gid,
int sampleNbr)
scaleIntensityData() - the gene normalization operating on gene mid for sampleIdx where the data is ether extracted here or from the resetPipeline pre-analysis. |
float |
scaleIntensityData(float rawIntensity,
int mid,
int gid,
int sampleNbr)
scaleIntensityData() - scale raw intensity data as fct of normalization mode. |
void |
updateCurGene(int mid)
updateCurGene() - update any data since current gene has changed. |
void |
updateFilter()
updateFilter() - update any dependent data since Filter has changed. |
void |
updateLabels()
updateLabels() - update any dependent data since global labels have changed. |
void |
updateSlider()
updateSlider() - update any dependent data sincea threshold slider has changed. |
Methods inherited from class MAEPlugin.analysis.NormalizationPlugin |
disableNormalizationPlugin, getActiveNormalization, getNormalizationState, getSample, pluginHalt, pluginMain, setActiveNormalization, setSample |
Methods inherited from class MAEPlugin.CheckBoxMenuPlugin |
getState, itemStateChanged, setState |
Methods inherited from class MAEPlugin.MAEPlugin |
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
Methods inherited from interface MAEPlugin.Normalization |
getState, setState |
Field Detail |
public static int DBUG_MIN_MIDS
public static int DBUG_MAX_MIDS
Constructor Detail |
public GenNormalizationPlugin(MaeJavaAPI mJA, boolean doTestDbugFlag)
MaeJavaAPI
- mJA is instance of MaeJavaAPIdoTestDbugFlag
- to invoke the dummy testDbug() method.Method Detail |
public boolean resetPipeline(int optArg)
resetPipeline
in class NormalizationPlugin
optArg
- - optional argumentpublic boolean finishPipeline(int optArg)
finishPipeline
in class NormalizationPlugin
optArg
- - optional argumentpublic float scaleIntensityData(float rawIntensityPoint)
scaleIntensityData
in class NormalizationPlugin
rawIntensity
- is unnormalized data for the spotpublic float scaleIntensityData(float rawIntensity, int mid, int gid, int sampleNbr)
scaleIntensityData
in class NormalizationPlugin
rawIntensity
- is unnormalized data for the spotmid
- is MID of the spotgid
- is GID of pointsampleNbr
- for the samplepublic float scaleIntensityData(float rawIntensity, float rawBkgrd, int mid, int gid, int sampleNbr)
scaleIntensityData
in class NormalizationPlugin
rawIntensity
- is intensity value to be normalizedrawBkgrd
- is background intensity to be used in normalization
if the use Background flag is set. If there is no background,
then supply 0.0F as the arg.mid
- is the Master Gene ID to test if not -1 and the gene existsgid
- is the spot Geometry Gene Index to test if not -1 and the spot existssampleNbr
- is the HybridSample index number for single sample.
For Cy3 vs Cy5 mode, it is 0 for Cy3 (F1), and 1 for Cy5 (F2).
For HP-X 'set' vs HP-Y 'set' mode,
it is 0 for HP-X 'set', and 1 for HP-Y 'set'public float[] calcIntensityScaleExtrema(float maxRI, float minRI, float maxRaw, float minRaw, int sampleNbr)
calcIntensityScaleExtrema
in class NormalizationPlugin
maxRI
- maximum raw ratio intensityminRI
- minimum raw ratio intensitymaxRaw
- maximum raw intensity max(rawF1,rawF2)minRaw
- minimum raw intensity min(rawF1,rawF2)sampleNbr
- for the sample sample number in the range [1:maxSamples]element 0= maxDataS element 1= minDataS element 2= maxRawS element 3= minRawS
public void recalcNormalizationExtrema()
recalcNormalizationExtrema
in class NormalizationPlugin
public void updateCurGene(int mid)
updateCurGene
in interface MAEUpdateListener
updateCurGene
in class NormalizationPlugin
mid
- is the MID (Master Gene ID) that is the new current gene.public void updateFilter()
updateFilter
in interface MAEUpdateListener
updateFilter
in class NormalizationPlugin
public void updateSlider()
updateSlider
in interface MAEUpdateListener
updateSlider
in class NormalizationPlugin
public void updateLabels()
updateLabels
in interface MAEUpdateListener
updateLabels
in class NormalizationPlugin
public void close(boolean preserveDataStructuresFlag)
close
in interface MAEUpdateListener
close
in class NormalizationPlugin
preserveDataStructuresFlag
- to save data structures
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |