Class IdentificationParameters
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.parameters.identification.IdentificationParameters
- All Implemented Interfaces:
MarshallableParameter
,Serializable
public class IdentificationParameters extends ExperimentObject implements MarshallableParameter
Generic class grouping the parameters used for protein identification.
- Author:
- Marc Vaudel, Harald Barsnes
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.compomics.util.experiment.io.parameters.MarshallableParameter
MarshallableParameter.Type
-
Field Summary
Fields Modifier and Type Field Description static String
CURRENT_VERSION
Currently supported version number.String
version
Version number. -
Constructor Summary
Constructors Constructor Description IdentificationParameters()
Creates empty identification parameters.IdentificationParameters(SearchParameters searchParameters)
Creates default identification parameters from the given search parameters.IdentificationParameters(String name, String description, SearchParameters searchParameters, AnnotationParameters annotationParameters, SequenceMatchingParameters sequenceMatchingParameters, PeptideVariantsParameters peptideVariantsParameters, GeneParameters geneParameters, PsmScoringParameters psmScoringParameters, PeptideAssumptionFilter peptideAssumptionFilter, ModificationLocalizationParameters ModificationLocalizationParameters, ProteinInferenceParameters proteinInferenceParameters, IdMatchValidationParameters idValidationParameters, FractionParameters fractionParameters, FastaParameters fastaParameters)
Constructor. -
Method Summary
Modifier and Type Method Description boolean
equals(IdentificationParameters otherIdentificationParameters)
Returns true if the identification parameter objects have identical settings.AnnotationParameters
getAnnotationParameters()
Returns the annotation parameters used for identification.static double
getDaTolerance(double ppmTolerance, double refMass)
Returns the absolute tolerance in Dalton corresponding to the relative tolerance in ppm at the given reference mass.boolean
getDefaultDescription()
Indicates whether the description is automatically generated.String
getDescription()
Returns the description of the parameters.FastaParameters
getFastaParameters()
Returns the FASTA processing parameters.FractionParameters
getFractionParameters()
Returns the fraction parameters.GeneParameters
getGeneParameters()
Returns the gene parameters.static IdentificationParameters
getIdentificationParameters(File identificationParametersFile)
Loads the identification parameters from a file.IdMatchValidationParameters
getIdValidationParameters()
Returns the identification matches validation parameters.ModificationLocalizationParameters
getModificationLocalizationParameters()
Returns the modification localization scoring parameters.String
getName()
Returns the name of the parameters.PeptideAssumptionFilter
getPeptideAssumptionFilter()
Returns the filter used when importing PSMs.PeptideVariantsParameters
getPeptideVariantsParameters()
Returns the peptide variant parameters.static double
getPpmTolerance(double daltonTolerance, double refMass)
Returns the relative tolerance in ppm corresponding to the absolute tolerance in Dalton at the given reference mass.ProteinInferenceParameters
getProteinInferenceParameters()
Returns the protein inference parameters.PsmScoringParameters
getPsmScoringParameters()
Returns the scoring parameters used when scoring PSMs.SearchParameters
getSearchParameters()
Returns the parameters used for the spectrum matching.SequenceMatchingParameters
getSequenceMatchingParameters()
Returns the sequence matching parameters.MarshallableParameter.Type
getType()
Returns the type of marshalled parameter from an unmarshalled object.static void
saveIdentificationParameters(IdentificationParameters identificationParameters, File identificationParametersFile)
Saves the identification parameters to a file.void
setAnnotationParameters(AnnotationParameters annotationParameters)
Sets the annotation parameters used for identification.void
setDescription(String description, boolean automaticallyGenerated)
Sets the description of the parameters.void
setFastaParameters(FastaParameters fastaParameters)
Sets the ASTA processing parameters.void
setFractionParameters(FractionParameters fractionParameters)
Sets the fraction parameters.void
setGeneParameters(GeneParameters geneParameters)
Sets the gene parameters.void
setIdValidationParameters(IdMatchValidationParameters idValidationParameters)
Sets the identification matches validation parameters.void
setModificationLocalizationParameters(ModificationLocalizationParameters modificationLocalizationParameters)
Sets the modification localization parameters.void
setName(String name)
Sets the name of the parameters.void
setParametersFromSearch(SearchParameters searchParameters)
Sets identification parameters based on given search parameters.void
setPeptideAssumptionFilter(PeptideAssumptionFilter peptideAssumptionFilter)
Sets the filter used when importing PSMs.void
setPeptideVariantsParameters(PeptideVariantsParameters peptideVariantsParameters)
Sets the peptide variant parameters.void
setProteinInferenceParameters(ProteinInferenceParameters proteinInferenceParameters)
Sets the protein inference parameters.void
setPsmScoringParameters(PsmScoringParameters psmScoringParameters)
Sets the scoring preferences used when scoring PSMs.void
setSearchParameters(SearchParameters searchParameters)
Sets the parameters used for the spectrum matching.void
setSequenceMatchingParameters(SequenceMatchingParameters sequenceMatchingParameters)
Sets the sequence matching preferences.void
setType()
Sets the parameters type.static boolean
supportedVersion(File identificationParametersFile)
Returns a boolean indicating whether the version of the parameters file is supported.Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
Field Details
-
CURRENT_VERSION
Currently supported version number.- See Also:
- Constant Field Values
-
version
Version number.- See Also:
- Constant Field Values
-
-
Constructor Details
-
IdentificationParameters
public IdentificationParameters()Creates empty identification parameters. -
IdentificationParameters
Creates default identification parameters from the given search parameters.- Parameters:
searchParameters
- the search parameters
-
IdentificationParameters
public IdentificationParameters(String name, String description, SearchParameters searchParameters, AnnotationParameters annotationParameters, SequenceMatchingParameters sequenceMatchingParameters, PeptideVariantsParameters peptideVariantsParameters, GeneParameters geneParameters, PsmScoringParameters psmScoringParameters, PeptideAssumptionFilter peptideAssumptionFilter, ModificationLocalizationParameters ModificationLocalizationParameters, ProteinInferenceParameters proteinInferenceParameters, IdMatchValidationParameters idValidationParameters, FractionParameters fractionParameters, FastaParameters fastaParameters)Constructor.- Parameters:
name
- the name of the parametersdescription
- the descriptionsearchParameters
- the search parametersannotationParameters
- the annotation parameterssequenceMatchingParameters
- the sequence matching parameterspeptideVariantsParameters
- the peptide variant parametersgeneParameters
- the gene parameterspsmScoringParameters
- the PSM scoring parameterspeptideAssumptionFilter
- the peptide assumption filtersModificationLocalizationParameters
- the PTM localization scoring parametersproteinInferenceParameters
- the protein inference parametersidValidationParameters
- the matches validation parametersfractionParameters
- the fraction parametersfastaParameters
- the FASTA parameters
-
-
Method Details
-
getSearchParameters
Returns the parameters used for the spectrum matching.- Returns:
- the parameters used for the spectrum matching
-
setSearchParameters
Sets the parameters used for the spectrum matching.- Parameters:
searchParameters
- the parameters used for the spectrum matching
-
getPpmTolerance
public static double getPpmTolerance(double daltonTolerance, double refMass)Returns the relative tolerance in ppm corresponding to the absolute tolerance in Dalton at the given reference mass.- Parameters:
daltonTolerance
- the absolute tolerance in DaltonrefMass
- the reference mass in Dalton- Returns:
- the relative tolerance in ppm
-
getDaTolerance
public static double getDaTolerance(double ppmTolerance, double refMass)Returns the absolute tolerance in Dalton corresponding to the relative tolerance in ppm at the given reference mass.- Parameters:
ppmTolerance
- the absolute tolerance in ppmrefMass
- the reference mass in Dalton- Returns:
- the relative tolerance in ppm
-
getAnnotationParameters
Returns the annotation parameters used for identification.- Returns:
- the annotation parameters used for identification
-
setAnnotationParameters
Sets the annotation parameters used for identification.- Parameters:
annotationParameters
- the annotation parameters used for identification
-
getPeptideAssumptionFilter
Returns the filter used when importing PSMs.- Returns:
- the filter used when importing PSMs
-
setPeptideAssumptionFilter
Sets the filter used when importing PSMs.- Parameters:
peptideAssumptionFilter
- the filter used when importing PSMs
-
getPsmScoringParameters
Returns the scoring parameters used when scoring PSMs.- Returns:
- the scoring parameters used when scoring PSMs
-
setPsmScoringParameters
Sets the scoring preferences used when scoring PSMs.- Parameters:
psmScoringParameters
- the scoring preferences used when scoring PSMs
-
getModificationLocalizationParameters
Returns the modification localization scoring parameters.- Returns:
- the modification localization scoring parameters
-
setModificationLocalizationParameters
public void setModificationLocalizationParameters(ModificationLocalizationParameters modificationLocalizationParameters)Sets the modification localization parameters.- Parameters:
modificationLocalizationParameters
- the modification localization parameters
-
getSequenceMatchingParameters
Returns the sequence matching parameters.- Returns:
- the sequence matching parameters
-
setSequenceMatchingParameters
Sets the sequence matching preferences.- Parameters:
sequenceMatchingParameters
- the sequence matching preferences
-
getPeptideVariantsParameters
Returns the peptide variant parameters.- Returns:
- the peptide variant parameters
-
setPeptideVariantsParameters
Sets the peptide variant parameters.- Parameters:
peptideVariantsParameters
- the peptide variant parameters
-
getIdValidationParameters
Returns the identification matches validation parameters.- Returns:
- the identification matches validation parameters
-
setIdValidationParameters
Sets the identification matches validation parameters.- Parameters:
idValidationParameters
- the identification matches validation parameters
-
getProteinInferenceParameters
Returns the protein inference parameters.- Returns:
- the protein inference parameters
-
setProteinInferenceParameters
Sets the protein inference parameters.- Parameters:
proteinInferenceParameters
- the protein inference parameters
-
getGeneParameters
Returns the gene parameters.- Returns:
- the gene parameters
-
setGeneParameters
Sets the gene parameters.- Parameters:
geneParameters
- the gene parameters
-
getFractionParameters
Returns the fraction parameters.- Returns:
- the fraction parameters
-
setFractionParameters
Sets the fraction parameters.- Parameters:
fractionParameters
- the fraction parameters
-
getFastaParameters
Returns the FASTA processing parameters.- Returns:
- the FASTA processing parameters
-
setFastaParameters
Sets the ASTA processing parameters.- Parameters:
fastaParameters
- the FASTA processing parameters
-
getIdentificationParameters
public static IdentificationParameters getIdentificationParameters(File identificationParametersFile) throws IOExceptionLoads the identification parameters from a file. If the given file is a search parameters file, default identification parameters are inferred.- Parameters:
identificationParametersFile
- the file- Returns:
- the parameters
- Throws:
IOException
- if an error occurs while reading the file
-
supportedVersion
Returns a boolean indicating whether the version of the parameters file is supported.- Parameters:
identificationParametersFile
- the parameters file- Returns:
- a boolean indicating whether the version of the parameters file is supported
- Throws:
IOException
- if an error occurs while reading the file
-
saveIdentificationParameters
public static void saveIdentificationParameters(IdentificationParameters identificationParameters, File identificationParametersFile) throws IOExceptionSaves the identification parameters to a file.- Parameters:
identificationParameters
- the identification parametersidentificationParametersFile
- the file- Throws:
IOException
- if an error occurred while writing the file
-
getName
Returns the name of the parameters.- Returns:
- the name of the parameters
-
setName
Sets the name of the parameters.- Parameters:
name
- the name of the parameters
-
getDescription
Returns the description of the parameters.- Returns:
- the description of the parameters
-
getDefaultDescription
public boolean getDefaultDescription()Indicates whether the description is automatically generated.- Returns:
- a boolean indicating whether the description is automatically generated
-
setDescription
Sets the description of the parameters.- Parameters:
description
- the description of the parametersautomaticallyGenerated
- boolean indicating whether the description is automatically generated
-
setParametersFromSearch
Sets identification parameters based on given search parameters.- Parameters:
searchParameters
- the parameters used for the search
-
setType
public void setType()Description copied from interface:MarshallableParameter
Sets the parameters type. The type must be set before writing a file but not in the constructor.- Specified by:
setType
in interfaceMarshallableParameter
-
getType
Description copied from interface:MarshallableParameter
Returns 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:
getType
in interfaceMarshallableParameter
- Returns:
- the type of marshalled parameter from an unmarshalled object
-
equals
Returns true if the identification parameter objects have identical settings.- Parameters:
otherIdentificationParameters
- the parameters to compare to- Returns:
- true if the identification parameter objects have identical settings
-