Class SpecificAnnotationParameters
java.lang.Object
com.compomics.util.experiment.identification.spectrum_annotation.SpecificAnnotationParameters
public class SpecificAnnotationParameters extends Object
The spectrum annotation preferences specific to a spectrum and an
identification assumption.
- Author:
- Marc Vaudel
-
Constructor Summary
Constructors Constructor Description SpecificAnnotationParameters()
Empty default constructor -
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.void
addSelectedCharge(int selectedCharge)
Add a charge to take into account when annotating the spectrum.void
clearCharges()
Clears the selected charges.void
clearIonTypes()
Clears the ion types annotated.void
clearNeutralLosses()
Clears the considered neutral losses.SpecificAnnotationParameters
clone()
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.HashMap<Ion.IonType,HashSet<Integer>>
getIonTypes()
Returns the map of ions to annotate.NeutralLossesMap
getNeutralLossesMap()
Returns the map of neutral losses to annotate.int
getPrecursorCharge()
Returns the charge of the precursor.HashSet<Integer>
getSelectedCharges()
Returns the charges selected for annotation.boolean
isFragmentIonPpm()
Indicates whether the fragment ion accuracy is in ppm.boolean
isNeutralLossesAuto()
Indicates whether neutral losses should be automatically selected.void
setFragmentIonAccuracy(double fragmentIonAccuracy)
Sets the fragment ion accuracy.void
setFragmentIonPpm(boolean fragmentIonPpm)
Sets whether the fragment ion accuracy is in ppm.void
setNeutralLossesAuto(boolean neutralLossesAuto)
Sets whether neutral losses should be automatically selected.void
setNeutralLossesMap(NeutralLossesMap neutralLossesMap)
Sets the map of neutral losses to annotate.void
setPrecursorCharge(int precursorCharge)
Sets the precursor charge.void
setSelectedCharges(HashSet<Integer> selectedCharges)
Sets the charges selected for annotation.void
setSelectedIonsMap(HashMap<Ion.IonType,HashSet<Integer>> selectedIonsMap)
Sets the map of ions to annotate.
-
Constructor Details
-
SpecificAnnotationParameters
public SpecificAnnotationParameters()Empty default constructor
-
-
Method Details
-
setPrecursorCharge
public void setPrecursorCharge(int precursorCharge)Sets the precursor charge.- Parameters:
precursorCharge
- The precursor charge.
-
getPrecursorCharge
public int getPrecursorCharge()Returns the charge of the precursor.- Returns:
- the charge of the precursor
-
getIonTypes
Returns the map of ions to annotate.- Returns:
- the map of ions to annotate
-
getFragmentIonTypes
Returns the type of peptide fragment ions annotated.- Returns:
- the type of peptide fragment ions annotated
-
setSelectedIonsMap
Sets the map of ions to annotate.- Parameters:
selectedIonsMap
- the map of ions to annotate
-
clearIonTypes
public void clearIonTypes()Clears the ion types 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
-
getNeutralLossesMap
Returns the map of neutral losses to annotate.- Returns:
- the map of neutral losses to annotate
-
setNeutralLossesMap
Sets the map of neutral losses to annotate.- Parameters:
neutralLossesMap
- the map of neutral losses to annotate
-
clearNeutralLosses
public void clearNeutralLosses()Clears the considered neutral losses. -
addNeutralLoss
Adds a neutral loss.- Parameters:
neutralLoss
- a new neutral loss
-
getSelectedCharges
Returns the charges selected for annotation.- Returns:
- the charges selected for annotation
-
setSelectedCharges
Sets the charges selected for annotation.- Parameters:
selectedCharges
- the charges selected for annotation
-
clearCharges
public void clearCharges()Clears the selected charges. -
addSelectedCharge
public void addSelectedCharge(int selectedCharge)Add a charge to take into account when annotating the spectrum.- Parameters:
selectedCharge
- a charge to take into account when annotating the spectrum
-
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
-
isNeutralLossesAuto
public boolean isNeutralLossesAuto()Indicates whether neutral losses should be automatically selected.- Returns:
- a boolean indicating whether neutral losses should be automatically selected
-
setNeutralLossesAuto
public void setNeutralLossesAuto(boolean neutralLossesAuto)Sets whether neutral losses should be automatically selected.- Parameters:
neutralLossesAuto
- a boolean indicating whether neutral losses should be automatically selected
-
clone
-