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 Details

  • Constructor Details

    • NeutralLoss

      public NeutralLoss​(String name, AtomChain composition, boolean fixed, char[] aminoAcids)
      Constructor for a user defined neutral loss. The neutral loss is added to the factory.
      Parameters:
      name - name of the neutral loss
      composition - the atomic composition of the neutral loss
      fixed - is the neutral loss fixed or not
      aminoAcids - the amino acids that are likely to induce this loss
    • NeutralLoss

      public NeutralLoss()
      Default construtor
    • NeutralLoss

      public NeutralLoss​(String name, AtomChain composition, boolean fixed)
      Constructor for a user defined neutral loss. The neutral loss is added to the factory.
      Parameters:
      name - name of the neutral loss
      composition - the atomic composition of the neutral loss
      fixed - 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 loss
      composition - the atomic composition of the neutral loss
      fixed - is the neutral loss fixed or not
      aminoAcids - the amino acids that are likely to induce this loss
      save - if true, the neutral loss will be added to the factory
  • Method Details

    • addNeutralLoss

      public static void addNeutralLoss​(NeutralLoss neutralLoss)
      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

      public static NeutralLoss getNeutralLoss​(String name)
      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

      public static void removeNeutralLoss​(String name)
      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

      public CvTerm 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

      public AtomChain getComposition()
      The composition of the loss.
      Returns:
      The composition of the loss
    • setComposition

      public void setComposition​(AtomChain composition)
      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

      public boolean isSameAs​(NeutralLoss anotherNeutralLoss)
      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

      public NeutralLoss clone()
      Overrides:
      clone in class Object