com.compomics.util.experiment.biology.ions
Class PeptideFragmentIon

java.lang.Object
  extended by com.compomics.util.experiment.personalization.ExperimentObject
      extended by com.compomics.util.experiment.biology.Ion
          extended by com.compomics.util.experiment.biology.ions.PeptideFragmentIon
All Implemented Interfaces:
Serializable, Cloneable

public class PeptideFragmentIon
extends Ion

This class models a peptide fragment ion.

Author:
Marc Vaudel
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.compomics.util.experiment.biology.Ion
Ion.IonType
 
Field Summary
static int A_ION
          Identifier for an a ion.
static int B_ION
          Identifier for a b ion.
static int C_ION
          Identifier for a c ion.
static int X_ION
          Identifier for an x ion.
static int Y_ION
          Identifier for a y ion.
static int Z_ION
          Identifier for a z ion.
 
Fields inherited from class com.compomics.util.experiment.biology.Ion
theoreticMass, type
 
Constructor Summary
PeptideFragmentIon(int fragmentType)
          Constructor for a generic ion without neutral losses.
PeptideFragmentIon(int fragmentType, ArrayList<NeutralLoss> neutralLosses)
          Constructor for a generic ion.
PeptideFragmentIon(int fragmentType, int number, double mass, ArrayList<NeutralLoss> neutralLosses)
          Constructor.
 
Method Summary
 String getName()
          Returns the name of the ion.
 ArrayList<NeutralLoss> getNeutralLosses()
          Returns the possible neutral losses of this ion type.
 int getNumber()
          Returns the number of the fragment in the sequence.
static ArrayList<Integer> getPossibleSubtypes()
          Returns an arraylist of possible subtypes.
 CvTerm getPrideCvTerm()
          Returns the pride cv term adapted to the fragment ion. null if none corresponding.
 int getSubType()
          Returns the ion subtype.
 String getSubTypeAsString()
          Returns the subtype as string.
static String getSubTypeAsString(int subType)
          Returns the type of fragment ion as a letter.
 boolean isSameAs(Ion anotherIon)
          Returns a boolean indicating whether the ion is the same as another ion.
 
Methods inherited from class com.compomics.util.experiment.biology.Ion
getGenericIon, getGenericIon, getImplementedIonTypes, getNeutralLossesAsString, getNeutralLossesAsString, getPossibleSubtypes, getTheoreticMass, getType, getTypeAsString, getTypeAsString, setTheoreticMass
 
Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, getParameterKey, getUrParam
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

A_ION

public static final int A_ION
Identifier for an a ion.

See Also:
Constant Field Values

B_ION

public static final int B_ION
Identifier for a b ion.

See Also:
Constant Field Values

C_ION

public static final int C_ION
Identifier for a c ion.

See Also:
Constant Field Values

X_ION

public static final int X_ION
Identifier for an x ion.

See Also:
Constant Field Values

Y_ION

public static final int Y_ION
Identifier for a y ion.

See Also:
Constant Field Values

Z_ION

public static final int Z_ION
Identifier for a z ion.

See Also:
Constant Field Values
Constructor Detail

PeptideFragmentIon

public PeptideFragmentIon(int fragmentType,
                          int number,
                          double mass,
                          ArrayList<NeutralLoss> neutralLosses)
Constructor.

Parameters:
fragmentType - the type of peptide fragment ion as indexed by the static fields
number - the number of the fragment ion
mass - the mass of the fragment ion
neutralLosses - the neutral losses of the ion

PeptideFragmentIon

public PeptideFragmentIon(int fragmentType,
                          ArrayList<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

PeptideFragmentIon

public PeptideFragmentIon(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 Detail

getNumber

public int getNumber()
Returns the number of the fragment in the sequence.

Returns:
the number of the fragment in the sequence

getNeutralLosses

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

getPrideCvTerm

public CvTerm getPrideCvTerm()
Description copied from class: Ion
Returns the pride cv term adapted to the fragment ion. null if none corresponding.

Specified by:
getPrideCvTerm in class Ion
Returns:
the pride 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 ArrayList<Integer> getPossibleSubtypes()
Returns an arraylist of possible subtypes.

Returns:
an arraylist of 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


Copyright © 2012. All Rights Reserved.