org.fhcrc.cpl.viewer.feature.extraction.strategy
Class BaseFeatureStrategy

java.lang.Object
  extended by org.fhcrc.cpl.viewer.feature.extraction.strategy.BaseFeatureStrategy
All Implemented Interfaces:
FeatureStrategy
Direct Known Subclasses:
FeatureStrategyWindow

public abstract class BaseFeatureStrategy
extends java.lang.Object
implements FeatureStrategy


Nested Class Summary
static interface BaseFeatureStrategy.StatusListener
           
 
Field Summary
protected  int _dumpWindowSize
           
protected  int _endScan
           
protected  boolean _keepStatistics
           
protected  int _maxCharge
           
protected  FloatRange _mzRange
           
protected static int _resamplingFrequency
           
protected  MSRun _run
           
protected  int _scanCount
           
protected  double _sn
           
protected  int _startScan
           
protected  BaseFeatureStrategy.StatusListener _status
           
protected  CPUTimer timerResample
           
 
Fields inherited from interface org.fhcrc.cpl.viewer.feature.extraction.strategy.FeatureStrategy
DEFAULT_RESAMPLING_FREQUENCY
 
Constructor Summary
BaseFeatureStrategy()
           
 
Method Summary
 int getDumpWindowSize()
           
static FeatureStrategy getInstance(MSRun run, int startScan, int scanCount, int maxCharge, FloatRange mzRange, java.lang.Class<? extends FeatureStrategy> featureStrategyClass, boolean plotStatistics)
          This is what we use to instantiate FeatureStrategy objects.
 int getResamplingFrequency()
           
 void init(MSRun run, int startScan, int scanCount, int maxCharge, FloatRange mzRange, boolean plotStatistics)
          pass all of the interesting stuff to the FeatureStrategy so that the findPeptides() method doesn't need any additional parameters
 boolean isKeepStatistics()
           
 void plotStatistics()
          Can be overridden
protected  float[][] resampleSpectra(Scan[] scans)
          Utility method to resample spectra onto a standard grid
 void setDumpWindowSize(int dumpWindowSize)
           
 void setKeepStatistics(boolean keepStatistics)
           
 void setResamplingFrequency(int resamplingFrequency)
           
 void setStatusListener(BaseFeatureStrategy.StatusListener status)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.fhcrc.cpl.viewer.feature.extraction.strategy.FeatureStrategy
findPeptides, isPeakRidgeWalkSmoothed, setPeakRidgeWalkSmoothed
 

Field Detail

_run

protected MSRun _run

_maxCharge

protected int _maxCharge

_mzRange

protected FloatRange _mzRange

_sn

protected double _sn

_startScan

protected int _startScan

_endScan

protected int _endScan

_scanCount

protected int _scanCount

_status

protected BaseFeatureStrategy.StatusListener _status

_dumpWindowSize

protected int _dumpWindowSize

_resamplingFrequency

protected static int _resamplingFrequency

timerResample

protected CPUTimer timerResample

_keepStatistics

protected boolean _keepStatistics
Constructor Detail

BaseFeatureStrategy

public BaseFeatureStrategy()
Method Detail

init

public void init(MSRun run,
                 int startScan,
                 int scanCount,
                 int maxCharge,
                 FloatRange mzRange,
                 boolean plotStatistics)
Description copied from interface: FeatureStrategy
pass all of the interesting stuff to the FeatureStrategy so that the findPeptides() method doesn't need any additional parameters

Specified by:
init in interface FeatureStrategy

getInstance

public static FeatureStrategy getInstance(MSRun run,
                                          int startScan,
                                          int scanCount,
                                          int maxCharge,
                                          FloatRange mzRange,
                                          java.lang.Class<? extends FeatureStrategy> featureStrategyClass,
                                          boolean plotStatistics)
This is what we use to instantiate FeatureStrategy objects. It's a bit crude. Could reimplement

Parameters:
run -
startScan -
scanCount -
maxCharge -
mzRange -
featureStrategyClass -
Returns:

resampleSpectra

protected float[][] resampleSpectra(Scan[] scans)
                             throws java.lang.InterruptedException
Utility method to resample spectra onto a standard grid

Parameters:
scans -
Returns:
Throws:
java.lang.InterruptedException

setDumpWindowSize

public void setDumpWindowSize(int dumpWindowSize)
Specified by:
setDumpWindowSize in interface FeatureStrategy

getDumpWindowSize

public int getDumpWindowSize()
Specified by:
getDumpWindowSize in interface FeatureStrategy

setResamplingFrequency

public void setResamplingFrequency(int resamplingFrequency)

getResamplingFrequency

public int getResamplingFrequency()

setStatusListener

public void setStatusListener(BaseFeatureStrategy.StatusListener status)
Specified by:
setStatusListener in interface FeatureStrategy

isKeepStatistics

public boolean isKeepStatistics()
Specified by:
isKeepStatistics in interface FeatureStrategy

setKeepStatistics

public void setKeepStatistics(boolean keepStatistics)
Specified by:
setKeepStatistics in interface FeatureStrategy

plotStatistics

public void plotStatistics()
Can be overridden

Specified by:
plotStatistics in interface FeatureStrategy


Fred Hutchinson Cancer Research Center