|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.fhcrc.cpl.viewer.amt.AmtMatchProbabilityAssigner
public class AmtMatchProbabilityAssigner
This class assigns a probability to every AMT match, based on the distribution of target and decoy mass and H errors. First, all matches (including multiple matches to the same feature) are mined for their mass and H error values. Those values are fed to an Expectation-Maximization algorithm, implemented in R, which estimates parameters for a mixed distribution. We assume the true distribution to be a uniform distribution of false matches mixed with a bivariate normal distribution of true matches. We also feed the EM algorithm an initial estimate of the proportion of matches in the bivariate normal distribution, which is based on a match to a decoy database. The EM algorithm returns distribution parameters, as well as a probability for each match indicating how likely it is that the match is in the bivariate normal distribution of true matches. Lots of charts are provided in order to let the user judge the success of the algorithm in modeling the distribution.
| Field Summary | |
|---|---|
protected boolean |
converged
|
protected java.util.List<java.lang.Double> |
decoyAreas
|
protected java.util.List<java.lang.Integer> |
decoyWindowFeatureNumbers
|
static float |
DEFAULT_EM_MAX_DELTA_P_FOR_STABLE
|
static int |
DEFAULT_EM_MAX_ITERATIONS_STABLE_FOR_CONVERGENCE
|
static int |
DEFAULT_MAX_EM_ITERATIONS
|
static float |
DEFAULT_MAX_SECONDBEST_PROBABILITY
|
static int |
DEFAULT_MIN_EM_ITERATIONS
|
static float |
DEFAULT_MIN_MATCH_PROBABILITY
|
static float |
DEFAULT_MIN_SECONDBEST_PROBABILITY_DIFFERENCE
|
protected float |
expectedTrue
|
protected float |
initialProportionTrue
|
protected boolean |
keepStatistics
|
static float |
KS_CUTOFF_FOR_WARN
|
protected float |
ks_score_x
|
protected float |
ks_score_y
|
static int |
MAX_R_PROB_ASSIGNMENT_MILLIS
|
static int |
MAX_TREE_DEPTH
|
protected float |
maxDeltaElution
|
protected float |
maxDeltaMass
|
protected int |
maxEMIterations
|
protected int |
maxRProbAssignmentMillis
|
protected float |
maxSecondBestProbability
|
protected static float |
maxXScaff
|
protected static float |
maxYScaff
|
protected float |
meanProbability
|
protected float |
minDeltaElution
|
protected float |
minDeltaMass
|
protected int |
minEMIterations
|
protected float |
minMatchProbability
|
protected float |
minSecondBestProbabilityDifference
|
protected static float |
minXScaff
|
protected static float |
minYScaff
|
protected float |
mu_x
|
protected float |
mu_y
|
static int |
NUM_DECOY_POINTS
|
protected int |
num_iterations
|
static int |
NUM_TARGET_POINTS
|
protected float |
proportion
|
protected float |
quantileBetaX
|
protected float |
quantileBetaY
|
protected float |
quantileCorrX
|
protected float |
quantileCorrY
|
static int |
SCALING_FACTOR
|
protected float |
sigma_x
|
protected float |
sigma_y
|
protected java.util.List<java.lang.Double> |
targetAreas
|
protected java.util.List<java.lang.Integer> |
targetWindowFeatureNumbers
|
protected float |
totalElutionRange
|
protected float |
totalMassRange
|
| Constructor Summary | |
|---|---|
AmtMatchProbabilityAssigner(float minDeltaMass,
float maxDeltaMass,
float minDeltaElution,
float maxDeltaElution,
float minMatchProbability)
Set the loose matching parameters. |
|
| Method Summary | |
|---|---|
java.util.List<Feature> |
assignMatchesAndProbabilities(FeatureSetMatcher.FeatureMatchingResult targetMatchingResult,
FeatureSetMatcher.FeatureMatchingResult decoyMatchingResult,
boolean showCharts)
Use the initial (loose-tolerance) matching data, to both the target and decoy databases, to determine a probability for each loose match. |
protected double |
calculateLocalNormalizedDensity(double xpos,
double ypos,
double expectedNumTrue,
double binSizeX,
double binSizeY)
Use the normal CDF to calculate the density of a small area of the distribution |
float[] |
calculateProbabilitiesEM(java.util.List<java.lang.Float> targetMassErrorDataList,
java.util.List<java.lang.Float> targetHErrorDataList,
float proportionTrue,
boolean showCharts)
Use the Expectation Maximization algorithm to determine match probabilities by modeling the true hits as a normal distribution, and the false hits as a uniform distribution, superimposed in the target distribution. |
float |
getExpectedTrue()
|
float |
getInitialProportionTrue()
|
float |
getKsScoreX()
|
float |
getKsScoreY()
|
int |
getMaxEMIterations()
|
int |
getMaxRProbAssignmentMillis()
|
float |
getMaxSecondBestProbability()
|
int |
getMinEMIterations()
|
float |
getMinSecondBestProbabilityDifference()
|
float |
getMuX()
|
float |
getMuY()
|
int |
getNumIterations()
|
float |
getQuantileBetaX()
|
float |
getQuantileBetaY()
|
float |
getQuantileCorrX()
|
float |
getQuantileCorrY()
|
float |
getSigmaX()
|
float |
getSigmaY()
|
boolean |
isConverged()
|
protected boolean |
isInScaffRange(double x,
double y)
|
void |
setInitialProportionTrue(float initialProportionTrue)
|
void |
setMaxEMIterations(int maxEMIterations)
|
void |
setMaxRProbAssignmentMillis(int maxRProbAssignmentMillis)
|
void |
setMaxSecondBestProbability(float maxSecondBestProbability)
|
void |
setMinEMIterations(int minEMIterations)
|
void |
setMinSecondBestProbabilityDifference(float minSecondBestProbabilityDifference)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static float minXScaff
protected static float maxXScaff
protected static float minYScaff
protected static float maxYScaff
public static final int MAX_R_PROB_ASSIGNMENT_MILLIS
protected int maxRProbAssignmentMillis
protected float minDeltaMass
protected float maxDeltaMass
protected float minDeltaElution
protected float maxDeltaElution
protected float totalMassRange
protected float totalElutionRange
public static final int DEFAULT_MIN_EM_ITERATIONS
public static final int DEFAULT_MAX_EM_ITERATIONS
public static final float DEFAULT_EM_MAX_DELTA_P_FOR_STABLE
public static final int DEFAULT_EM_MAX_ITERATIONS_STABLE_FOR_CONVERGENCE
protected int minEMIterations
protected int maxEMIterations
protected float minMatchProbability
public static final float KS_CUTOFF_FOR_WARN
public static final float DEFAULT_MIN_MATCH_PROBABILITY
protected float maxSecondBestProbability
protected float minSecondBestProbabilityDifference
public static final int MAX_TREE_DEPTH
public static final int SCALING_FACTOR
public static final int NUM_TARGET_POINTS
public static final int NUM_DECOY_POINTS
public static final float DEFAULT_MAX_SECONDBEST_PROBABILITY
public static final float DEFAULT_MIN_SECONDBEST_PROBABILITY_DIFFERENCE
protected boolean keepStatistics
protected java.util.List<java.lang.Double> targetAreas
protected java.util.List<java.lang.Double> decoyAreas
protected java.util.List<java.lang.Integer> targetWindowFeatureNumbers
protected java.util.List<java.lang.Integer> decoyWindowFeatureNumbers
protected float initialProportionTrue
protected float meanProbability
protected float expectedTrue
protected float ks_score_x
protected float ks_score_y
protected float quantileCorrX
protected float quantileCorrY
protected float quantileBetaX
protected float quantileBetaY
protected float mu_x
protected float mu_y
protected float sigma_x
protected float sigma_y
protected int num_iterations
protected boolean converged
protected float proportion
| Constructor Detail |
|---|
public AmtMatchProbabilityAssigner(float minDeltaMass,
float maxDeltaMass,
float minDeltaElution,
float maxDeltaElution,
float minMatchProbability)
minDeltaMass - maxDeltaMass - minDeltaElution - maxDeltaElution - minMatchProbability - | Method Detail |
|---|
protected boolean isInScaffRange(double x,
double y)
public java.util.List<Feature> assignMatchesAndProbabilities(FeatureSetMatcher.FeatureMatchingResult targetMatchingResult,
FeatureSetMatcher.FeatureMatchingResult decoyMatchingResult,
boolean showCharts)
throws java.io.IOException
targetMatchingResult - decoyMatchingResult - showCharts -
java.io.IOException
public float[] calculateProbabilitiesEM(java.util.List<java.lang.Float> targetMassErrorDataList,
java.util.List<java.lang.Float> targetHErrorDataList,
float proportionTrue,
boolean showCharts)
throws java.io.IOException
targetMassErrorDataList - targetHErrorDataList - proportionTrue - showCharts -
java.io.IOException
protected double calculateLocalNormalizedDensity(double xpos,
double ypos,
double expectedNumTrue,
double binSizeX,
double binSizeY)
xpos - ypos - expectedNumTrue - binSizeX - binSizeY -
public float getInitialProportionTrue()
public void setInitialProportionTrue(float initialProportionTrue)
public float getExpectedTrue()
public float getKsScoreX()
public float getKsScoreY()
public float getQuantileCorrX()
public float getQuantileCorrY()
public float getQuantileBetaX()
public float getQuantileBetaY()
public int getMaxRProbAssignmentMillis()
public void setMaxRProbAssignmentMillis(int maxRProbAssignmentMillis)
public float getMuX()
public float getMuY()
public float getSigmaX()
public float getSigmaY()
public int getNumIterations()
public float getMaxSecondBestProbability()
public void setMaxSecondBestProbability(float maxSecondBestProbability)
public float getMinSecondBestProbabilityDifference()
public void setMinSecondBestProbabilityDifference(float minSecondBestProbabilityDifference)
public int getMaxEMIterations()
public void setMaxEMIterations(int maxEMIterations)
public int getMinEMIterations()
public void setMinEMIterations(int minEMIterations)
public boolean isConverged()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||