org.fhcrc.cpl.toolbox.proteomics.feature.matching
Class Window2DFeatureSetMatcher

java.lang.Object
  extended by org.fhcrc.cpl.toolbox.proteomics.feature.matching.Window2DFeatureSetMatcher

public class Window2DFeatureSetMatcher
extends java.lang.Object

Attempts to match one feature set against another using a window of minimum and maximum mass and elution time differences, not necessarily centered at 0.


Field Summary
static int DEFAULT_ELUTION_MODE
           
static int ELUTION_MODE_HYDROPHOBICITY
           
static int ELUTION_MODE_SCAN
           
static int ELUTION_MODE_TIME
           
static int ELUTION_RANGE_MODE_POINT
           
static int ELUTION_RANGE_MODE_RANGE
           
protected  int elutionMode
           
protected  int elutionRangeMode
           
protected  int massDiffType
           
protected  boolean matchWithinChargeOnly
           
protected  float maxElutionDiff
           
protected  float maxMassDiff
           
protected  float minElutionDiff
           
protected  float minMassDiff
           
 
Constructor Summary
Window2DFeatureSetMatcher()
           
 
Method Summary
protected  float calcElutionDiff(Feature feature1, Feature feature2)
           
 java.util.List<Feature> findMatchingFeatures(Feature[] slaveFeatures, Feature masterFeature, java.util.Comparator<Feature> featureComparator)
          Find the single slave features that most closely match this Master feature
 int getElutionMode()
           
 int getElutionRangeMode()
           
 int getMassDiffType()
           
 float getMaxElutionDiff()
           
protected  double getMaxElutionRangeValue(Feature feature)
          switch on elutionMode to return the appropriate elution value for this feature
 float getMaxMassDiff()
           
 float getMinElutionDiff()
           
protected  double getMinElutionRangeValue(Feature feature)
          switch on elutionMode to return the appropriate elution value for this feature
 float getMinMassDiff()
           
protected  double getPointElutionValue(Feature feature)
          switch on elutionMode to return the appropriate elution value for this feature
 boolean isMatchWithinChargeOnly()
           
 FeatureSetMatcher.FeatureMatchingResult matchFeatures(FeatureSet masterFeatures, FeatureSet slaveFeatures)
          Match the features in ms2Features against ms1Features.
 void setElutionMode(int elutionMode)
           
 void setElutionRangeMode(int elutionRangeMode)
           
 void setMassDiffType(int massDiffType)
           
 void setMatchingParameters(float minMassDiff, float maxMassDiff, float minElutionDiff, float maxElutionDiff, int massDiffType)
          Convenience method to set a bunch of parameters at once
 void setMatchWithinChargeOnly(boolean matchWithinChargeOnly)
           
 void setMaxElutionDiff(float maxElutionDiff)
           
 void setMaxMassDiff(float maxMassDiff)
           
 void setMinElutionDiff(float minElutionDiff)
           
 void setMinMassDiff(float minMassDiff)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

minMassDiff

protected float minMassDiff

maxMassDiff

protected float maxMassDiff

minElutionDiff

protected float minElutionDiff

maxElutionDiff

protected float maxElutionDiff

massDiffType

protected int massDiffType

ELUTION_MODE_HYDROPHOBICITY

public static final int ELUTION_MODE_HYDROPHOBICITY
See Also:
Constant Field Values

ELUTION_MODE_TIME

public static final int ELUTION_MODE_TIME
See Also:
Constant Field Values

ELUTION_MODE_SCAN

public static final int ELUTION_MODE_SCAN
See Also:
Constant Field Values

DEFAULT_ELUTION_MODE

public static final int DEFAULT_ELUTION_MODE
See Also:
Constant Field Values

elutionMode

protected int elutionMode

ELUTION_RANGE_MODE_POINT

public static final int ELUTION_RANGE_MODE_POINT
See Also:
Constant Field Values

ELUTION_RANGE_MODE_RANGE

public static final int ELUTION_RANGE_MODE_RANGE
See Also:
Constant Field Values

elutionRangeMode

protected int elutionRangeMode

matchWithinChargeOnly

protected boolean matchWithinChargeOnly
Constructor Detail

Window2DFeatureSetMatcher

public Window2DFeatureSetMatcher()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setMatchingParameters

public void setMatchingParameters(float minMassDiff,
                                  float maxMassDiff,
                                  float minElutionDiff,
                                  float maxElutionDiff,
                                  int massDiffType)
Convenience method to set a bunch of parameters at once


matchFeatures

public FeatureSetMatcher.FeatureMatchingResult matchFeatures(FeatureSet masterFeatures,
                                                             FeatureSet slaveFeatures)
Match the features in ms2Features against ms1Features. Populate the passed-in unmatchedMS2Features ArrayList with all unmatched features. Can also be used to match ms1 features against other ms1 features

Returns:

findMatchingFeatures

public java.util.List<Feature> findMatchingFeatures(Feature[] slaveFeatures,
                                                    Feature masterFeature,
                                                    java.util.Comparator<Feature> featureComparator)
Find the single slave features that most closely match this Master feature

Returns:
the index of the nearest feature, or -1 if none found in the range

calcElutionDiff

protected float calcElutionDiff(Feature feature1,
                                Feature feature2)

getMinElutionRangeValue

protected double getMinElutionRangeValue(Feature feature)
switch on elutionMode to return the appropriate elution value for this feature

Parameters:
feature -
Returns:

getMaxElutionRangeValue

protected double getMaxElutionRangeValue(Feature feature)
switch on elutionMode to return the appropriate elution value for this feature

Parameters:
feature -
Returns:

getPointElutionValue

protected double getPointElutionValue(Feature feature)
switch on elutionMode to return the appropriate elution value for this feature

Parameters:
feature -
Returns:

getMinMassDiff

public float getMinMassDiff()

setMinMassDiff

public void setMinMassDiff(float minMassDiff)

getMaxMassDiff

public float getMaxMassDiff()

setMaxMassDiff

public void setMaxMassDiff(float maxMassDiff)

getMinElutionDiff

public float getMinElutionDiff()

setMinElutionDiff

public void setMinElutionDiff(float minElutionDiff)

getMaxElutionDiff

public float getMaxElutionDiff()

setMaxElutionDiff

public void setMaxElutionDiff(float maxElutionDiff)

getMassDiffType

public int getMassDiffType()

setMassDiffType

public void setMassDiffType(int massDiffType)

getElutionRangeMode

public int getElutionRangeMode()

setElutionRangeMode

public void setElutionRangeMode(int elutionRangeMode)

getElutionMode

public int getElutionMode()

setElutionMode

public void setElutionMode(int elutionMode)

isMatchWithinChargeOnly

public boolean isMatchWithinChargeOnly()

setMatchWithinChargeOnly

public void setMatchWithinChargeOnly(boolean matchWithinChargeOnly)


Fred Hutchinson Cancer Research Center