Class SearchParameters
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.parameters.identification.search.SearchParameters
- All Implemented Interfaces:
MarshallableParameter,Serializable
This class groups the parameters used for identification.
- Author:
- Marc Vaudel, Harald Barsnes
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumPossible mass accuracy types.Nested classes/interfaces inherited from interface com.compomics.util.experiment.io.parameters.MarshallableParameter
MarshallableParameter.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String[]Convenience array for forward ion type selection.static final String[]Convenience array for rewind ion type selection.static final intThe preferred maximal number of variable modifications.static final intThe preferred minimal number of protein sequences.final StringVersion number.Fields inherited from class com.compomics.util.experiment.personalization.ExperimentObject
NO_KEY -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.SearchParameters(SearchParameters searchParameters) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanequals(SearchParameters otherSearchParameters) Returns true if the search parameter objects have identical settings.Returns the algorithms for which specific parameters are stored.Returns the algorithm specific parameters in a map: algorithm as indexed in the Advocate class > parameters.Returns the digestion preferences.booleanReturn whether the flanking amino acids of a mapped peptide are to be reported.Returns the forward ions searched as list of integers as indexed in the PeptideFragmentIon class.Returns the fragment accuracy type.doubleReturns the MS2 ion m/z tolerance.doubleReturns the absolute fragment ion tolerance in Dalton.doublegetFragmentIonAccuracyInDaltons(double refMass) Returns the absolute fragment ion tolerance in Dalton.getIdentificationAlgorithmParameter(int algorithmID) Returns the algorithm specific parameters, null if not found.static SearchParametersgetIdentificationParameters(File searchParametersFile) Loads the identification parameters from a file.static String[]getIons()Getter for the list of ion symbols used.intReturns the maximal charge searched.intReturns the maximal isotopic correction.intReturns the minimal charge searched.intReturns the minimal isotopic correction.Returns the modification settings.doubleReturns the precursor tolerance.Returns the precursor accuracy type.doubleReturns the reference mass used to convert ppm to Da.Returns the rewind ions searched as list of integers as indexed in the PeptideFragmentIon class.Returns a short description of the parameters.getType()Returns the type of marshalled parameter from an unmarshalled object.Returns true if the current precursor accuracy type is ppm.static voidsaveIdentificationParameters(SearchParameters searchParameters, File searchParametersFile) Saves the identification parameters to a serialized file.voidSaves the identification parameters as a human readable text file.voidSet the advanced settings to the default values.voidsetDefaultAdvancedSettings(SearchParameters searchParameters) Set the advanced settings to the values in the given search parameters object or to the default values if the advanced settings are not set for a given advocate.voidsetDigestionParameters(DigestionParameters digestionParameters) Sets the digestion preferences.voidsetFlanking(boolean flanking) Set whether the flanking amino acids of a mapped peptide are to be reported.voidsetForwardIons(ArrayList<Integer> forwardIons) Sets the forward ions searched as list of integers as indexed in the PeptideFragmentIon class.voidsetFragmentAccuracyType(SearchParameters.MassAccuracyType fragmentAccuracyType) Sets the fragment accuracy type.voidsetFragmentIonAccuracy(double fragmentIonMZTolerance) Sets the fragment ion m/z tolerance.voidsetIdentificationAlgorithmParameter(int algorithmID, IdentificationAlgorithmParameter identificationAlgorithmParameter) Adds identification algorithm specific parameters.voidsetMaxChargeSearched(int maxChargeSearched) Sets the maximal charge searched.voidsetMaxIsotopicCorrection(int maxIsotopicCorrection) Sets the maximal isotopic correction.voidsetMinChargeSearched(int minChargeSearched) Sets the minimal charge searched.voidsetMinIsotopicCorrection(int minIsotopicCorrection) Sets the minimal isotopic correction.voidsetModificationParameters(ModificationParameters modificationParameters) Sets the modification settings.voidsetPrecursorAccuracy(double precursorTolerance) Sets the precursor tolerance.voidsetPrecursorAccuracyType(SearchParameters.MassAccuracyType precursorAccuracyType) Sets the precursor accuracy type.voidsetRefMass(double refMass) Sets the reference mass used to convert ppm to Da.voidsetRewindIons(ArrayList<Integer> rewindIons) Sets the rewind ions searched as list of integers as indexed in the PeptideFragmentIon class.voidsetType()Sets the parameters type.toString()toString(boolean html) Returns the search parameters as a string.Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
Field Details
-
version
Version number.- See Also:
-
implementedForwardIons
Convenience array for forward ion type selection. -
implementedRewindIons
Convenience array for rewind ion type selection. -
preferredMaxVariableModifications
public static final int preferredMaxVariableModificationsThe preferred maximal number of variable modifications.- See Also:
-
preferredMinSequences
public static final int preferredMinSequencesThe preferred minimal number of protein sequences.- See Also:
-
-
Constructor Details
-
SearchParameters
public SearchParameters()Constructor. -
SearchParameters
Constructor.- Parameters:
searchParameters- the search parameter to base the search parameters on.
-
-
Method Details
-
setDefaultAdvancedSettings
public void setDefaultAdvancedSettings()Set the advanced settings to the default values. -
setDefaultAdvancedSettings
Set the advanced settings to the values in the given search parameters object or to the default values if the advanced settings are not set for a given advocate.- Parameters:
searchParameters- the search parameter to extract the advanced settings from
-
getRefMass
public double getRefMass()Returns the reference mass used to convert ppm to Da.- Returns:
- the reference mass used to convert ppm to Da
-
setRefMass
public void setRefMass(double refMass) Sets the reference mass used to convert ppm to Da.- Parameters:
refMass- the reference mass used to convert ppm to Da
-
getModificationParameters
Returns the modification settings.- Returns:
- the modification settings
-
setModificationParameters
Sets the modification settings.- Parameters:
modificationParameters- the modification settings
-
getFragmentIonAccuracy
public double getFragmentIonAccuracy()Returns the MS2 ion m/z tolerance.- Returns:
- the MS2 ion m/z tolerance
-
getFragmentIonAccuracyInDaltons
public double getFragmentIonAccuracyInDaltons()Returns the absolute fragment ion tolerance in Dalton. If the tolerance is in ppm, the internal reference mass is used.- Returns:
- the absolute fragment ion tolerance in Dalton
-
getFragmentIonAccuracyInDaltons
public double getFragmentIonAccuracyInDaltons(double refMass) Returns the absolute fragment ion tolerance in Dalton. If the tolerance is in ppm, the given reference mass is used.- Parameters:
refMass- the reference mass to use for the conversion of tolerances in ppm.- Returns:
- the absolute fragment ion tolerance in Dalton
-
setFragmentIonAccuracy
public void setFragmentIonAccuracy(double fragmentIonMZTolerance) Sets the fragment ion m/z tolerance.- Parameters:
fragmentIonMZTolerance- the fragment ion m/z tolerance
-
getDigestionParameters
Returns the digestion preferences.- Returns:
- the digestion preferences
-
setDigestionParameters
Sets the digestion preferences.- Parameters:
digestionParameters- the digestion preferences
-
getForwardIons
Returns the forward ions searched as list of integers as indexed in the PeptideFragmentIon class.- Returns:
- the forward ions searched
-
setForwardIons
Sets the forward ions searched as list of integers as indexed in the PeptideFragmentIon class.- Parameters:
forwardIons- the forward ions searched
-
getRewindIons
Returns the rewind ions searched as list of integers as indexed in the PeptideFragmentIon class.- Returns:
- the rewind ions searched
-
setRewindIons
Sets the rewind ions searched as list of integers as indexed in the PeptideFragmentIon class.- Parameters:
rewindIons- the rewind ions searched
-
getIons
Getter for the list of ion symbols used.- Returns:
- the list of ion symbols used
-
getPrecursorAccuracy
public double getPrecursorAccuracy()Returns the precursor tolerance.- Returns:
- the precursor tolerance
-
setPrecursorAccuracy
public void setPrecursorAccuracy(double precursorTolerance) Sets the precursor tolerance.- Parameters:
precursorTolerance- the precursor tolerance
-
getPrecursorAccuracyType
Returns the precursor accuracy type.- Returns:
- the precursor accuracy type
-
setPrecursorAccuracyType
Sets the precursor accuracy type.- Parameters:
precursorAccuracyType- the precursor accuracy type
-
getFragmentAccuracyType
Returns the fragment accuracy type.- Returns:
- the fragment accuracy type
-
setFragmentAccuracyType
Sets the fragment accuracy type.- Parameters:
fragmentAccuracyType- the fragment accuracy type
-
isPrecursorAccuracyTypePpm
Returns true if the current precursor accuracy type is ppm.- Returns:
- true if the current precursor accuracy type is ppm
-
getMaxChargeSearched
public int getMaxChargeSearched()Returns the maximal charge searched.- Returns:
- the maximal charge searched
-
setMaxChargeSearched
public void setMaxChargeSearched(int maxChargeSearched) Sets the maximal charge searched.- Parameters:
maxChargeSearched- the maximal charge searched
-
getMinChargeSearched
public int getMinChargeSearched()Returns the minimal charge searched.- Returns:
- the minimal charge searched
-
setMinChargeSearched
public void setMinChargeSearched(int minChargeSearched) Sets the minimal charge searched.- Parameters:
minChargeSearched- the minimal charge searched
-
getAlgorithmSpecificParameters
Returns the algorithm specific parameters in a map: algorithm as indexed in the Advocate class > parameters. null if not set.- Returns:
- the algorithm specific parameters in a map
-
getIdentificationAlgorithmParameter
Returns the algorithm specific parameters, null if not found.- Parameters:
algorithmID- the index of the search engine as indexed in the Advocate class- Returns:
- the algorithm specific parameters
-
setIdentificationAlgorithmParameter
public void setIdentificationAlgorithmParameter(int algorithmID, IdentificationAlgorithmParameter identificationAlgorithmParameter) Adds identification algorithm specific parameters.- Parameters:
algorithmID- the algorithm id as indexed in the Advocate classidentificationAlgorithmParameter- the specific parameters
-
getAlgorithms
Returns the algorithms for which specific parameters are stored. Warning: this does not mean that the algorithm was actually used.- Returns:
- the algorithms for which specific parameters are stored in a set of indexes as listed in the Advocate class
-
getMinIsotopicCorrection
public int getMinIsotopicCorrection()Returns the minimal isotopic correction.- Returns:
- the minimal isotopic correction
-
setMinIsotopicCorrection
public void setMinIsotopicCorrection(int minIsotopicCorrection) Sets the minimal isotopic correction.- Parameters:
minIsotopicCorrection- the minimal isotopic correction
-
getMaxIsotopicCorrection
public int getMaxIsotopicCorrection()Returns the maximal isotopic correction.- Returns:
- the maximal isotopic correction
-
setMaxIsotopicCorrection
public void setMaxIsotopicCorrection(int maxIsotopicCorrection) Sets the maximal isotopic correction.- Parameters:
maxIsotopicCorrection- the maximal isotopic correction
-
getIdentificationParameters
public static SearchParameters getIdentificationParameters(File searchParametersFile) throws IOException, ClassNotFoundException Loads the identification parameters from a file. If the file is an identification parameters file, the search parameters are extracted.- Parameters:
searchParametersFile- the search parameter file- Returns:
- the search parameters
- Throws:
IOException- if an IOException occursClassNotFoundException- if a ClassNotFoundException occurs
-
saveIdentificationParameters
public static void saveIdentificationParameters(SearchParameters searchParameters, File searchParametersFile) throws IOException Saves the identification parameters to a serialized file.- Parameters:
searchParameters- the identification parameterssearchParametersFile- the file- Throws:
IOException- if an IOException occurs
-
saveIdentificationParametersAsTextFile
Saves the identification parameters as a human readable text file.- Parameters:
file- the file- Throws:
IOException- if an IOException occurs
-
toString
-
getShortDescription
Returns a short description of the parameters.- Returns:
- a short description of the parameters
-
toString
Returns the search parameters as a string.- Parameters:
html- use HTML formatting- Returns:
- the search parameters as a string
-
equals
Returns true if the search parameter objects have identical settings.- Parameters:
otherSearchParameters- the parameters to compare to- Returns:
- true if the search parameter objects have identical settings
-
setFlanking
public void setFlanking(boolean flanking) Set whether the flanking amino acids of a mapped peptide are to be reported.- Parameters:
flanking- whether the flanking amino acids of a mapped peptide are to be reported
-
getFlanking
public boolean getFlanking()Return whether the flanking amino acids of a mapped peptide are to be reported.- Returns:
- true if whether the flanking amino acids of a mapped peptide are to be reported
-
setType
public void setType()Description copied from interface:MarshallableParameterSets the parameters type. The type must be set before writing a file but not in the constructor.- Specified by:
setTypein interfaceMarshallableParameter
-
getType
Description copied from interface:MarshallableParameterReturns the type of marshalled parameter from an unmarshalled object. The type must be written in the file but not set in the constructor. Null if not a MarshallableParameter.- Specified by:
getTypein interfaceMarshallableParameter- Returns:
- the type of marshalled parameter from an unmarshalled object
-