public abstract class Ion extends ExperimentObject
Modifier and Type | Class and Description |
---|---|
static class |
Ion.IonType
An enumerator of the supported ion types.
|
Modifier and Type | Field and Description |
---|---|
protected AtomChain |
atomChain
The atomic composition of the ion.
|
protected Double |
theoreticMass
The theoretic mass.
|
protected Ion.IonType |
type
Type of ion.
|
Constructor and Description |
---|
Ion() |
Modifier and Type | Method and Description |
---|---|
AtomChain |
getAtomicComposition()
Returns the atomic composition.
|
static Ion |
getGenericIon(Ion.IonType ionType,
int subType)
Convenience method returning a generic ion based on the given ion type
without neutral losses.
|
static Ion |
getGenericIon(Ion.IonType ionType,
int subType,
ArrayList<NeutralLoss> neutralLosses)
Convenience method returning a generic ion based on the given ion type.
|
static ArrayList<Ion.IonType> |
getImplementedIonTypes()
Returns the implemented ion types.
|
abstract String |
getName()
Returns the name of the ion.
|
abstract ArrayList<NeutralLoss> |
getNeutralLosses()
Returns the possible neutral losses of this ion type.
|
String |
getNeutralLossesAsString()
Returns the neutral loss (if any), the empty string if no loss.
|
static String |
getNeutralLossesAsString(ArrayList<NeutralLoss> neutralLosses)
Returns the neutral loss (if any), the empty string if no loss.
|
static ArrayList<Integer> |
getPossibleSubtypes(Ion.IonType ionType)
Returns an arraylist of possible subtypes.
|
abstract CvTerm |
getPrideCvTerm()
Returns the pride cv term adapted to the fragment ion.
|
abstract int |
getSubType()
Returns the ion subtype.
|
abstract String |
getSubTypeAsString()
Returns the subtype as string.
|
Double |
getTheoreticMass()
Returns the theoretic mass, from the atomic composition if available,
from the theoreticMass field otherwise.
|
double |
getTheoreticMz(int chargeValue)
Returns the theoretic m/z of an ion at a given charge state.
|
Ion.IonType |
getType()
Returns the ion type.
|
String |
getTypeAsString()
Returns the type of ion as string.
|
static String |
getTypeAsString(Ion.IonType type)
Returns the type of ion as string.
|
boolean |
hasNeutralLosses()
Indicates whether the ion has a neutral loss.
|
abstract boolean |
isSameAs(Ion anotherIon)
Returns a boolean indicating whether the ion is the same as another ion.
|
void |
setAtomicComposition(AtomChain atomChain)
Returns the atomic composition.
|
void |
setTheoreticMass(double theoreticMass)
Sets a new theoretic mass.
|
addUrParam, getParameterKey, getUrParam
protected Ion.IonType type
protected Double theoreticMass
protected AtomChain atomChain
public abstract String getName()
public abstract CvTerm getPrideCvTerm()
public abstract int getSubType()
public abstract String getSubTypeAsString()
public static ArrayList<Integer> getPossibleSubtypes(Ion.IonType ionType)
ionType
- an arraylist of possible subtypespublic abstract ArrayList<NeutralLoss> getNeutralLosses()
public boolean hasNeutralLosses()
public abstract boolean isSameAs(Ion anotherIon)
anotherIon
- the other ionpublic String getNeutralLossesAsString()
public static String getNeutralLossesAsString(ArrayList<NeutralLoss> neutralLosses)
neutralLosses
- the neutral loss (if any)public Double getTheoreticMass()
public AtomChain getAtomicComposition()
public void setAtomicComposition(AtomChain atomChain)
atomChain
- the atomic compositionpublic double getTheoreticMz(int chargeValue)
chargeValue
- the value of the carried chargepublic void setTheoreticMass(double theoreticMass)
theoreticMass
- a new theoretic masspublic Ion.IonType getType()
public static ArrayList<Ion.IonType> getImplementedIonTypes()
public String getTypeAsString()
public static String getTypeAsString(Ion.IonType type)
type
- the type of ion as stringpublic static Ion getGenericIon(Ion.IonType ionType, int subType, ArrayList<NeutralLoss> neutralLosses)
ionType
- the ion typesubType
- the ion subtypeneutralLosses
- the neutral losses. Null list if none.public static Ion getGenericIon(Ion.IonType ionType, int subType)
ionType
- the ion typesubType
- the ion subtypeCopyright © 2016. All rights reserved.