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
  • Field Details

  • Constructor Details

  • Method Details

    • getSearchParameters

      public SearchParameters getSearchParameters()
      Returns the parameters used for the spectrum matching.
      Returns:
      the parameters used for the spectrum matching
    • setSearchParameters

      public void setSearchParameters​(SearchParameters searchParameters)
      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 Dalton
      refMass - 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 ppm
      refMass - the reference mass in Dalton
      Returns:
      the relative tolerance in ppm
    • getAnnotationParameters

      public AnnotationParameters getAnnotationParameters()
      Returns the annotation parameters used for identification.
      Returns:
      the annotation parameters used for identification
    • setAnnotationParameters

      public void setAnnotationParameters​(AnnotationParameters annotationParameters)
      Sets the annotation parameters used for identification.
      Parameters:
      annotationParameters - the annotation parameters used for identification
    • getPeptideAssumptionFilter

      public PeptideAssumptionFilter getPeptideAssumptionFilter()
      Returns the filter used when importing PSMs.
      Returns:
      the filter used when importing PSMs
    • setPeptideAssumptionFilter

      public void setPeptideAssumptionFilter​(PeptideAssumptionFilter peptideAssumptionFilter)
      Sets the filter used when importing PSMs.
      Parameters:
      peptideAssumptionFilter - the filter used when importing PSMs
    • getPsmScoringParameters

      public PsmScoringParameters getPsmScoringParameters()
      Returns the scoring parameters used when scoring PSMs.
      Returns:
      the scoring parameters used when scoring PSMs
    • setPsmScoringParameters

      public void setPsmScoringParameters​(PsmScoringParameters psmScoringParameters)
      Sets the scoring preferences used when scoring PSMs.
      Parameters:
      psmScoringParameters - the scoring preferences used when scoring PSMs
    • getModificationLocalizationParameters

      public ModificationLocalizationParameters 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

      public SequenceMatchingParameters getSequenceMatchingParameters()
      Returns the sequence matching parameters.
      Returns:
      the sequence matching parameters
    • setSequenceMatchingParameters

      public void setSequenceMatchingParameters​(SequenceMatchingParameters sequenceMatchingParameters)
      Sets the sequence matching preferences.
      Parameters:
      sequenceMatchingParameters - the sequence matching preferences
    • getPeptideVariantsParameters

      public PeptideVariantsParameters getPeptideVariantsParameters()
      Returns the peptide variant parameters.
      Returns:
      the peptide variant parameters
    • setPeptideVariantsParameters

      public void setPeptideVariantsParameters​(PeptideVariantsParameters peptideVariantsParameters)
      Sets the peptide variant parameters.
      Parameters:
      peptideVariantsParameters - the peptide variant parameters
    • getIdValidationParameters

      public IdMatchValidationParameters getIdValidationParameters()
      Returns the identification matches validation parameters.
      Returns:
      the identification matches validation parameters
    • setIdValidationParameters

      public void setIdValidationParameters​(IdMatchValidationParameters idValidationParameters)
      Sets the identification matches validation parameters.
      Parameters:
      idValidationParameters - the identification matches validation parameters
    • getProteinInferenceParameters

      public ProteinInferenceParameters getProteinInferenceParameters()
      Returns the protein inference parameters.
      Returns:
      the protein inference parameters
    • setProteinInferenceParameters

      public void setProteinInferenceParameters​(ProteinInferenceParameters proteinInferenceParameters)
      Sets the protein inference parameters.
      Parameters:
      proteinInferenceParameters - the protein inference parameters
    • getGeneParameters

      public GeneParameters getGeneParameters()
      Returns the gene parameters.
      Returns:
      the gene parameters
    • setGeneParameters

      public void setGeneParameters​(GeneParameters geneParameters)
      Sets the gene parameters.
      Parameters:
      geneParameters - the gene parameters
    • getFractionParameters

      public FractionParameters getFractionParameters()
      Returns the fraction parameters.
      Returns:
      the fraction parameters
    • setFractionParameters

      public void setFractionParameters​(FractionParameters fractionParameters)
      Sets the fraction parameters.
      Parameters:
      fractionParameters - the fraction parameters
    • getFastaParameters

      public FastaParameters getFastaParameters()
      Returns the FASTA processing parameters.
      Returns:
      the FASTA processing parameters
    • setFastaParameters

      public void setFastaParameters​(FastaParameters fastaParameters)
      Sets the ASTA processing parameters.
      Parameters:
      fastaParameters - the FASTA processing parameters
    • getIdentificationParameters

      public static IdentificationParameters getIdentificationParameters​(File identificationParametersFile) throws IOException
      Loads 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

      public static boolean supportedVersion​(File identificationParametersFile) throws IOException
      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 IOException
      Saves the identification parameters to a file.
      Parameters:
      identificationParameters - the identification parameters
      identificationParametersFile - the file
      Throws:
      IOException - if an error occurred while writing the file
    • getName

      public String getName()
      Returns the name of the parameters.
      Returns:
      the name of the parameters
    • setName

      public void setName​(String name)
      Sets the name of the parameters.
      Parameters:
      name - the name of the parameters
    • getDescription

      public String 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

      public void setDescription​(String description, boolean automaticallyGenerated)
      Sets the description of the parameters.
      Parameters:
      description - the description of the parameters
      automaticallyGenerated - boolean indicating whether the description is automatically generated
    • setParametersFromSearch

      public void setParametersFromSearch​(SearchParameters searchParameters)
      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 interface MarshallableParameter
    • getType

      public MarshallableParameter.Type 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 interface MarshallableParameter
      Returns:
      the type of marshalled parameter from an unmarshalled object
    • equals

      public boolean equals​(IdentificationParameters otherIdentificationParameters)
      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