org.fhcrc.cpl.viewer.feature.extraction
Class DefaultFeatureScorer
java.lang.Object
org.fhcrc.cpl.viewer.feature.extraction.DefaultFeatureScorer
- All Implemented Interfaces:
- FeatureScorer
public class DefaultFeatureScorer
- extends java.lang.Object
- implements FeatureScorer
Default feature scorer.
If we ever implement another one, maybe some machinery can be moved
up into a base class*
Has side effects on scored features: adjusts m/z, and sets kl, etc.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_resamplingFrequency
protected int _resamplingFrequency
_maxResampledDistanceBetweenFeatures
protected double _maxResampledDistanceBetweenFeatures
DEFAULT_MAX_PEAKS_PER_FEATURE
public static final int DEFAULT_MAX_PEAKS_PER_FEATURE
- See Also:
- Constant Field Values
_maxPeaksPerFeature
protected int _maxPeaksPerFeature
SUMSQUARES_MZ_WEIGHT
public static final float SUMSQUARES_MZ_WEIGHT
- See Also:
- Constant Field Values
SUMSQUARES_SCALED_INTENSITY_WEIGHT
public static final float SUMSQUARES_SCALED_INTENSITY_WEIGHT
- See Also:
- Constant Field Values
keepStatistics
protected boolean keepStatistics
unscaledMzDistances
protected java.util.List<java.lang.Float> unscaledMzDistances
unscaledIntensityDistances
protected java.util.List<java.lang.Float> unscaledIntensityDistances
DefaultFeatureScorer
public DefaultFeatureScorer()
scoreFeature
public float scoreFeature(Feature f,
Spectrum.Peak[] peaks)
- score a candidate feature f, and set the list of peaks that it's comprised of
Expecting charge=0 features and peaks
TODO: document this better
- Specified by:
scoreFeature in interface FeatureScorer
- Parameters:
f - peaks -
calcSumSquaresDistance2D
public float calcSumSquaresDistance2D(Feature f,
float[] scaledIntensityDistribution,
Spectrum.Peak[] peptidePeaks)
- Assign a score to a particular feature, given a scaled representation of
its peak intensities and the peaks themselves. This is kind of a 2-dimensional
sum-squares distance measure.
Lower is better
- Parameters:
f - scaledIntensityDistribution - peptidePeaks -
- Returns:
findClosestPeak
protected int findClosestPeak(Spectrum.Peak[] peaks,
float x,
int start)
getResamplingFrequency
public int getResamplingFrequency()
setResamplingFrequency
public void setResamplingFrequency(int resamplingFrequency)
setMaxResampledDistanceBetweenFeatures
public void setMaxResampledDistanceBetweenFeatures(double newValue)
getMaxPeaksPerFeature
public int getMaxPeaksPerFeature()
setMaxPeaksPerFeature
public void setMaxPeaksPerFeature(int maxPeaksPerFeature)
isKeepStatistics
public boolean isKeepStatistics()
setKeepStatistics
public void setKeepStatistics(boolean keepStatistics)
plotStatistics
public void plotStatistics()
Fred Hutchinson Cancer Research Center