Class AnnotationParameters
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
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AnnotationParameters.IntensityThresholdType
Enum of the types of intensity thresholds available. -
Field Summary
-
Constructor Summary
Constructors Constructor Description AnnotationParameters()
Constructor.AnnotationParameters(SearchParameters searchParameters)
Constructor setting preferences from search parameters. -
Method Summary
Modifier and Type Method Description void
addIonType(Ion.IonType ionType)
Adds a new ion type to annotate.void
addIonType(Ion.IonType ionType, int subType)
Adds a new ion type and subtype to annotate.void
addNeutralLoss(NeutralLoss neutralLoss)
Adds a neutral loss.boolean
areNeutralLossesSequenceAuto()
Returns whether neutral losses are considered only for amino acids of interest or not.void
clearIonTypes()
Clears the ion types annotated.void
clearNeutralLosses()
Clears the considered neutral losses.AnnotationParameters
clone()
Clones the settings.double
getAnnotationIntensityLimit()
Returns the intensity percentile to consider for annotation.int
getDeNovoCharge()
Returns the charge to use for the fragment ions in the de novo sequencing.double
getFragmentIonAccuracy()
Returns the fragment ion accuracy.double
getFragmentIonAccuracyInDa(double refMass)
Returns the fragment ion accuracy in Da.HashSet<Integer>
getFragmentIonTypes()
Returns the type of peptide fragment ions annotated.AnnotationParameters.IntensityThresholdType
getIntensityThresholdType()
Returns the intensity threshold type.HashMap<Ion.IonType,HashSet<Integer>>
getIonTypes()
Returns the type of ions annotated.ArrayList<NeutralLoss>
getNeutralLosses()
Returns the considered neutral losses.boolean
getRelatedIons()
Indicates whether related ions should be annotated by default.boolean
getReporterIons()
Indicates whether reporter ions should be annotated by default.String
getShortDescription()
Returns a short description of the parameters.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.SpectrumAnnotator.TiesResolution
getTiesResolution()
Returns the ties resolution method to use when multiple peaks can be assigned to an ion.boolean
isAutomaticAnnotation()
Returns whether the annotation settings should be automatically inferred.boolean
isFragmentIonPpm()
Indicates whether the fragment ion accuracy is in ppm.boolean
isSameAs(AnnotationParameters annotationSettings)
Returns a boolean indicating whether the given annotation settings are the same as these ones.void
setAutomaticAnnotation(boolean automaticAnnotation)
Sets whether the annotation settings should be automatically inferred.void
setDeNovoCharge(int deNovoCharge)
Set the charge to use for the fragment ions in the de novo sequencingvoid
setFragmentIonAccuracy(double fragmentIonAccuracy)
Sets the fragment ion accuracy.void
setFragmentIonPpm(boolean fragmentIonPpm)
Sets whether the fragment ion accuracy is in ppm.void
setIntensityLimit(double intensityLimit)
Sets the intensity percentile to consider for annotation.void
setIntensityThresholdType(AnnotationParameters.IntensityThresholdType intensityThresholdType)
Sets the intensity threshold type.void
setNeutralLossesSequenceAuto(boolean neutralLossesAuto)
Sets whether neutral losses are considered only for amino acids of interest or not.void
setParametersFromSearchParameters(SearchParameters searchParameters)
Updates the annotation parameters based on search parameters.void
setRelatedIons(boolean relatedIons)
Sets whether related ions should be annotated by default.void
setReporterIons(boolean reporterIons)
Sets whether reporter ions should be annotated by default.void
setShowAllPeaks(boolean showAllPeaks)
Set if all peaks or just the annotated ones are to be shown.void
setShowForwardIonDeNovoTags(boolean showForwardIonDeNovoTags)
Set if the automatic forward ion de novo tags are to be shown.void
setShowRewindIonDeNovoTags(boolean showRewindIonDeNovoTags)
Set if the automatic rewind ion de novo tags are to be shown.void
setTiesResolution(SpectrumAnnotator.TiesResolution tiesResolution)
Sets the ties resolution method to use when multiple peaks can be assigned to an ion.void
setYAxisZoomExcludesBackgroundPeaks(boolean yAxisZoomExcludesBackgroundPeaks)
Set if the automatic y-axis zoom only considers the annotated peaks.boolean
showAllPeaks()
If true, all peaks are shown, false displays the annotated peaks, and the non-annotated in the background.boolean
showForwardIonDeNovoTags()
Returns true if the automatic forward ion de novo tags are to be shown.boolean
showRewindIonDeNovoTags()
Returns true if the automatic rewind ion de novo tags are to be shown.boolean
yAxisZoomExcludesBackgroundPeaks()
Returns true if the automatic y-axis zoom excludes background peaks.Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
Constructor Details
-
AnnotationParameters
public AnnotationParameters()Constructor. -
AnnotationParameters
Constructor setting preferences from search parameters.- Parameters:
searchParameters
- the search parameters
-
-
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 annotatespectrumTitle
- the title of the spectrum to annotatespectrumIdentificationAssumption
- the spectrum identification assumption to annotate withmodificationParameters
- the modification parameterssequenceProvider
- a provider for the protein sequencesmodificationSequenceMatchingParameters
- the sequence matching preferences for modification to peptide mappingspectrumAnnotator
- the spectrum annotator- Returns:
- the annotation preferences specific to a spectrum and an identification assumption
-
setParametersFromSearchParameters
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
Returns the considered neutral losses.- Returns:
- the considered neutral losses
-
addNeutralLoss
Adds a neutral loss.- Parameters:
neutralLoss
- a new neutral loss
-
getIonTypes
Returns the type of ions annotated.- Returns:
- the type of ions annotated
-
getFragmentIonTypes
Returns the type of peptide fragment ions annotated.- Returns:
- the type of peptide fragment ions annotated
-
addIonType
Adds a new ion type and subtype to annotate.- Parameters:
ionType
- a new ion type to annotatesubType
- the ion sub type
-
addIonType
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
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
Returns the ties resolution method to use when multiple peaks can be assigned to an ion.- Returns:
- the ties resolution method to use
-
setTiesResolution
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
Clones the settings. -
isSameAs
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
Returns a short description of the parameters.- Returns:
- a short description of the parameters
-