Package adams.data.filter
Class Smoothing<T extends DataContainer>
-
- Type Parameters:
T
- the type of data to smooth
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<Filter>
,SizeOfHandler
,Filter<T>
,DatabaseConnectionHandler
,DatabaseConnectionProvider
,DatabaseConnectionUser
,Serializable
,Comparable
public class Smoothing<T extends DataContainer> extends AbstractDatabaseConnectionFilter<T>
A filter that runs a smoothing scheme over the data.
Valid options are:
-D (property: debug) If set to true, scheme may output additional info to the console.
-smoother <gcms.data.smoothing.AbstractSmoother [options]> (property: smoother) The smoothing algorithm to use for smoothing the GC points (abundances) of the chromatogram. default: gcms.data.smoothing.SlidingWindow -window 20 -measure MEDIAN
Default options for gcms.data.smoothing.SlidingWindow (-smoother/smoother):-D (property: debug) If set to true, scheme may output additional info to the console.
-window <int> (property: windowSize) The window size for determining the 'smoothed' abundances. default: 20
-measure <MEDIAN|MEAN> (property: measure) The measure to use for calculating the 'smoothed' abundances. default: MEDIAN
- Version:
- $Revision$\
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class adams.data.filter.AbstractFilter
AbstractFilter.FilterJob<T extends DataContainer>
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractSmoother
m_Smoother
the smoothing scheme.-
Fields inherited from class adams.data.filter.AbstractDatabaseConnectionFilter
m_DatabaseConnection
-
Fields inherited from class adams.data.filter.AbstractFilter
m_DontUpdateID
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description Smoothing()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected AbstractDatabaseConnection
getDefaultDatabaseConnection()
Returns the default database connection.AbstractSmoother
getSmoother()
Returns the current smoothing algorithm.String
globalInfo()
Returns a string describing the object.protected T
processData(T data)
Performs the actual filtering.void
setSmoother(AbstractSmoother value)
Sets the smoothing algorithm.String
smootherTipText()
Returns the tip text for this property.protected void
updateDatabaseConnection()
Updates the database connection in the smoother.-
Methods inherited from class adams.data.filter.AbstractDatabaseConnectionFilter
getDatabaseConnection, initialize, setDatabaseConnection
-
Methods inherited from class adams.data.filter.AbstractFilter
checkData, cleanUp, compareTo, destroy, dontUpdateIDTipText, equals, filter, forCommandLine, getDontUpdateID, reset, setDontUpdateID, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel, setLoggingLevel
-
Methods inherited from interface adams.core.logging.LoggingSupporter
getLogger, isLoggingEnabled
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_Smoother
protected AbstractSmoother m_Smoother
the smoothing scheme.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- 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 interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractFilter<T extends DataContainer>
-
getDefaultDatabaseConnection
protected AbstractDatabaseConnection getDefaultDatabaseConnection()
Returns the default database connection.- Specified by:
getDefaultDatabaseConnection
in classAbstractDatabaseConnectionFilter<T extends DataContainer>
- Returns:
- the default database connection
-
setSmoother
public void setSmoother(AbstractSmoother value)
Sets the smoothing algorithm.- Parameters:
value
- the algorithm
-
getSmoother
public AbstractSmoother getSmoother()
Returns the current smoothing algorithm.- Returns:
- the algorithm
-
smootherTipText
public String smootherTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
updateDatabaseConnection
protected void updateDatabaseConnection()
Updates the database connection in the smoother.- Overrides:
updateDatabaseConnection
in classAbstractDatabaseConnectionFilter<T extends DataContainer>
-
processData
protected T processData(T data)
Performs the actual filtering.- Specified by:
processData
in classAbstractFilter<T extends DataContainer>
- Parameters:
data
- the data to filter- Returns:
- the filtered data
-
-