Class NeutralLoss
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.biology.ions.NeutralLoss
- All Implemented Interfaces:
Serializable
This class represents a neutral loss.
- Author:
- Marc Vaudel
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal char[]Amino acids that are likely to induce this loss.static final NeutralLossC3H9N loss.static final NeutralLossCH4OS loss.static final NeutralLossH2O loss.static final NeutralLossH3PO4 loss.static final NeutralLossHCNO loss.static final NeutralLossH3PO3 loss.final StringThe name of the neutral loss.static final NeutralLossNH3 loss.Fields inherited from class com.compomics.util.experiment.personalization.ExperimentObject
NO_KEY -
Constructor Summary
ConstructorsConstructorDescriptionDefault 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 TypeMethodDescriptionstatic voidaddNeutralLoss(NeutralLoss neutralLoss) Adds a neutral loss to the class static map.clone()The composition of the loss.doublegetMass()Returns the mass of the neutral loss, from the atomic composition if available, from the mass field otherwise.static NeutralLossgetNeutralLoss(String name) Returns the neutral loss associated to the given name in the static map of the class.Returns the CV term for the neutral loss.booleanisFixed()Returns a boolean indicating whether the neutral loss is fixed or not.booleanisSameAs(NeutralLoss anotherNeutralLoss) Method indicating whether another neutral loss is the same as the one considered.static voidremoveNeutralLoss(String name) Removes the neutral loss associated to the given name in the static map of the class.voidsetComposition(AtomChain composition) Sets the composition of the neutral loss.voidsetFixed(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
-
H2O
H2O loss. -
NH3
NH3 loss. -
H3PO4
H3PO4 loss. -
HPO3
H3PO3 loss. -
CH4OS
CH4OS loss. -
C3H9N
C3H9N loss. -
HCNO
HCNO loss. -
name
The name of the neutral loss. -
aminoAcids
public final char[] aminoAcidsAmino acids that are likely to induce this loss. Null if not a loss originating from amino acids.
-
-
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
-