java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.identification.spectrum_annotation.AnnotationParameters
All Implemented Interfaces:
Serializable

public class AnnotationParameters
extends ExperimentObject
This class contains the spectrum annotation parameters.
Author:
Marc Vaudel, Harald Barsnes
See Also:
Serialized Form
  • Constructor Details

  • Method Details

    • getSpecificAnnotationParameters

      public SpecificAnnotationParameters getSpecificAnnotationParameters​(String spectrumFile, String spectrumTitle, SpectrumIdentificationAssumption spectrumIdentificationAssumption, ModificationParameters modificationParameters, SequenceProvider sequenceProvider, SequenceMatchingParameters modificationSequenceMatchingParameters, SpectrumAnnotator spectrumAnnotator)
      Returns the annotation preferences specific to a spectrum and an identification assumption.
      Parameters:
      spectrumFile - the file of the spectrum to annotate
      spectrumTitle - the title of the spectrum to annotate
      spectrumIdentificationAssumption - the spectrum identification assumption to annotate with
      modificationParameters - the modification parameters
      sequenceProvider - a provider for the protein sequences
      modificationSequenceMatchingParameters - the sequence matching preferences for modification to peptide mapping
      spectrumAnnotator - the spectrum annotator
      Returns:
      the annotation preferences specific to a spectrum and an identification assumption
    • setParametersFromSearchParameters

      public void setParametersFromSearchParameters​(SearchParameters searchParameters)
      Updates the annotation parameters based on search parameters.
      Parameters:
      searchParameters - the search parameters where to take the information from
    • areNeutralLossesSequenceAuto

      public boolean areNeutralLossesSequenceAuto()
      Returns whether neutral losses are considered only for amino acids of interest or not.
      Returns:
      a boolean indicating whether neutral losses are considered only for amino acids of interest or not
    • setNeutralLossesSequenceAuto

      public void setNeutralLossesSequenceAuto​(boolean neutralLossesAuto)
      Sets whether neutral losses are considered only for amino acids of interest or not.
      Parameters:
      neutralLossesAuto - a boolean indicating whether neutral losses are considered only for amino acids of interest or not
    • getReporterIons

      public boolean getReporterIons()
      Indicates whether reporter ions should be annotated by default.
      Returns:
      a boolean indicating whether reporter ions should be annotated by default
    • setReporterIons

      public void setReporterIons​(boolean reporterIons)
      Sets whether reporter ions should be annotated by default.
      Parameters:
      reporterIons - a boolean indicating whether reporter ions should be annotated by default
    • getRelatedIons

      public boolean getRelatedIons()
      Indicates whether related ions should be annotated by default.
      Returns:
      a boolean indicating whether related ions should be annotated by default
    • setRelatedIons

      public void setRelatedIons​(boolean relatedIons)
      Sets whether related ions should be annotated by default.
      Parameters:
      relatedIons - a boolean indicating whether related ions should be annotated by default
    • clearNeutralLosses

      public void clearNeutralLosses()
      Clears the considered neutral losses.
    • getNeutralLosses

      public ArrayList<NeutralLoss> getNeutralLosses()
      Returns the considered neutral losses.
      Returns:
      the considered neutral losses
    • addNeutralLoss

      public void addNeutralLoss​(NeutralLoss neutralLoss)
      Adds a neutral loss.
      Parameters:
      neutralLoss - a new neutral loss
    • getIonTypes

      public HashMap<Ion.IonType,​HashSet<Integer>> getIonTypes()
      Returns the type of ions annotated.
      Returns:
      the type of ions annotated
    • getFragmentIonTypes

      public HashSet<Integer> getFragmentIonTypes()
      Returns the type of peptide fragment ions annotated.
      Returns:
      the type of peptide fragment ions annotated
    • addIonType

      public void addIonType​(Ion.IonType ionType, int subType)
      Adds a new ion type and subtype to annotate.
      Parameters:
      ionType - a new ion type to annotate
      subType - the ion sub type
    • addIonType

      public void addIonType​(Ion.IonType ionType)
      Adds a new ion type to annotate. All subtypes will be annotated.
      Parameters:
      ionType - a new ion type to annotate
    • clearIonTypes

      public void clearIonTypes()
      Clears the ion types annotated.
    • setAutomaticAnnotation

      public void setAutomaticAnnotation​(boolean automaticAnnotation)
      Sets whether the annotation settings should be automatically inferred.
      Parameters:
      automaticAnnotation - a boolean indicating whether the annotation settings should be automatically inferred
    • isAutomaticAnnotation

      public boolean isAutomaticAnnotation()
      Returns whether the annotation settings should be automatically inferred.
      Returns:
      a boolean indicating whether the annotation settings should be automatically inferred
    • getFragmentIonAccuracy

      public double getFragmentIonAccuracy()
      Returns the fragment ion accuracy.
      Returns:
      the fragment ion accuracy
    • getFragmentIonAccuracyInDa

      public double getFragmentIonAccuracyInDa​(double refMass)
      Returns the fragment ion accuracy in Da. If the tolerance is in ppm it will be converted using the given reference mass.
      Parameters:
      refMass - the reference mass to use for the ppm to Da conversion
      Returns:
      the fragment ion accuracy
    • setFragmentIonAccuracy

      public void setFragmentIonAccuracy​(double fragmentIonAccuracy)
      Sets the fragment ion accuracy.
      Parameters:
      fragmentIonAccuracy - the fragment ion accuracy
    • isFragmentIonPpm

      public boolean isFragmentIonPpm()
      Indicates whether the fragment ion accuracy is in ppm.
      Returns:
      a boolean indicating whether the fragment ion accuracy is in ppm
    • setFragmentIonPpm

      public void setFragmentIonPpm​(boolean fragmentIonPpm)
      Sets whether the fragment ion accuracy is in ppm.
      Parameters:
      fragmentIonPpm - a boolean indicating whether the fragment ion accuracy is in ppm
    • getAnnotationIntensityLimit

      public double getAnnotationIntensityLimit()
      Returns the intensity percentile to consider for annotation. e.g. 0.75 means that the 25% most intense peaks will be annotated.
      Returns:
      the intensityLimit
    • setIntensityLimit

      public void setIntensityLimit​(double intensityLimit)
      Sets the intensity percentile to consider for annotation. e.g. 0.75 means that the 25% most intense peaks will be annotated.
      Parameters:
      intensityLimit - the intensityLimit to set
    • getIntensityThresholdType

      public AnnotationParameters.IntensityThresholdType getIntensityThresholdType()
      Returns the intensity threshold type.
      Returns:
      the intensity threshold type
    • setIntensityThresholdType

      public void setIntensityThresholdType​(AnnotationParameters.IntensityThresholdType intensityThresholdType)
      Sets the intensity threshold type.
      Parameters:
      intensityThresholdType - the intensity threshold type
    • showAllPeaks

      public boolean showAllPeaks()
      If true, all peaks are shown, false displays the annotated peaks, and the non-annotated in the background.
      Returns:
      true if all peaks are to be shown
    • setShowAllPeaks

      public void setShowAllPeaks​(boolean showAllPeaks)
      Set if all peaks or just the annotated ones are to be shown.
      Parameters:
      showAllPeaks - if all peaks are to be shown
    • yAxisZoomExcludesBackgroundPeaks

      public boolean yAxisZoomExcludesBackgroundPeaks()
      Returns true if the automatic y-axis zoom excludes background peaks. False if includes all peaks.
      Returns:
      true if the automatic y-axis zoom excludes background peaks
    • setYAxisZoomExcludesBackgroundPeaks

      public void setYAxisZoomExcludesBackgroundPeaks​(boolean yAxisZoomExcludesBackgroundPeaks)
      Set if the automatic y-axis zoom only considers the annotated peaks.
      Parameters:
      yAxisZoomExcludesBackgroundPeaks - if the automatic y-axis zoom only considers the annotated peaks
    • showForwardIonDeNovoTags

      public boolean showForwardIonDeNovoTags()
      Returns true if the automatic forward ion de novo tags are to be shown.
      Returns:
      the showForwardIonDeNovoTags
    • setShowForwardIonDeNovoTags

      public void setShowForwardIonDeNovoTags​(boolean showForwardIonDeNovoTags)
      Set if the automatic forward ion de novo tags are to be shown.
      Parameters:
      showForwardIonDeNovoTags - the showForwardIonDeNovoTags to set
    • showRewindIonDeNovoTags

      public boolean showRewindIonDeNovoTags()
      Returns true if the automatic rewind ion de novo tags are to be shown.
      Returns:
      the showRewindIonDeNovoTags
    • setShowRewindIonDeNovoTags

      public void setShowRewindIonDeNovoTags​(boolean showRewindIonDeNovoTags)
      Set if the automatic rewind ion de novo tags are to be shown.
      Parameters:
      showRewindIonDeNovoTags - the showRewindIonDeNovoTags to set
    • getDeNovoCharge

      public int getDeNovoCharge()
      Returns the charge to use for the fragment ions in the de novo sequencing.
      Returns:
      the charge to use for the fragment ions in the de novo sequencing
    • setDeNovoCharge

      public void setDeNovoCharge​(int deNovoCharge)
      Set the charge to use for the fragment ions in the de novo sequencing
      Parameters:
      deNovoCharge - the charge to use for the fragment ions in the de novo sequencing
    • getTiesResolution

      public SpectrumAnnotator.TiesResolution getTiesResolution()
      Returns the ties resolution method to use when multiple peaks can be assigned to an ion.
      Returns:
      the ties resolution method to use
    • setTiesResolution

      public void setTiesResolution​(SpectrumAnnotator.TiesResolution tiesResolution)
      Sets the ties resolution method to use when multiple peaks can be assigned to an ion.
      Parameters:
      tiesResolution - the ties resolution method to use
    • clone

      public AnnotationParameters clone()
      Clones the settings.
      Overrides:
      clone in class Object
      Returns:
      a clone of this object
    • isSameAs

      public boolean isSameAs​(AnnotationParameters annotationSettings)
      Returns a boolean indicating whether the given annotation settings are the same as these ones.
      Parameters:
      annotationSettings - the annotation settings to compare to
      Returns:
      a boolean indicating whether the given annotation settings are the same as these ones
    • getShortDescription

      public String getShortDescription()
      Returns a short description of the parameters.
      Returns:
      a short description of the parameters