public class SearchParameters extends Object implements Serializable, MarshallableParameter
Modifier and Type | Class and Description |
---|---|
static class |
SearchParameters.MassAccuracyType
Possible mass accuracy types.
|
MarshallableParameter.Type
Modifier and Type | Field and Description |
---|---|
static String[] |
implementedForwardIons
Convenience array for forward ion type selection.
|
static String[] |
implementedRewindIons
Convenience array for rewind ion type selection.
|
Constructor and Description |
---|
SearchParameters()
Constructor.
|
SearchParameters(SearchParameters searchParameters)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(SearchParameters otherSearchParameters)
Returns true if the search parameter objects have identical settings.
|
Set<Integer> |
getAlgorithms()
Returns the algorithms for which specific parameters are stored.
|
HashMap<Integer,IdentificationAlgorithmParameter> |
getAlgorithmSpecificParameters()
Returns the algorithm specific parameters in a map: algorithm as indexed
in the Advocate class > parameters.
|
DigestionPreferences |
getDigestionPreferences()
Returns the digestion preferences.
|
Enzyme |
getEnzyme()
Deprecated.
use the PTM Digestion preferences instead.
|
File |
getFastaFile()
Returns the sequence database file used for identification.
|
ArrayList<Integer> |
getForwardIons()
Returns the forward ions searched as list of integers as indexed in the
FragmentIon class.
|
SearchParameters.MassAccuracyType |
getFragmentAccuracyType()
Returns the fragment accuracy type.
|
Double |
getFragmentIonAccuracy()
Returns the MS2 ion m/z tolerance.
|
Double |
getFragmentIonAccuracyInDaltons()
Returns the absolute fragment ion tolerance in Dalton.
|
Double |
getFragmentIonAccuracyInDaltons(Double refMass)
Returns the absolute fragment ion tolerance in Dalton.
|
IdentificationAlgorithmParameter |
getIdentificationAlgorithmParameter(int algorithmID)
Returns the algorithm specific parameters, null if not found.
|
static SearchParameters |
getIdentificationParameters(File searchParametersFile)
Loads the identification parameters from a file.
|
static String[] |
getIons()
Getter for the list of ion symbols used.
|
Charge |
getMaxChargeSearched()
Returns the maximal charge searched.
|
Integer |
getMaxIsotopicCorrection()
Returns the maximal isotopic correction.
|
Charge |
getMinChargeSearched()
Returns the minimal charge searched.
|
Integer |
getMinIsotopicCorrection()
Returns the minimal isotopic correction.
|
Integer |
getnMissedCleavages()
Deprecated.
use the Digestion preferences instead.
|
Double |
getPrecursorAccuracy()
Returns the precursor tolerance.
|
Double |
getPrecursorAccuracyDalton()
Returns the precursor tolerance in Dalton (for de novo searches).
|
SearchParameters.MassAccuracyType |
getPrecursorAccuracyType()
Returns the precursor accuracy type.
|
PtmSettings |
getPtmSettings()
Returns the PTM settings.
|
Double |
getRefMass()
Returns the reference mass used to convert ppm to Da.
|
ArrayList<Integer> |
getRewindIons()
Returns the rewind ions searched as list of integers as indexed in the
FragmentIon class.
|
String |
getShortDescription()
Returns a short description of the parameters.
|
MarshallableParameter.Type |
getType()
Returns the type of marshalled parameter from an unmarshalled object.
|
Boolean |
isPrecursorAccuracyTypePpm()
Returns true if the current precursor accuracy type is ppm.
|
static void |
saveIdentificationParameters(SearchParameters searchParameters,
File searchParametersFile)
Saves the identification parameters to a serialized file.
|
void |
saveIdentificationParametersAsTextFile(File file)
Saves the identification parameters as a human readable text file.
|
void |
setDefaultAdvancedSettings()
Set the advanced settings to the default values.
|
void |
setDefaultAdvancedSettings(SearchParameters searchParameters)
Set the advanced settings to the values in the given search parameters
object or to the default values of the advanced settings are not set for
a given advocate.
|
void |
setDigestionPreferences(DigestionPreferences digestionPreferences)
Sets the digestion preferences.
|
void |
setFastaFile(File fastaFile)
Sets the sequence database file used for identification.
|
void |
setForwardIons(ArrayList<Integer> forwardIons)
Sets the forward ions searched as list of integers as indexed in the
FragmentIon class.
|
void |
setFragmentAccuracyType(SearchParameters.MassAccuracyType fragmentAccuracyType)
Sets the fragment accuracy type.
|
void |
setFragmentIonAccuracy(Double fragmentIonMZTolerance)
Sets the fragment ion m/z tolerance.
|
void |
setIdentificationAlgorithmParameter(int algorithmID,
IdentificationAlgorithmParameter identificationAlgorithmParameter)
Adds identification algorithm specific parameters.
|
void |
setMaxChargeSearched(Charge maxChargeSearched)
Sets the maximal charge searched.
|
void |
setMaxIsotopicCorrection(Integer maxIsotopicCorrection)
Sets the maximal isotopic correction.
|
void |
setMinChargeSearched(Charge minChargeSearched)
Sets the minimal charge searched.
|
void |
setMinIsotopicCorrection(Integer minIsotopicCorrection)
Sets the minimal isotopic correction.
|
void |
setPrecursorAccuracy(Double precursorTolerance)
Sets the precursor tolerance.
|
void |
setPrecursorAccuracyDalton(Double precursorToleranceDalton)
Sets the precursor tolerance in Dalton (for de novo searches).
|
void |
setPrecursorAccuracyType(SearchParameters.MassAccuracyType precursorAccuracyType)
Sets the precursor accuracy type.
|
void |
setPtmSettings(PtmSettings ptmSettings)
Sets the PTM settings.
|
void |
setRefMass(Double refMass)
Sets the reference mass used to convert ppm to Da.
|
void |
setRewindIons(ArrayList<Integer> rewindIons)
Sets the rewind ions searched as list of integers as indexed in the
FragmentIon class.
|
void |
setType()
Sets the parameters type.
|
String |
toString() |
String |
toString(boolean html)
Returns the search parameters as a string.
|
public static final String[] implementedForwardIons
public static final String[] implementedRewindIons
public SearchParameters()
public SearchParameters(SearchParameters searchParameters)
searchParameters
- the search parameter to base the search
parameters on.public void setDefaultAdvancedSettings()
public void setDefaultAdvancedSettings(SearchParameters searchParameters)
searchParameters
- the search parameter to extract the advanced
settings frompublic Double getRefMass()
public void setRefMass(Double refMass)
refMass
- the reference mass used to convert ppm to Dapublic PtmSettings getPtmSettings()
public void setPtmSettings(PtmSettings ptmSettings)
ptmSettings
- the PTM settingspublic Double getFragmentIonAccuracy()
public Double getFragmentIonAccuracyInDaltons()
public Double getFragmentIonAccuracyInDaltons(Double refMass)
refMass
- the reference mass to use for the conversion of tolerances
in ppm.public void setFragmentIonAccuracy(Double fragmentIonMZTolerance)
fragmentIonMZTolerance
- the fragment ion m/z tolerancepublic Enzyme getEnzyme()
public DigestionPreferences getDigestionPreferences()
public void setDigestionPreferences(DigestionPreferences digestionPreferences)
digestionPreferences
- the digestion preferencespublic File getFastaFile()
public void setFastaFile(File fastaFile)
fastaFile
- the sequence database file used for identificationpublic Integer getnMissedCleavages()
public ArrayList<Integer> getForwardIons()
public void setForwardIons(ArrayList<Integer> forwardIons)
forwardIons
- the forward ions searchedpublic ArrayList<Integer> getRewindIons()
public void setRewindIons(ArrayList<Integer> rewindIons)
rewindIons
- the rewind ions searchedpublic static String[] getIons()
public Double getPrecursorAccuracy()
public void setPrecursorAccuracy(Double precursorTolerance)
precursorTolerance
- the precursor tolerancepublic Double getPrecursorAccuracyDalton()
public void setPrecursorAccuracyDalton(Double precursorToleranceDalton)
precursorToleranceDalton
- the precursor tolerancepublic SearchParameters.MassAccuracyType getPrecursorAccuracyType()
public void setPrecursorAccuracyType(SearchParameters.MassAccuracyType precursorAccuracyType)
precursorAccuracyType
- the precursor accuracy typepublic SearchParameters.MassAccuracyType getFragmentAccuracyType()
public void setFragmentAccuracyType(SearchParameters.MassAccuracyType fragmentAccuracyType)
fragmentAccuracyType
- the fragment accuracy typepublic Boolean isPrecursorAccuracyTypePpm()
public Charge getMaxChargeSearched()
public void setMaxChargeSearched(Charge maxChargeSearched)
maxChargeSearched
- the maximal charge searchedpublic Charge getMinChargeSearched()
public void setMinChargeSearched(Charge minChargeSearched)
minChargeSearched
- the minimal charge searchedpublic HashMap<Integer,IdentificationAlgorithmParameter> getAlgorithmSpecificParameters()
public IdentificationAlgorithmParameter getIdentificationAlgorithmParameter(int algorithmID)
algorithmID
- the index of the search engine as indexed in the
Advocate classpublic void setIdentificationAlgorithmParameter(int algorithmID, IdentificationAlgorithmParameter identificationAlgorithmParameter)
algorithmID
- the algorithm id as indexed in the Advocate classidentificationAlgorithmParameter
- the specific parameterspublic Set<Integer> getAlgorithms()
public Integer getMinIsotopicCorrection()
public void setMinIsotopicCorrection(Integer minIsotopicCorrection)
minIsotopicCorrection
- the minimal isotopic correctionpublic Integer getMaxIsotopicCorrection()
public void setMaxIsotopicCorrection(Integer maxIsotopicCorrection)
maxIsotopicCorrection
- the maximal isotopic correctionpublic static SearchParameters getIdentificationParameters(File searchParametersFile) throws IOException, ClassNotFoundException
searchParametersFile
- the search parameter fileIOException
- if an IOException occursClassNotFoundException
- if a ClassNotFoundException occurspublic static void saveIdentificationParameters(SearchParameters searchParameters, File searchParametersFile) throws IOException
searchParameters
- the identification parameterssearchParametersFile
- the fileIOException
- if an IOException occurspublic void saveIdentificationParametersAsTextFile(File file) throws IOException
file
- the fileIOException
- if an IOException occurspublic String getShortDescription()
public String toString(boolean html)
html
- use HTML formattingpublic boolean equals(SearchParameters otherSearchParameters)
otherSearchParameters
- the parameters to compare topublic void setType()
MarshallableParameter
setType
in interface MarshallableParameter
public MarshallableParameter.Type getType()
MarshallableParameter
getType
in interface MarshallableParameter
Copyright © 2018. All rights reserved.