org.fhcrc.cpl.viewer.amt
Class ClusteringFeatureSetMatcher

java.lang.Object
  extended by org.fhcrc.cpl.viewer.amt.BaseAmtFeatureSetMatcherImpl
      extended by org.fhcrc.cpl.viewer.amt.ClusteringFeatureSetMatcher
All Implemented Interfaces:
AmtFeatureSetMatcher

public class ClusteringFeatureSetMatcher
extends BaseAmtFeatureSetMatcherImpl
implements AmtFeatureSetMatcher

Attempts to match one feature set against another


Nested Class Summary
 
Nested classes/interfaces inherited from class org.fhcrc.cpl.viewer.amt.BaseAmtFeatureSetMatcherImpl
BaseAmtFeatureSetMatcherImpl.FeatureElutionClosenessToBaseFeatureComparatorDesc
 
Nested classes/interfaces inherited from interface org.fhcrc.cpl.viewer.amt.AmtFeatureSetMatcher
AmtFeatureSetMatcher.FeatureMatchingResult
 
Field Summary
protected static double ABSOLUTE_MASS_BUCKET_INCREMENT
           
protected  double bestElutionBucketSize
           
protected  double bestMassBucketSize
           
static double DEFAULT_HYDRO_ELUTION_BUCKET_INCREMENT
           
protected  double elutionBucketIncrement
           
protected  double massBucketIncrement
           
protected  int numElutionBuckets
           
protected  int numMassBuckets
           
protected static double PPM_MASS_BUCKET_INCREMENT
           
protected  boolean useMassInsteadOfMz
           
 
Fields inherited from class org.fhcrc.cpl.viewer.amt.BaseAmtFeatureSetMatcherImpl
DEFAULT_ELUTION_MODE, deltaElution, deltaMass, deltaMassType, ELUTION_MODE_HYDROPHOBICITY, ELUTION_MODE_SCAN, ELUTION_MODE_TIME, elutionMode, ORDER_BY_ELUTION_CLOSENESS_TO_MASTER_MODE, ORDER_BY_FEATURE_QUALITY_MODE, slaveSetOrderingMode
 
Fields inherited from interface org.fhcrc.cpl.viewer.amt.AmtFeatureSetMatcher
DEFAULT_DELTA_HYDROPHOBICITY, DEFAULT_DELTA_MASS_ABSOLUTE, DEFAULT_DELTA_MASS_PPM, DEFAULT_DELTA_MASS_TYPE, DEFAULT_DELTA_SCAN, DEFAULT_DELTA_TIME, DELTA_MASS_TYPE_ABSOLUTE, DELTA_MASS_TYPE_PPM
 
Constructor Summary
ClusteringFeatureSetMatcher()
           
ClusteringFeatureSetMatcher(float deltaMass, int deltaMassType, float deltaElution)
           
 
Method Summary
protected  double[] calculateBuckets(int numBuckets, double bucketIncrement, double maxBucketSize)
          Calculate the buckets to use for either mass or hydro clustering
 double getBestElutionBucketSize()
           
 double getBestMassBucketSize()
           
 double getElutionBucketIncrement()
           
protected  java.util.List<Feature> getFeatureListForClusterableList(java.util.List<Clusterer2D.Clusterable> clusterableList)
          Convert a list of Clusterables, assumed to be FeatureMassHydroClusterables, to a list of Features
 double getMassBucketIncrement()
           
 int getNumElutionBuckets()
           
 int getNumMassBuckets()
           
 void init(float deltaMass, int deltaMassType, float deltaElution)
          Set the parameters that are common to all FeatureSetMatchers
 AmtFeatureSetMatcher.FeatureMatchingResult matchFeatures(FeatureSet featureSet1, FeatureSet featureSet2)
          Match two feature sets using clustering
protected  Feature pickClosestByMass(Feature baseFeature, java.util.List<Feature> featuresToMatch)
          Pick the closest feature to a given feature by mass, from a list.
 void setBestElutionBucketSize(double bestElutionBucketSize)
           
 void setBestMassBucketSize(double bestMassBucketSize)
           
 void setElutionBucketIncrement(double elutionBucketIncrement)
           
 void setMassBucketIncrement(double massBucketIncrement)
           
 void setNumElutionBuckets(int numElutionBuckets)
           
 void setNumMassBuckets(int numMassBuckets)
           
 void setUseMassInsteadOfMz(boolean value)
           
 java.lang.String toString()
           
 
