All Implemented Interfaces:
Serializable

public class RelatedIon extends Ion
Represents a related ion, i.e., an ion that is related to a given amino acid, and is its own factory.
Author:
Harald Barsnes, Marc Vaudel
See Also:
  • Field Details

  • Constructor Details

    • RelatedIon

      public RelatedIon()
      Empty default constructor
    • RelatedIon

      public RelatedIon(AminoAcid aminoAcidTarget, AtomChain atomChain, int subType)
      Constructor for a related ion.
      Parameters:
      aminoAcidTarget - the amino acid target
      atomChain - the atomic composition of this ion
      subType - the ion subtype
    • RelatedIon

      public RelatedIon(AminoAcid aminoAcidTarget, AtomChain atomChain, int subType, boolean save)
      Constructor for a related ion.
      Parameters:
      aminoAcidTarget - the amino acid target
      atomChain - the atomic composition of this ion
      subType - the ion subtype
      save - if true the related ion will be saved in the static map for later reuse
  • Method Details

    • getRelatedIons

      public static ArrayList<RelatedIon> getRelatedIons(char aa)
      Returns the list of related ions for the given amino acid.
      Parameters:
      aa - the amino acid target single letter code
      Returns:
      the list of related ions for the given amino acid
    • getRelatedIons

      public static ArrayList<RelatedIon> getRelatedIons(AminoAcid aminoAcidTarget)
      Returns the list of related ions for the given amino acid.
      Parameters:
      aminoAcidTarget - the amino acid target
      Returns:
      the list of related ions for the given amino acid
    • getName

      public String getName()
      Description copied from class: Ion
      Returns the name of the ion. The name should be short enough to be displayed on a spectrum.
      Specified by:
      getName in class Ion
      Returns:
      the name of the ion
    • getPrideCvTerm

      public CvTerm getPrideCvTerm()
      Description copied from class: Ion
      Returns the CV term adapted to the fragment ion. Null if none corresponding.
      Specified by:
      getPrideCvTerm in class Ion
      Returns:
      the CV term adapted to the fragment ion. Null if none corresponding
    • getPsiMsCvTerm

      public CvTerm getPsiMsCvTerm()
      Description copied from class: Ion
      Returns the CV term adapted to the fragment ion. Null if none corresponding.
      Specified by:
      getPsiMsCvTerm in class Ion
      Returns:
      the CV term adapted to the fragment ion. Null if none corresponding
    • isSameAs

      public boolean isSameAs(RelatedIon anotherRelatedIon)
      Compares the current related ion with another one based on their composition.
      Parameters:
      anotherRelatedIon - the other related ion
      Returns:
      a boolean indicating whether compositions are equal
    • getSubType

      public int getSubType()
      Description copied from class: Ion
      Returns the ion subtype.
      Specified by:
      getSubType in class Ion
      Returns:
      the ion subtype as integer
    • getSubTypeAsString

      public String getSubTypeAsString()
      Description copied from class: Ion
      Returns the subtype as string.
      Specified by:
      getSubTypeAsString in class Ion
      Returns:
      the subtype as string
    • getPossibleSubtypes

      public static int[] getPossibleSubtypes()
      Returns the possible subtypes.
      Returns:
      the possible subtypes
    • getNeutralLosses

      public NeutralLoss[] getNeutralLosses()
      Description copied from class: Ion
      Returns the possible neutral losses of this ion type. An empty list if none.
      Specified by:
      getNeutralLosses in class Ion
      Returns:
      the possible neutral losses of this ion type
    • isSameAs

      public boolean isSameAs(Ion anotherIon)
      Description copied from class: Ion
      Returns a boolean indicating whether the ion is the same as another ion.
      Specified by:
      isSameAs in class Ion
      Parameters:
      anotherIon - the other ion
      Returns:
      a boolean indicating whether the ion is the same as another ion