Class TagFragmentIon

All Implemented Interfaces:
Serializable

public class TagFragmentIon
extends Ion
A fragment ion obtained from a tag.
Author:
Marc Vaudel
See Also:
Serialized Form
  • Field Details

  • Constructor Details

    • TagFragmentIon

      public TagFragmentIon()
      Empty default constructor
    • TagFragmentIon

      public TagFragmentIon​(int fragmentType, int number, int subNumber, double mass, NeutralLoss[] neutralLosses, double massGap)
      Constructor.
      Parameters:
      fragmentType - the type of peptide fragment ion as indexed by the static fields
      number - the number of the fragment ion
      subNumber - the number of the fragment ion in the current amino acid sequence
      mass - the mass of the fragment ion
      neutralLosses - the neutral losses of the ion
      massGap - the mass gap before this tag fragment ions
    • TagFragmentIon

      public TagFragmentIon​(int fragmentType, NeutralLoss[] neutralLosses)
      Constructor for a generic ion.
      Parameters:
      fragmentType - the type of peptide fragment ion as indexed by the static fields
      neutralLosses - the neutral losses of the ion
    • TagFragmentIon

      public TagFragmentIon​(int fragmentType)
      Constructor for a generic ion without neutral losses.
      Parameters:
      fragmentType - the type of peptide fragment ion as indexed by the static fields
  • Method Details

    • getNumber

      public int getNumber()
      Returns the number of the fragment in the tag. 0 based.
      Returns:
      the number of the fragment in the tag
    • getSubNumber

      public int getSubNumber()
      Returns the number of the fragment in the current amino acid sequence. 0 based.
      Returns:
      the number of the fragment in the current amino acid sequence
    • 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
    • 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
    • getNameWithNumber

      public String getNameWithNumber()
      Returns the name with number. For example b5-H2O.
      Returns:
      the name with number
    • getNameWithGapAndNumber

      public String getNameWithGapAndNumber()
      Returns the name with number and mass gap. For example 110.0...b5-H2O.
      Returns:
      the name with number
    • 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
    • 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
    • getSubTypeAsString

      public static String getSubTypeAsString​(int subType)
      Returns the type of fragment ion as a letter.
      Parameters:
      subType - the subtype
      Returns:
      the type of fragment ion as a letter
    • getPossibleSubtypes

      public static int[] getPossibleSubtypes()
      Returns the possible subtypes.
      Returns:
      the possible subtypes
    • 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
    • getMassGap

      public double getMassGap()
      Returns the mass gap comprised in this ion.
      Returns:
      the mass gap