Class PeptideFragmentIon
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.biology.ions.Ion
com.compomics.util.experiment.biology.ions.impl.PeptideFragmentIon
- All Implemented Interfaces:
Serializable
This class models a peptide fragment ion.
- Author:
- Marc Vaudel, Harald Barsnes
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.compomics.util.experiment.biology.ions.Ion
Ion.IonType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intIdentifier for an a-ion.static final intIdentifier for a b-ion.static final intIdentifier for a c-ion.static final intIdentifier for an x-ion.static final intIdentifier for a y-ion.static final intIdentifier for a z-ion.Fields inherited from class com.compomics.util.experiment.biology.ions.Ion
atomChain, theoreticMass1, typeFields inherited from class com.compomics.util.experiment.personalization.ExperimentObject
NO_KEY -
Constructor Summary
ConstructorsConstructorDescriptionEmpty default constructor.PeptideFragmentIon(int fragmentType) Constructor for a generic ion without neutral losses.PeptideFragmentIon(int fragmentType, int number, double mass, NeutralLoss[] neutralLosses) Constructor.PeptideFragmentIon(int fragmentType, NeutralLoss[] neutralLosses) Constructor for a generic ion. -
Method Summary
Modifier and TypeMethodDescriptionintgetAaNumber(int peptideLength) Returns the 1 based index of the amino acid which generated this ion.static IntegergetIonType(String ionSymbol) Returns the ion index corresponding to the given symbol in the drop down menu.getName()Returns the name of the ion.Returns the name with number.Returns the possible neutral losses of this ion type.intReturns the number of the fragment in the sequence.static int[]Returns the possible subtypes.Returns the CV term adapted to the fragment ion.Returns the CV term adapted to the fragment ion.intReturns the ion subtype.Returns the subtype as string.static StringgetSubTypeAsString(int subType) Returns the type of fragment ion as a letter.static booleanisForward(int subType) Indicates whether the given subtype refers to a forward or a rewind ion.booleanReturns a boolean indicating whether the ion is the same as another ion.Methods inherited from class com.compomics.util.experiment.biology.ions.Ion
getAtomicComposition, getGenericIon, getGenericIon, getImplementedIonTypes, getNeutralLossesAsString, getNeutralLossesAsString, getPossibleSubtypes, getPossibleSubtypesAsSet, getTheoreticMass, getTheoreticMz, getType, getTypeAsString, getTypeAsString, hasNeutralLosses, setAtomicComposition, setTheoreticMassMethods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
Field Details
-
A_ION
public static final int A_IONIdentifier for an a-ion.- See Also:
-
B_ION
public static final int B_IONIdentifier for a b-ion.- See Also:
-
C_ION
public static final int C_IONIdentifier for a c-ion.- See Also:
-
X_ION
public static final int X_IONIdentifier for an x-ion.- See Also:
-
Y_ION
public static final int Y_IONIdentifier for a y-ion.- See Also:
-
Z_ION
public static final int Z_IONIdentifier for a z-ion.- See Also:
-
-
Constructor Details
-
PeptideFragmentIon
public PeptideFragmentIon()Empty default constructor. -
PeptideFragmentIon
Constructor.- Parameters:
fragmentType- the type of peptide fragment ion as indexed by the static fieldsnumber- the number of the fragment ionmass- the mass of the fragment ionneutralLosses- the neutral losses of the ion
-
PeptideFragmentIon
Constructor for a generic ion.- Parameters:
fragmentType- the type of peptide fragment ion as indexed by the static fieldsneutralLosses- 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 Details
-
getNumber
public int getNumber()Returns the number of the fragment in the sequence.- Returns:
- the number of the fragment in the sequence
-
getAaNumber
public int getAaNumber(int peptideLength) Returns the 1 based index of the amino acid which generated this ion.- Parameters:
peptideLength- the length of the peptide- Returns:
- the 1 based index of the amino acid which generated this ion
-
getNeutralLosses
Description copied from class:IonReturns the possible neutral losses of this ion type. An empty list if none.- Specified by:
getNeutralLossesin classIon- Returns:
- the possible neutral losses of this ion type
-
getName
Description copied from class:IonReturns the name of the ion. The name should be short enough to be displayed on a spectrum. -
getNameWithNumber
Returns the name with number. For example b5-H2O.- Returns:
- the name with number
-
getPrideCvTerm
Description copied from class:IonReturns the CV term adapted to the fragment ion. Null if none corresponding.- Specified by:
getPrideCvTermin classIon- Returns:
- the CV term adapted to the fragment ion. Null if none corresponding
-
getPsiMsCvTerm
Description copied from class:IonReturns the CV term adapted to the fragment ion. Null if none corresponding.- Specified by:
getPsiMsCvTermin classIon- Returns:
- the CV term adapted to the fragment ion. Null if none corresponding
-
getSubType
public int getSubType()Description copied from class:IonReturns the ion subtype.- Specified by:
getSubTypein classIon- Returns:
- the ion subtype as integer
-
getSubTypeAsString
Description copied from class:IonReturns the subtype as string.- Specified by:
getSubTypeAsStringin classIon- Returns:
- the subtype as string
-
getSubTypeAsString
Returns the type of fragment ion as a letter. e.g. 'a' for an a-ion.- Parameters:
subType- the subtype- Returns:
- the type of fragment ion as a letter
-
getIonType
Returns the ion index corresponding to the given symbol in the drop down menu.- Parameters:
ionSymbol- the ion symbol- Returns:
- the ion index corresponding to the given symbol in the drop down menu
-
getPossibleSubtypes
public static int[] getPossibleSubtypes()Returns the possible subtypes.- Returns:
- the possible subtypes
-
isForward
public static boolean isForward(int subType) Indicates whether the given subtype refers to a forward or a rewind ion.- Parameters:
subType- the subtype as integer.- Returns:
- true for forward ions
-
isSameAs
Description copied from class:IonReturns a boolean indicating whether the ion is the same as another ion.
-