Methods inherited from class org.fhcrc.cpl.viewer.amt.BaseAmtFeatureSetMatcherImpl
getDeltaElution, getDeltaMass, getDeltaMassType, getElutionMode, getElutionValue, getSlaveSetOrderingMode, orderSlaveSetFeatures, setDeltaElution, setDeltaMass, setDeltaMassType, setElutionMode, setSlaveSetOrderingMode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_HYDRO_ELUTION_BUCKET_INCREMENT

public static final double DEFAULT_HYDRO_ELUTION_BUCKET_INCREMENT
See Also:
Constant Field Values

ABSOLUTE_MASS_BUCKET_INCREMENT

protected static final double ABSOLUTE_MASS_BUCKET_INCREMENT
See Also:
Constant Field Values

PPM_MASS_BUCKET_INCREMENT

protected static final double PPM_MASS_BUCKET_INCREMENT
See Also:
Constant Field Values

massBucketIncrement

protected double massBucketIncrement

elutionBucketIncrement

protected double elutionBucketIncrement

numMassBuckets

protected int numMassBuckets

numElutionBuckets

protected int numElutionBuckets

bestMassBucketSize

protected double bestMassBucketSize

bestElutionBucketSize

protected double bestElutionBucketSize

useMassInsteadOfMz

protected boolean useMassInsteadOfMz
Constructor Detail

ClusteringFeatureSetMatcher

public ClusteringFeatureSetMatcher()

ClusteringFeatureSetMatcher

public ClusteringFeatureSetMatcher(float deltaMass,
                                   int deltaMassType,
                                   float deltaElution)
Method Detail

init

public void init(float deltaMass,
                 int deltaMassType,
                 float deltaElution)
Description copied from class: BaseAmtFeatureSetMatcherImpl
Set the parameters that are common to all FeatureSetMatchers

Specified by:
init in interface AmtFeatureSetMatcher
Overrides:
init in class BaseAmtFeatureSetMatcherImpl

toString

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

calculateBuckets

protected double[] calculateBuckets(int numBuckets,
                                    double bucketIncrement,
                                    double maxBucketSize)
Calculate the buckets to use for either mass or hydro clustering

Parameters:
numBuckets -
bucketIncrement -
maxBucketSize -
Returns:

matchFeatures

public AmtFeatureSetMatcher.FeatureMatchingResult matchFeatures(FeatureSet featureSet1,
                                                                FeatureSet featureSet2)
Match two feature sets using clustering

Specified by:
matchFeatures in interface AmtFeatureSetMatcher
Parameters:
featureSet1 -
featureSet2 -
Returns:

getFeatureListForClusterableList

protected java.util.List<Feature> getFeatureListForClusterableList(java.util.List<Clusterer2D.Clusterable> clusterableList)
Convert a list of Clusterables, assumed to be FeatureMassHydroClusterables, to a list of Features

Parameters:
clusterableList -
Returns:

pickClosestByMass

protected Feature pickClosestByMass(Feature baseFeature,
                                    java.util.List<Feature> featuresToMatch)
Pick the closest feature to a given feature by mass, from a list.

Parameters:
baseFeature -
featuresToMatch -
Returns:

getBestMassBucketSize

public double getBestMassBucketSize()

setBestMassBucketSize

public void setBestMassBucketSize(double bestMassBucketSize)

getBestElutionBucketSize

public double getBestElutionBucketSize()

setBestElutionBucketSize

public void setBestElutionBucketSize(double bestElutionBucketSize)

getNumMassBuckets

public int getNumMassBuckets()

setNumMassBuckets

public void setNumMassBuckets(int numMassBuckets)

getNumElutionBuckets

public int getNumElutionBuckets()

setNumElutionBuckets

public void setNumElutionBuckets(int numElutionBuckets)

getMassBucketIncrement

public double getMassBucketIncrement()

setMassBucketIncrement

public void setMassBucketIncrement(double massBucketIncrement)

getElutionBucketIncrement

public double getElutionBucketIncrement()

setElutionBucketIncrement

public void setElutionBucketIncrement(double elutionBucketIncrement)

setUseMassInsteadOfMz

public void setUseMassInsteadOfMz(boolean value)


Fred Hutchinson Cancer Research Center