|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.fhcrc.cpl.viewer.amt.AmtDatabaseMatcher
public class AmtDatabaseMatcher
This class performs simple matching between an AMT database and a feature files. It constructs a probability model for the matches based on mass and NRT deviation.
| Nested Class Summary | |
|---|---|
static class |
AmtDatabaseMatcher.PeptideProphetComparatorDesc
|
| Constructor Summary | |
|---|---|
AmtDatabaseMatcher()
|
|
| Method Summary | |
|---|---|
AmtDatabase |
buildAmtDatabaseForGeographicRestriction(AmtDatabase amtDB,
FeatureSet ms2FeatureSetToMatch,
int maxEntries,
int minRunMassMatchPercent,
int maxRuns,
boolean showCharts)
This method removes runs from an AMT database based on distance in fraction space from the run we're matching to. |
AmtDatabase |
buildAmtDatabaseForPeptideMatches(AmtDatabase amtDB,
FeatureSet ms2FeatureSetToMatch,
int maxEntries,
int minRunMassMatchPercent,
int maxRuns,
boolean showCharts,
Feature[] ms1Features,
MS2Modification[] ms2ModificationsForMatching)
This is for paring down an AMT database by removing runs without many peptides in common with the MS2 features provided. |
void |
calculateFeatureHydrophobicities(Feature[] ms1Features,
Feature[] alignmentGuideFeatures,
FeatureSet amtDatabaseFeatureSet,
int degree)
Outermost method for calculating feature hydrophobicities. |
double[] |
calculateMassCalibrationParameters(FeatureSetMatcher.FeatureMatchingResult matchingResult,
boolean showCharts)
Calculate linear mass calibration parameters by doing robust linear regression of mass error in the matches vs. |
double[] |
calculateTHMapCoefficientsWithMassMatching(FeatureSet amtDatabaseFeatureSet,
Feature[] ms1Features,
int degree)
Cover method |
double[] |
calculateTHMapCoefficientsWithMassMatching(FeatureSet amtDatabaseFeatureSet,
Feature[] features,
int degree,
boolean onlyUseSamePeptideMatches)
Use mass-only matching to calculate a time-hydrophobicity map. |
double[] |
calculateTHMapCoefficientsWithMatchedFeatures(Pair<Feature,Feature>[] matchedFeatures,
int degree)
Given pairs of matched features, map RT to H |
double[] |
calibrateMS1FeaturesWithMatches(Feature[] ms1Features,
FeatureSetMatcher.FeatureMatchingResult matchingResult,
boolean showCharts)
Calibrate MS1 features based on an initial match to the AMT database. |
FeatureSetMatcher.FeatureMatchingResult |
callWindowMatcher(FeatureSet ms1FeatureSet,
FeatureSet amtFeatureSet,
float lowMassTolerance,
float highMassTolerance,
float lowHTolerance,
float highHTolerance)
Calls Window2DFeatureSetMatcher to do a dead-simple 2D match between two featuresets |
void |
createMassTimeErrorPlots(FeatureSetMatcher.FeatureMatchingResult matchingResult)
Separating this out so the interesting code flows better |
static java.util.Set<java.lang.String> |
createPeptideSetFromFeatures(Feature[] features)
Utility method |
void |
defineAMTDBStructure(Fractionation2DUtilities.FractionatedAMTDatabaseStructure amtDatabaseStructure)
Define the "dimensions" of the AMT database. |
Fractionation2DUtilities.FractionatedAMTDatabaseStructure |
getAMTDBStructure()
|
double |
getAmtFeatureMassAdjustment()
|
org.jfree.chart.JFreeChart |
getMassCalibrationChart()
|
float |
getMassMatchDeltaMass()
|
int |
getMassMatchDeltaMassType()
|
org.jfree.chart.JFreeChart |
getMassMatchScatterplot()
|
int |
getMaxEMIterations()
|
double |
getMaxRegressionLeverageNumerator()
|
double |
getMaxRegressionStudentizedResidual()
|
float |
getMaxSecondBestProbability()
|
int |
getMinEMIterations()
|
float |
getMinMatchProbabilityToKeep()
|
float |
getMinSecondBestProbabilityDifference()
|
float |
getMs1Ms2MassTolerancePPM()
|
float |
getMs1Ms2TimeToleranceSeconds()
|
int |
getNonlinearMappingPolynomialDegree()
|
AmtMatchProbabilityAssigner |
getProbabilityAssigner()
|
int |
getQuantileRegressionMinFeatures()
|
float |
getRealMatchDeltaElution()
|
float |
getRealMatchDeltaMass()
|
int |
getRealMatchDeltaMassType()
|
org.jfree.chart.JFreeChart |
getTimeHydrophobicityMappingChart()
|
boolean |
isDecoyMatch()
|
boolean |
isUseMs1TimesForAlignment()
|
java.util.List<Feature> |
matchAgainstMs1(AmtDatabase amtDatabaseThisMatch,
Feature[] amtDBFeaturesThisMatch,
FeatureSet ms1FeatureSetToMatch,
FeatureSet embeddedMs2FeatureSet,
float minEmbeddedMs2PeptideProphet,
MS2Modification[] ms2ModificationsArray,
java.io.File matchingOutputFile,
boolean removeFractions,
int minRunsToKeep,
int maxRunsToKeep,
boolean calibrateMassesUsingMatches,
boolean showCharts)
Match an AMT database against a single MS1 feature file. |
Pair<Feature,Feature>[] |
matchOnMassOnly(FeatureSet amtDatabaseFeatureSet,
Feature[] ms1Features,
float massMatchDeltaMass,
int massMatchDeltaMassType)
Perform a mass-only match between MS1 features and AMT database. |
void |
matchWithFDRCalc(AmtDatabase amtDatabaseThisMatch,
Feature[] amtDBFeaturesThisMatch,
FeatureSet ms1FeatureSetToMatch,
FeatureSet embeddedMs2FeatureSet,
float minEmbeddedMs2PeptideProphet,
MS2Modification[] ms2ModificationsArray,
java.io.File matchingOutputFile,
boolean removeFractions,
int minRunsToKeep,
int maxRunsToKeep,
boolean calibrateMassesUsingMatches,
boolean showCharts)
|
java.util.Map<Feature,java.lang.Float> |
matchWithPortionDecoy(AmtDatabase amtDatabaseThisMatch,
Feature[] amtDBFeaturesThisMatch,
FeatureSet ms1FeatureSetToMatch,
FeatureSet embeddedMs2FeatureSet,
float minEmbeddedMs2PeptideProphet,
MS2Modification[] ms2ModificationsArray,
java.io.File matchingOutputFile,
boolean removeFractions,
int minRunsToKeep,
int maxRunsToKeep,
boolean calibrateMassesUsingMatches,
boolean showCharts,
java.util.Set<java.lang.String> decoyPeptides,
float targetDecoyRatio)
Change the masses of a random portion (portionDecoy) of the AMT database entries to make them decoy entries, perform the match, and report on the specificity of the match |
AmtDatabase |
reduceDatabaseByRunSimilarity(AmtDatabase amtDatabase,
Feature[] ms2Features,
FeatureSetMatcher.FeatureMatchingResult matchingResult,
int minRunsToKeep,
int maxRunsToKeep,
boolean showCharts)
Remove peptide entries from the AMT database that don't occur in runs that are similar, in peptide content, to ms2Features. |
static void |
representPeptidesWithMedianTimePerPeptidePerMod(FeatureSet featureSet)
For each peptide, per modification state, remove all but one observation. |
void |
setAmtFeatureMassAdjustment(double amtFeatureMassAdjustment)
|
void |
setBuildCharts(boolean buildCharts)
|
void |
setDecoyMatch(boolean decoyMatch)
|
void |
setMassMatchDeltaMass(float massMatchDeltaMass)
|
void |
setMassMatchDeltaMassType(int massMatchDeltaMassType)
|
void |
setMaxEMIterations(int maxEMIterations)
|
void |
setMaxRegressionLeverageNumerator(double leverageNumeratorModalRegression)
|
void |
setMaxRegressionStudentizedResidual(double maxRegressionStudRes)
|
void |
setMaxSecondBestProbability(float maxSecondBestProbability)
|
void |
setMinEMIterations(int minEMIterations)
|
void |
setMinMatchProbabilityToKeep(float minMatchProbabilityToKeep)
|
void |
setMinSecondBestProbabilityDifference(float minSecondBestProbabilityDifference)
|
void |
setMs1Ms2MassTolerancePPM(float ms1Ms2MassTolerancePPM)
|
void |
setMs1Ms2TimeToleranceSeconds(float ms1Ms2TimeToleranceSeconds)
|
void |
setNonlinearMappingPolynomialDegree(int nonlinearMappingPolynomialDegree)
|
void |
setProbabilityAssigner(AmtMatchProbabilityAssigner probabilityAssigner)
|
void |
setQuantileRegressionMinFeatures(int quantileRegressionMinFeatures)
|
void |
setRealMatchDeltaElution(float realMatchDeltaElution)
|
void |
setRealMatchDeltaMass(float realMatchDeltaMass)
|
void |
setRealMatchDeltaMassType(int realMatchDeltaMassType)
|
void |
setUseMs1TimesForAlignment(boolean useMs1TimesForAlignment)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final double DEFAULT_LEVERAGE_NUMERATOR
public static final double DEFAULT_MAX_LEVERAGE_NUMERATOR
public static final double DEFAULT_MAX_STUDENTIZED_RESIDUAL
public static final float DEFAULT_MASS_MATCH_DELTA_MASS
public static final int DEFAULT_MASS_MATCH_DELTA_MASS_TYPE
public static final float DEFAULT_2D_MATCH_DELTA_MASS
public static final int DEFAULT_2D_MATCH_DELTA_MASS_TYPE
public static final float DEFAULT_2D_MATCH_DELTA_ELUTION
public static final int MIN_MATCHED_FEATURES_FOR_REGRESSION
public static final int DEFAULT_QUANTILE_REG_MIN_FEATURES
protected int quantileRegressionMinFeatures
public static final int DEFAULT_NONLINEAR_MAPPING_DEGREE
protected int nonlinearMappingPolynomialDegree
public static final float DEFAULT_SIGNIFICANT_HYDRO_DIFFERENCE
protected float massMatchDeltaMass
protected int massMatchDeltaMassType
protected float realMatchDeltaMass
protected int realMatchDeltaMassType
protected float realMatchDeltaElution
protected int minEMIterations
protected int maxEMIterations
public static final boolean DEFAULT_USE_MS1_TIMES_FOR_ALIGNMENT
protected boolean useMs1TimesForAlignment
protected float ms1Ms2MassTolerancePPM
protected float ms1Ms2TimeToleranceSeconds
protected boolean doDecoyMatch
protected double maxRegressionLeverageNumerator
protected double maxRegressionStudRes
protected float minMatchProbabilityToKeep
protected float maxSecondBestProbability
protected float minSecondBestProbabilityDifference
public static final int DEFAULT_DECOY_DB_MASS_ADJUSTMENT_DA
public double[] timeHydMapCoefficients
protected boolean buildCharts
public FeatureSetMatcher.FeatureMatchingResult featureMatchingResult
protected org.jfree.chart.JFreeChart massMatchScatterplot
protected org.jfree.chart.JFreeChart timeHydrophobicityMappingChart
protected org.jfree.chart.JFreeChart massCalibrationChart
protected PanelWithRPerspectivePlot massTimeErrorPerspectivePlot
public org.jfree.chart.JFreeChart massDeltaMassScatterPlot
protected double amtFeatureMassAdjustment
protected boolean amtDBDimensionsDefined
protected Fractionation2DUtilities.FractionatedAMTDatabaseStructure amtDatabaseStructure
protected AmtMatchProbabilityAssigner probabilityAssigner
| Constructor Detail |
|---|
public AmtDatabaseMatcher()
| Method Detail |
|---|
public void matchWithFDRCalc(AmtDatabase amtDatabaseThisMatch,
Feature[] amtDBFeaturesThisMatch,
FeatureSet ms1FeatureSetToMatch,
FeatureSet embeddedMs2FeatureSet,
float minEmbeddedMs2PeptideProphet,
MS2Modification[] ms2ModificationsArray,
java.io.File matchingOutputFile,
boolean removeFractions,
int minRunsToKeep,
int maxRunsToKeep,
boolean calibrateMassesUsingMatches,
boolean showCharts)
throws java.io.IOException
java.io.IOException
public java.util.Map<Feature,java.lang.Float> matchWithPortionDecoy(AmtDatabase amtDatabaseThisMatch,
Feature[] amtDBFeaturesThisMatch,
FeatureSet ms1FeatureSetToMatch,
FeatureSet embeddedMs2FeatureSet,
float minEmbeddedMs2PeptideProphet,
MS2Modification[] ms2ModificationsArray,
java.io.File matchingOutputFile,
boolean removeFractions,
int minRunsToKeep,
int maxRunsToKeep,
boolean calibrateMassesUsingMatches,
boolean showCharts,
java.util.Set<java.lang.String> decoyPeptides,
float targetDecoyRatio)
throws java.io.IOException
amtDatabaseThisMatch - amtDBFeaturesThisMatch - ms1FeatureSetToMatch - embeddedMs2FeatureSet - minEmbeddedMs2PeptideProphet - ms2ModificationsArray - matchingOutputFile - removeFractions - minRunsToKeep - maxRunsToKeep - calibrateMassesUsingMatches - showCharts - decoyPeptides -
java.io.IOExceptionpublic static void representPeptidesWithMedianTimePerPeptidePerMod(FeatureSet featureSet)
featureSet -
public java.util.List<Feature> matchAgainstMs1(AmtDatabase amtDatabaseThisMatch,
Feature[] amtDBFeaturesThisMatch,
FeatureSet ms1FeatureSetToMatch,
FeatureSet embeddedMs2FeatureSet,
float minEmbeddedMs2PeptideProphet,
MS2Modification[] ms2ModificationsArray,
java.io.File matchingOutputFile,
boolean removeFractions,
int minRunsToKeep,
int maxRunsToKeep,
boolean calibrateMassesUsingMatches,
boolean showCharts)
throws java.io.IOException
java.io.IOException
public Pair<Feature,Feature>[] matchOnMassOnly(FeatureSet amtDatabaseFeatureSet,
Feature[] ms1Features,
float massMatchDeltaMass,
int massMatchDeltaMassType)
amtDatabaseFeatureSet - ms1Features - massMatchDeltaMass - massMatchDeltaMassType -
public double[] calculateTHMapCoefficientsWithMassMatching(FeatureSet amtDatabaseFeatureSet,
Feature[] ms1Features,
int degree)
amtDatabaseFeatureSet - ms1Features - degree -
public double[] calculateTHMapCoefficientsWithMassMatching(FeatureSet amtDatabaseFeatureSet,
Feature[] features,
int degree,
boolean onlyUseSamePeptideMatches)
amtDatabaseFeatureSet - features - degree -
public double[] calculateTHMapCoefficientsWithMatchedFeatures(Pair<Feature,Feature>[] matchedFeatures,
int degree)
matchedFeatures - degree -
public void calculateFeatureHydrophobicities(Feature[] ms1Features,
Feature[] alignmentGuideFeatures,
FeatureSet amtDatabaseFeatureSet,
int degree)
ms1Features - alignmentGuideFeatures - amtDatabaseFeatureSet - degree -
public FeatureSetMatcher.FeatureMatchingResult callWindowMatcher(FeatureSet ms1FeatureSet,
FeatureSet amtFeatureSet,
float lowMassTolerance,
float highMassTolerance,
float lowHTolerance,
float highHTolerance)
ms1FeatureSet - amtFeatureSet - lowMassTolerance - highMassTolerance - lowHTolerance - highHTolerance -
public double[] calibrateMS1FeaturesWithMatches(Feature[] ms1Features,
FeatureSetMatcher.FeatureMatchingResult matchingResult,
boolean showCharts)
ms1Features - matchingResult - showCharts -
public double[] calculateMassCalibrationParameters(FeatureSetMatcher.FeatureMatchingResult matchingResult,
boolean showCharts)
matchingResult - showCharts -
public void createMassTimeErrorPlots(FeatureSetMatcher.FeatureMatchingResult matchingResult)
matchingResult - public static java.util.Set<java.lang.String> createPeptideSetFromFeatures(Feature[] features)
features -
public AmtDatabase reduceDatabaseByRunSimilarity(AmtDatabase amtDatabase,
Feature[] ms2Features,
FeatureSetMatcher.FeatureMatchingResult matchingResult,
int minRunsToKeep,
int maxRunsToKeep,
boolean showCharts)
amtDatabase - ms2Features - matchingResult - showCharts -
public float getMassMatchDeltaMass()
public void setMassMatchDeltaMass(float massMatchDeltaMass)
public int getMassMatchDeltaMassType()
public void setMassMatchDeltaMassType(int massMatchDeltaMassType)
public float getRealMatchDeltaMass()
public void setRealMatchDeltaMass(float realMatchDeltaMass)
public int getRealMatchDeltaMassType()
public void setRealMatchDeltaMassType(int realMatchDeltaMassType)
public float getRealMatchDeltaElution()
public void setRealMatchDeltaElution(float realMatchDeltaElution)
public void setBuildCharts(boolean buildCharts)
public org.jfree.chart.JFreeChart getMassMatchScatterplot()
public org.jfree.chart.JFreeChart getTimeHydrophobicityMappingChart()
public double getMaxRegressionLeverageNumerator()
public void setMaxRegressionLeverageNumerator(double leverageNumeratorModalRegression)
public double getMaxRegressionStudentizedResidual()
public void setMaxRegressionStudentizedResidual(double maxRegressionStudRes)
public double getAmtFeatureMassAdjustment()
public void setAmtFeatureMassAdjustment(double amtFeatureMassAdjustment)
public int getQuantileRegressionMinFeatures()
public void setQuantileRegressionMinFeatures(int quantileRegressionMinFeatures)
public org.jfree.chart.JFreeChart getMassCalibrationChart()
public void defineAMTDBStructure(Fractionation2DUtilities.FractionatedAMTDatabaseStructure amtDatabaseStructure)
amtDatabaseStructure - public Fractionation2DUtilities.FractionatedAMTDatabaseStructure getAMTDBStructure()
public AmtDatabase buildAmtDatabaseForPeptideMatches(AmtDatabase amtDB,
FeatureSet ms2FeatureSetToMatch,
int maxEntries,
int minRunMassMatchPercent,
int maxRuns,
boolean showCharts,
Feature[] ms1Features,
MS2Modification[] ms2ModificationsForMatching)
amtDB - ms2FeatureSetToMatch - maxEntries - minRunMassMatchPercent - maxRuns - showCharts - ms1Features - ms2ModificationsForMatching -
public AmtDatabase buildAmtDatabaseForGeographicRestriction(AmtDatabase amtDB,
FeatureSet ms2FeatureSetToMatch,
int maxEntries,
int minRunMassMatchPercent,
int maxRuns,
boolean showCharts)
amtDB - ms2FeatureSetToMatch - maxEntries - minRunMassMatchPercent - maxRuns - showCharts -
public float getMinMatchProbabilityToKeep()
public void setMinMatchProbabilityToKeep(float minMatchProbabilityToKeep)
public AmtMatchProbabilityAssigner getProbabilityAssigner()
public void setProbabilityAssigner(AmtMatchProbabilityAssigner probabilityAssigner)
public boolean isDecoyMatch()
public void setDecoyMatch(boolean decoyMatch)
public int getMinEMIterations()
public void setMinEMIterations(int minEMIterations)
public int getMaxEMIterations()
public void setMaxEMIterations(int maxEMIterations)
public float getMinSecondBestProbabilityDifference()
public void setMinSecondBestProbabilityDifference(float minSecondBestProbabilityDifference)
public float getMaxSecondBestProbability()
public void setMaxSecondBestProbability(float maxSecondBestProbability)
public boolean isUseMs1TimesForAlignment()
public void setUseMs1TimesForAlignment(boolean useMs1TimesForAlignment)
public float getMs1Ms2MassTolerancePPM()
public void setMs1Ms2MassTolerancePPM(float ms1Ms2MassTolerancePPM)
public float getMs1Ms2TimeToleranceSeconds()
public void setMs1Ms2TimeToleranceSeconds(float ms1Ms2TimeToleranceSeconds)
public int getNonlinearMappingPolynomialDegree()
public void setNonlinearMappingPolynomialDegree(int nonlinearMappingPolynomialDegree)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||