|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.fhcrc.cpl.viewer.amt.AmtDatabaseBuilder
public class AmtDatabaseBuilder
Builds AMT databases, in various ways If you want to build an AMT database in some other way, put a method in here to do it your way.
| Field Summary | |
|---|---|
static boolean |
DEFAULT_IGNORE_UNKNOWN_MODIFICATIONS
|
static double |
DEFAULT_MAX_LEVERAGE_NUMERATOR
|
static double |
DEFAULT_MAX_STUDENTIZED_RESIDUAL_FOR_INCLUSION
|
static double |
DEFAULT_MAX_STUDENTIZED_RESIDUAL_FOR_REGRESSION
|
static int |
DEFAULT_MIN_OBSERVATIONS_FOR_ALIGNMENT_REGRESSION
|
static int |
DEFAULT_MIN_PEPTIDES_FOR_ALIGNMENT_REGRESSION
|
static float |
DEFAULT_MS1_MS2_MASS_TOLERANCE_PPM
|
static float |
DEFAULT_MS1_MS2_TIME_TOLERANCE_SECONDS
|
protected boolean |
ignoreUnknownModifications
|
protected float |
ms1Ms2MassTolerancePPM
|
protected float |
ms1Ms2TimeToleranceSeconds
|
| Constructor Summary | |
|---|---|
AmtDatabaseBuilder()
|
|
| Method Summary | |
|---|---|
void |
addRunToAmtDatabase(AmtDatabase amtDatabase,
FeatureSet newRunFeatureSet,
FeatureSet ms1FeatureSet,
int scanOrTimeMode,
boolean robustRegression,
double maxStudentizedResidualForRegression,
double maxStudentizedResidualForInclusion,
double minDBObservationsForAlignmentMatch,
double maxHDiffForAlignmentMatch,
int minMatchedPeptidesForAlignment)
workinprogress Add a run to an AMT database. |
static FeatureSet |
buildFeatureSet(AmtDatabase amtDB,
MSRun run,
FeatureSet regressionMS2FeatureSet,
int chargeForAllFeatures,
double minPeptideProphet,
boolean robustRegression)
Create a feature set based on this AMT database, mapped to a particular run. |
static double[] |
calculateStudentizedResiduals(Feature[] allFeatures,
int scanOrTimeMode)
Calculate "studentized residuals" for each feature. |
static Feature[] |
chooseFeaturesWithMaxStudentizedResidual(Feature[] allFeatures,
double[] studentizedResiduals,
double maxStudentizedResidual)
Given an array of features, choose just the ones with residual <= of maxStudentizedResidual. |
protected static java.util.Map<java.lang.String,java.lang.Integer> |
countSpectraForPeptides(Feature[] features)
Count the spectra with each peptide identification. |
AmtDatabase |
createAmtDatabaseForRun(FeatureSet ms2FeatureSet,
FeatureSet ms1FeatureSet,
int scanOrTimeMode,
boolean robustRegression,
Pair<java.lang.Integer,java.lang.Integer> outNumFeaturesChosen,
double maxStudentizedResidualForRegression,
double maxStudentizedResidualForInclusion)
Create an AMT database for a single run, doing those arcane things we do to cast out the unworthy features. |
static AmtDatabase |
createAmtDatabaseForRun(FeatureSet featureSet,
int scanOrTimeMode,
double[] timeToHCoefficients,
boolean calculateHydrophobicities,
java.util.Map<java.lang.String,java.lang.Integer> spectralCountsMap,
boolean ignoreUnknownModifications)
calculate observed hydrophobicity for all features and add them all as observations to a new database. |
AmtDatabase |
createAmtDBFromAllPepXml(java.io.File allPepXmlFile,
java.io.File ms1Dir,
int scanOrTimeMode,
FeatureSet.FeatureSelector featureSelector,
boolean robustRegression,
double maxStudentizedResidualForRegression,
double maxStudentizedResidualForInclusion)
Create an AMT database from an all.pep.xml file -- pass null to the workhorse method so that it knows we need to look in the file from a reference to the mzXML file |
AmtDatabase |
createAmtDBFromDirectories(java.io.File pepXmlDir,
java.io.File ms1Dir,
java.io.File mzXmlDir,
int scanOrTimeMode,
FeatureSet.FeatureSelector featureSelector,
boolean robustRegression,
double maxStudentizedResidualForRegression,
double maxStudentizedResidualForInclusion,
boolean align)
Given a directory full of pepXml files and a directory full of the corresponding mzXML files, create an AMT database from all the pepXml files, using the mzXML files to grab retention times. |
AmtDatabase |
createAmtDBFromPepXml(java.io.File allPepXmlFile,
java.io.File ms1Dir,
MSRun run,
int scanOrTimeMode,
FeatureSet.FeatureSelector featureSelector,
boolean robustRegression,
double maxStudentizedResidualForRegression,
double maxStudentizedResidualForInclusion)
Create an AMT database from a pep.xml file. |
static MS2Modification[] |
createDefaultNTerminalModifications()
Create the default N-Terminal modifications that are used by X!Tandem. |
float |
getMs1Ms2MassTolerancePPM()
|
float |
getMs1Ms2TimeToleranceSeconds()
|
boolean |
isIgnoreUnknownModifications()
|
protected void |
keepOnlySinglyMatchedMS1Features(FeatureSet ms2FeatureSet,
FeatureSet ms1FeatureSet)
|
protected static java.util.Map<java.lang.String,java.lang.Double> |
performInitialRegression(Feature[] allFeatures,
int scanOrTimeMode)
|
void |
setIgnoreUnknownModifications(boolean ignoreUnknownModifications)
|
void |
setMs1Ms2MassTolerancePPM(float ms1Ms2MassTolerancePPM)
|
void |
setMs1Ms2TimeToleranceSeconds(float ms1Ms2TimeToleranceSeconds)
|
| 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_MAX_STUDENTIZED_RESIDUAL_FOR_REGRESSION
public static final double DEFAULT_MAX_STUDENTIZED_RESIDUAL_FOR_INCLUSION
public static final int DEFAULT_MIN_PEPTIDES_FOR_ALIGNMENT_REGRESSION
public static final int DEFAULT_MIN_OBSERVATIONS_FOR_ALIGNMENT_REGRESSION
public static final double DEFAULT_MAX_LEVERAGE_NUMERATOR
public static final float DEFAULT_MS1_MS2_MASS_TOLERANCE_PPM
public static final float DEFAULT_MS1_MS2_TIME_TOLERANCE_SECONDS
protected float ms1Ms2MassTolerancePPM
protected float ms1Ms2TimeToleranceSeconds
public static final boolean DEFAULT_IGNORE_UNKNOWN_MODIFICATIONS
protected boolean ignoreUnknownModifications
| Constructor Detail |
|---|
public AmtDatabaseBuilder()
| Method Detail |
|---|
public static MS2Modification[] createDefaultNTerminalModifications()
public static AmtDatabase createAmtDatabaseForRun(FeatureSet featureSet,
int scanOrTimeMode,
double[] timeToHCoefficients,
boolean calculateHydrophobicities,
java.util.Map<java.lang.String,java.lang.Integer> spectralCountsMap,
boolean ignoreUnknownModifications)
scanOrTimeMode -
protected static java.util.Map<java.lang.String,java.lang.Double> performInitialRegression(Feature[] allFeatures,
int scanOrTimeMode)
public static double[] calculateStudentizedResiduals(Feature[] allFeatures,
int scanOrTimeMode)
allFeatures - the residual squared must be in order to be dropped from the set
public static Feature[] chooseFeaturesWithMaxStudentizedResidual(Feature[] allFeatures,
double[] studentizedResiduals,
double maxStudentizedResidual)
allFeatures - studentizedResiduals - maxStudentizedResidual -
protected static java.util.Map<java.lang.String,java.lang.Integer> countSpectraForPeptides(Feature[] features)
features -
public AmtDatabase createAmtDatabaseForRun(FeatureSet ms2FeatureSet,
FeatureSet ms1FeatureSet,
int scanOrTimeMode,
boolean robustRegression,
Pair<java.lang.Integer,java.lang.Integer> outNumFeaturesChosen,
double maxStudentizedResidualForRegression,
double maxStudentizedResidualForInclusion)
ms2FeatureSet - ms1FeatureSet - scanOrTimeMode - robustRegression - outNumFeaturesChosen - maxStudentizedResidualForRegression - maxStudentizedResidualForInclusion -
public AmtDatabase createAmtDBFromDirectories(java.io.File pepXmlDir,
java.io.File ms1Dir,
java.io.File mzXmlDir,
int scanOrTimeMode,
FeatureSet.FeatureSelector featureSelector,
boolean robustRegression,
double maxStudentizedResidualForRegression,
double maxStudentizedResidualForInclusion,
boolean align)
throws java.lang.Exception
pepXmlDir - mzXmlDir - scanOrTimeMode -
java.lang.Exception
protected void keepOnlySinglyMatchedMS1Features(FeatureSet ms2FeatureSet,
FeatureSet ms1FeatureSet)
ms2FeatureSet - ms1FeatureSet -
public void addRunToAmtDatabase(AmtDatabase amtDatabase,
FeatureSet newRunFeatureSet,
FeatureSet ms1FeatureSet,
int scanOrTimeMode,
boolean robustRegression,
double maxStudentizedResidualForRegression,
double maxStudentizedResidualForInclusion,
double minDBObservationsForAlignmentMatch,
double maxHDiffForAlignmentMatch,
int minMatchedPeptidesForAlignment)
amtDatabase - newRunFeatureSet - scanOrTimeMode - robustRegression - maxStudentizedResidualForRegression - maxStudentizedResidualForInclusion - maxHDiffForAlignmentMatch - minMatchedPeptidesForAlignment -
public AmtDatabase createAmtDBFromAllPepXml(java.io.File allPepXmlFile,
java.io.File ms1Dir,
int scanOrTimeMode,
FeatureSet.FeatureSelector featureSelector,
boolean robustRegression,
double maxStudentizedResidualForRegression,
double maxStudentizedResidualForInclusion)
throws java.lang.Exception
allPepXmlFile - scanOrTimeMode - featureSelector - robustRegression -
java.lang.Exception
public AmtDatabase createAmtDBFromPepXml(java.io.File allPepXmlFile,
java.io.File ms1Dir,
MSRun run,
int scanOrTimeMode,
FeatureSet.FeatureSelector featureSelector,
boolean robustRegression,
double maxStudentizedResidualForRegression,
double maxStudentizedResidualForInclusion)
throws java.lang.Exception
allPepXmlFile - scanOrTimeMode -
java.lang.Exception
public static FeatureSet buildFeatureSet(AmtDatabase amtDB,
MSRun run,
FeatureSet regressionMS2FeatureSet,
int chargeForAllFeatures,
double minPeptideProphet,
boolean robustRegression)
run - regressionMS2FeatureSet -
public float getMs1Ms2MassTolerancePPM()
public void setMs1Ms2MassTolerancePPM(float ms1Ms2MassTolerancePPM)
public float getMs1Ms2TimeToleranceSeconds()
public void setMs1Ms2TimeToleranceSeconds(float ms1Ms2TimeToleranceSeconds)
public boolean isIgnoreUnknownModifications()
public void setIgnoreUnknownModifications(boolean ignoreUnknownModifications)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||