adams.data.instances
Class IntensityInstanceGenerator

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.data.instances.AbstractInstanceGenerator<Heatmap>
              extended by adams.data.instances.AbstractFieldInstanceGenerator
                  extended by adams.data.instances.IntensityInstanceGenerator
All Implemented Interfaces:
CleanUpHandler, Debuggable, Destroyable, OptionHandler, ShallowCopySupporter<AbstractInstanceGenerator>, SizeOfHandler, DatabaseConnectionHandler, DatabaseConnectionProvider, Serializable, Comparable

public class IntensityInstanceGenerator
extends AbstractFieldInstanceGenerator

A generator for turning a heatmap's intensities and fields of its report into weka.core.Instance objects.

Valid options are:

-D <int> (property: debugLevel)
    The greater the number the more additional info the scheme may output to
    the console (0 = off).
    default: 0
    minimum: 0
 
-add-db-id (property: addDatabaseID)
    If set to true, then the database ID will be added to the output.
 
-add-herd-number (property: addHerdNumber)
    If set to true, then the herd number will be added to the output.
 
-add-cow-number (property: addCowNumber)
    If set to true, then the cow number will be added to the output.
 
-field <adams.data.report.Field> [-field ...] (property: fields)
    The fields to add to the output.
    default:
 
-min-intensity <double> (property: minIntensity)
    The minimum intensity to keep.
    default: -1.0
    minimum: -1.0
 
-max-intensity <double> (property: maxIntensity)
    The maximum intensity to keep.
    default: -1.0
    minimum: -1.0
 

Version:
$Revision: 6027 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Field Summary
protected  double m_MaxIntensity
          the maximum m/z ratio to keep.
protected  double m_MinIntensity
          the minimum m/z ratio to keep.
 
Fields inherited from class adams.data.instances.AbstractFieldInstanceGenerator
m_Fields
 
Fields inherited from class adams.data.instances.AbstractInstanceGenerator
LABEL_FALSE, LABEL_TRUE, m_AddDatabaseID, m_DatabaseConnection, m_OutputHeader, m_TolerateHeaderChanges
 
Fields inherited from class adams.core.option.AbstractOptionHandler
m_DebugLevel, m_OptionManager
 
Constructor Summary
IntensityInstanceGenerator()
           
 
Method Summary
protected  void checkHeader(Heatmap data)
          Checks whether the number of waves are the same.
 void defineOptions()
          Adds options to the internal list of options.
protected  void generateHeader(Heatmap data)
          Generates the header of the output data.
protected  Instance generateOutput(Heatmap data)
          Generates the actual data.
 double getMaxIntensity()
          Returns the maximum intensity to keep.
 double getMinIntensity()
          Returns the minimum intensity to keep.
 String globalInfo()
          Returns a string describing the object.
 String maxIntensityTipText()
          Returns the tip text for this property.
 String minIntensityTipText()
          Returns the tip text for this property.
 void setMaxIntensity(double value)
          Sets the maximum intensity to keep.
 void setMinIntensity(double value)
          Sets the minimum intensity to keep.
 
Methods inherited from class adams.data.instances.AbstractFieldInstanceGenerator
addFields, createAttribute, fieldsTipText, getDefaultDatabaseConnection, getFields, setFields
 
Methods inherited from class adams.data.instances.AbstractInstanceGenerator
addDatabaseIDTipText, checkInput, checkSetup, cleanUp, compareTo, destroy, equals, forCommandLine, forName, generate, getAddDatabaseID, getDatabaseConnection, getGenerators, getOutputHeader, getTolerateHeaderChanges, initialize, interpretePosition, postProcessHeader, postProcessOutput, reset, setAddDatabaseID, setDatabaseConnection, setTolerateHeaderChanges, shallowCopy, shallowCopy, tolerateHeaderChangesTipText
 
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, debug, debug, debugLevelTipText, finishInit, getDebugLevel, getOptionManager, isDebugOn, newOptionManager, setDebugLevel, toCommandLine, toString
 
Methods inherited from class adams.core.ConsoleObject
getDebugging, getSystemErr, getSystemOut, sizeOf
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_MinIntensity

protected double m_MinIntensity
the minimum m/z ratio to keep.


m_MaxIntensity

protected double m_MaxIntensity
the maximum m/z ratio to keep.

Constructor Detail

IntensityInstanceGenerator

public IntensityInstanceGenerator()
Method Detail

globalInfo

public String globalInfo()
Returns a string describing the object.

Specified by:
globalInfo in class AbstractOptionHandler
Returns:
a description suitable for displaying in the gui

defineOptions

public void defineOptions()
Adds options to the internal list of options.

Specified by:
defineOptions in interface OptionHandler
Overrides:
defineOptions in class AbstractFieldInstanceGenerator

setMinIntensity

public void setMinIntensity(double value)
Sets the minimum intensity to keep.

Parameters:
value - the intensity

getMinIntensity

public double getMinIntensity()
Returns the minimum intensity to keep.

Returns:
the intensity

minIntensityTipText

public String minIntensityTipText()
Returns the tip text for this property.

Returns:
tip text for this property suitable for displaying in the gui

setMaxIntensity

public void setMaxIntensity(double value)
Sets the maximum intensity to keep.

Parameters:
value - the intensity

getMaxIntensity

public double getMaxIntensity()
Returns the maximum intensity to keep.

Returns:
the intensity

maxIntensityTipText

public String maxIntensityTipText()
Returns the tip text for this property.

Returns:
tip text for this property suitable for displaying in the gui

checkHeader

protected void checkHeader(Heatmap data)
Checks whether the number of waves are the same.

Overrides:
checkHeader in class AbstractFieldInstanceGenerator
Parameters:
data - the input data

generateHeader

protected void generateHeader(Heatmap data)
Generates the header of the output data.

Specified by:
generateHeader in class AbstractInstanceGenerator<Heatmap>
Parameters:
data - the input data

generateOutput

protected Instance generateOutput(Heatmap data)
Generates the actual data.

Specified by:
generateOutput in class AbstractInstanceGenerator<Heatmap>
Parameters:
data - the input data to transform
Returns:
the generated data


Copyright © 2013 University of Waikato, Hamilton, NZ. All Rights Reserved.