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
Deprecated.
use the double value instead.
|
protected double |
theoreticMass1
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,
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 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(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 CV term adapted to the fragment ion.
|
abstract CvTerm |
getPsiMsCvTerm()
Returns the 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(Integer charge)
Returns the m/z expected for this ion at the given charge.
|
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, clearParametersMap, getUrParam, removeUrParam
protected Ion.IonType type
protected Double theoreticMass
protected double theoreticMass1
protected AtomChain atomChain
public abstract String getName()
public abstract CvTerm getPrideCvTerm()
public abstract CvTerm getPsiMsCvTerm()
public abstract int getSubType()
public abstract String getSubTypeAsString()
public static ArrayList<Integer> getPossibleSubtypes(Ion.IonType ionType)
ionType
- an arraylist of possible subtypespublic abstract NeutralLoss[] getNeutralLosses()
public boolean hasNeutralLosses()
public abstract boolean isSameAs(Ion anotherIon)
anotherIon
- the other ionpublic String getNeutralLossesAsString()
public static String getNeutralLossesAsString(NeutralLoss[] neutralLosses)
neutralLosses
- the neutral loss (if any)public double getTheoreticMass()
public double getTheoreticMz(Integer charge)
charge
- the charge of interestpublic AtomChain getAtomicComposition()
public void setAtomicComposition(AtomChain atomChain)
atomChain
- the atomic compositionpublic 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, 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 © 2018. All rights reserved.