Class NeutralLoss
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.biology.ions.NeutralLoss
- All Implemented Interfaces:
Serializable
public class NeutralLoss extends ExperimentObject
This class represents a neutral loss.
- Author:
- Marc Vaudel
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description char[]
aminoAcids
Amino acids that are likely to induce this loss.static NeutralLoss
C3H9N
C3H9N loss.static NeutralLoss
CH4OS
CH4OS loss.static NeutralLoss
H2O
H2O loss.static NeutralLoss
H3PO4
H3PO4 loss.static NeutralLoss
HCNO
HCNO loss.static NeutralLoss
HPO3
H3PO3 loss.String
name
The name of the neutral loss.static NeutralLoss
NH3
NH3 loss. -
Constructor Summary
Constructors Constructor Description NeutralLoss()
Default construtorNeutralLoss(String name, AtomChain composition, boolean fixed)
Constructor for a user defined neutral loss.NeutralLoss(String name, AtomChain composition, boolean fixed, char[] aminoAcids)
Constructor for a user defined neutral loss.NeutralLoss(String name, AtomChain composition, boolean fixed, char[] aminoAcids, boolean save)
Constructor for a user defined neutral loss. -
Method Summary
Modifier and Type Method Description static void
addNeutralLoss(NeutralLoss neutralLoss)
Adds a neutral loss to the class static map.NeutralLoss
clone()
AtomChain
getComposition()
The composition of the loss.double
getMass()
Returns the mass of the neutral loss, from the atomic composition if available, from the mass field otherwise.static NeutralLoss
getNeutralLoss(String name)
Returns the neutral loss associated to the given name in the static map of the class.CvTerm
getPsiMsCvTerm()
Returns the CV term for the neutral loss.boolean
isFixed()
Returns a boolean indicating whether the neutral loss is fixed or not.boolean
isSameAs(NeutralLoss anotherNeutralLoss)
Method indicating whether another neutral loss is the same as the one considered.static void
removeNeutralLoss(String name)
Removes the neutral loss associated to the given name in the static map of the class.void
setComposition(AtomChain composition)
Sets the composition of the neutral loss.void
setFixed(boolean fixed)
Sets whether the loss is fixed or not.Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
Field Details
-
Constructor Details
-
NeutralLoss
Constructor for a user defined neutral loss. The neutral loss is added to the factory.- Parameters:
name
- name of the neutral losscomposition
- the atomic composition of the neutral lossfixed
- is the neutral loss fixed or notaminoAcids
- the amino acids that are likely to induce this loss
-
NeutralLoss
public NeutralLoss()Default construtor -
NeutralLoss
Constructor for a user defined neutral loss. The neutral loss is added to the factory.- Parameters:
name
- name of the neutral losscomposition
- the atomic composition of the neutral lossfixed
- is the neutral loss fixed or not
-
NeutralLoss
public NeutralLoss(String name, AtomChain composition, boolean fixed, char[] aminoAcids, boolean save)Constructor for a user defined neutral loss.- Parameters:
name
- name of the neutral losscomposition
- the atomic composition of the neutral lossfixed
- is the neutral loss fixed or notaminoAcids
- the amino acids that are likely to induce this losssave
- if true, the neutral loss will be added to the factory
-
-
Method Details
-
addNeutralLoss
Adds a neutral loss to the class static map. Neutral losses with the same name will be overwritten.- Parameters:
neutralLoss
- the neutral loss to add
-
getNeutralLoss
Returns the neutral loss associated to the given name in the static map of the class. Null if not found.- Parameters:
name
- the name of the neutral loss of interest- Returns:
- the neutral loss
-
removeNeutralLoss
Removes the neutral loss associated to the given name in the static map of the class.- Parameters:
name
- the name of the neutral loss to remove
-
getPsiMsCvTerm
Returns the CV term for the neutral loss. Null if none corresponding.- Returns:
- the CV term for the neutral loss.
-
isFixed
public boolean isFixed()Returns a boolean indicating whether the neutral loss is fixed or not.- Returns:
- a boolean indicating whether the neutral loss is fixed or not
-
setFixed
public void setFixed(boolean fixed)Sets whether the loss is fixed or not.- Parameters:
fixed
- a boolean indicating whether the loss is fixed or not
-
getComposition
The composition of the loss.- Returns:
- The composition of the loss
-
setComposition
Sets the composition of the neutral loss.- Parameters:
composition
- the composition of the neutral loss
-
getMass
public double getMass()Returns the mass of the neutral loss, from the atomic composition if available, from the mass field otherwise.- Returns:
- the mass of the neutral loss
-
isSameAs
Method indicating whether another neutral loss is the same as the one considered.- Parameters:
anotherNeutralLoss
- another neutral loss- Returns:
- boolean indicating whether the other neutral loss is the same as the one considered
-
clone
-