org.fhcrc.cpl.viewer.feature
Class FeatureExtractor

java.lang.Object
  extended by org.fhcrc.cpl.viewer.feature.FeatureExtractor
Direct Known Subclasses:
FeatureStrategySpectrumFit, FeatureStrategyUsingWindow

public abstract class FeatureExtractor
extends java.lang.Object

User: mbellew Date: Sep 7, 2004 Time: 12:08:54 PM


Nested Class Summary
static interface FeatureExtractor.StatusListener
           
 
Field Summary
protected  int _dumpWindowSize
           
protected  int _maxCharge
           
protected  FloatRange _mzRange
           
protected  MSRun _run
           
protected  int _scanCount
           
protected  double _sn
           
protected  int _startScan
           
protected  FeatureExtractor.StatusListener _status
           
static java.lang.String DEFAULT_EXTRACTOR_PROPERTYNAME
           
static int TYPE_1D
           
static int TYPE_2D
           
 
Constructor Summary
protected FeatureExtractor(MSRun run, int startScan, int scanCount, int maxCharge, FloatRange mzRange, double sn)
           
 
Method Summary
protected abstract  Feature[] _analyze()
           
protected static void _logDebug(java.lang.String s)
           
 FeatureSet analyze()
           
protected  java.util.Collection<Feature> analyze1D(Scan scan)
           
protected  java.util.Collection<Feature> analyze2D(Scan[] scans)
           
protected  Feature[] analyzeScanAtATime(Scan[] scans)
          Helper function for one scan at a time analyzer (TYPE_1D)
protected  Feature[] analyzeWindow(Scan[] scans, int windowWidth, int windowMargin)
          Helper function for window analyzer (TYPE_2D)
protected  float[][] CombineScans(Scan[] scans, FloatRange range, int resample_freq)
           
protected  int getAccurateMassAdjustmentScans()
           
static FeatureExtractor getDefault(MSRun run, int scan, int count, int maxCharge, FloatRange range, double sn)
          Instantiate the default FeatureExtractor
static java.lang.Class getDefaultClass()
           
protected  int getDumpWindowSize()
           
static FloatRange getMzExtractionRange(MSRun.MSScan scan)
          Return the mz range for the given scan.
static FloatRange getMzExtractionRange(MSRun run)
          Return the mz range for the given run.
protected  Scan[] getScans(MSRun run, int start, int count)
           
 int getType()
           
 void setAccurateMassAdjustmentScans(int accurateMassAdjustmentScans)
           
static void setDefault(java.lang.Class c)
           
 void setDumpWindowSize(int dumpWindowSize)
           
 void setStatusListener(FeatureExtractor.StatusListener status)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_EXTRACTOR_PROPERTYNAME

public static final java.lang.String DEFAULT_EXTRACTOR_PROPERTYNAME

TYPE_1D

public static final int TYPE_1D
See Also:
Constant Field Values

TYPE_2D

public static final int TYPE_2D
See Also:
Constant Field Values

_run

protected MSRun _run

_maxCharge

protected int _maxCharge

_mzRange

protected FloatRange _mzRange

_sn

protected double _sn

_status

protected FeatureExtractor.StatusListener _status

_startScan

protected int _startScan

_scanCount

protected int _scanCount

_dumpWindowSize

protected int _dumpWindowSize
Constructor Detail

FeatureExtractor

protected FeatureExtractor(MSRun run,
                           int startScan,
                           int scanCount,
                           int maxCharge,
                           FloatRange mzRange,
                           double sn)
Method Detail

setDefault

public static void setDefault(java.lang.Class c)

getDefaultClass

public static java.lang.Class getDefaultClass()

getDefault

public static FeatureExtractor getDefault(MSRun run,
                                          int scan,
                                          int count,
                                          int maxCharge,
                                          FloatRange range,
                                          double sn)
Instantiate the default FeatureExtractor

Parameters:
run -
scan -
count -
maxCharge -
range -
sn -
Returns:

getMzExtractionRange

public static FloatRange getMzExtractionRange(MSRun.MSScan scan)
Return the mz range for the given scan. If computed lowMz and highMz were supplied, use those; otherwise try startMz and endMz.


getMzExtractionRange

public static FloatRange getMzExtractionRange(MSRun run)
Return the mz range for the given run. First, check scan zero. If range is no good, use the mzRange computed when the run was read.


setStatusListener

public void setStatusListener(FeatureExtractor.StatusListener status)

setDumpWindowSize

public void setDumpWindowSize(int dumpWindowSize)

getDumpWindowSize

protected int getDumpWindowSize()

setAccurateMassAdjustmentScans

public void setAccurateMassAdjustmentScans(int accurateMassAdjustmentScans)

getAccurateMassAdjustmentScans

protected int getAccurateMassAdjustmentScans()

getScans

protected Scan[] getScans(MSRun run,
                          int start,
                          int count)

CombineScans

protected float[][] CombineScans(Scan[] scans,
                                 FloatRange range,
                                 int resample_freq)

analyzeScanAtATime

protected Feature[] analyzeScanAtATime(Scan[] scans)
                                throws java.lang.InterruptedException
Helper function for one scan at a time analyzer (TYPE_1D)

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

analyzeWindow

protected Feature[] analyzeWindow(Scan[] scans,
                                  int windowWidth,
                                  int windowMargin)
                           throws java.lang.InterruptedException
Helper function for window analyzer (TYPE_2D)

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

analyze1D

protected java.util.Collection<Feature> analyze1D(Scan scan)
                                           throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

analyze2D

protected java.util.Collection<Feature> analyze2D(Scan[] scans)
                                           throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

getType

public int getType()

_logDebug

protected static void _logDebug(java.lang.String s)

_analyze

protected abstract Feature[] _analyze()
                               throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

analyze

public FeatureSet analyze()
                   throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException


Fred Hutchinson Cancer Research Center