public class SpectrumAnnotator
extends java.lang.Object
Constructor and Description |
---|
SpectrumAnnotator()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
chargeValidated(Ion theoreticIon,
int charge,
int precursorCharge)
Returns a boolean indicating whether the given charge can be found on the
given fragment ion.
|
java.util.ArrayList<IonMatch> |
getCurrentAnnotation(java.util.HashMap<Ion.IonType,java.util.ArrayList<java.lang.Integer>> iontypes,
NeutralLossesMap neutralLosses,
java.util.ArrayList<java.lang.Integer> charges)
Returns the currently matched ions with the given settings.
|
Peptide |
getCurrentlyLoadedPeptide()
Returns the currently inspected peptide.
|
java.lang.String |
getCurrentlyLoadedSpectrumKey()
Returns the spectrum currently inspected.
|
static NeutralLossesMap |
getDefaultLosses(Peptide peptide)
Returns the possible neutral losses expected by default for a given
peptide.
|
java.util.HashMap<java.lang.Integer,java.util.ArrayList<Ion>> |
getExpectedIons(java.util.HashMap<Ion.IonType,java.util.ArrayList<java.lang.Integer>> iontypes,
NeutralLossesMap neutralLosses,
java.util.ArrayList<java.lang.Integer> charges,
int precursorCharge,
Peptide peptide)
Returns the expected ions in a map indexed by the possible charges.
|
double |
getMassShift()
Returns the m/z shift applied to the fragment ions.
|
static java.util.Vector<DefaultSpectrumAnnotation> |
getSpectrumAnnotation(java.util.ArrayList<IonMatch> ionMatches)
Translates the list of ion matches into a vector of annotations which can
be read by the SpectrumPanel.
|
java.util.ArrayList<IonMatch> |
getSpectrumAnnotation(java.util.HashMap<Ion.IonType,java.util.ArrayList<java.lang.Integer>> iontypes,
NeutralLossesMap neutralLosses,
java.util.ArrayList<java.lang.Integer> charges,
int precursorCharge,
MSnSpectrum spectrum,
Peptide peptide,
double intensityLimit,
double mzTolerance,
boolean isPpm)
Returns the spectrum annotations of a spectrum in a list of IonMatches.
|
boolean |
isAccounted(NeutralLossesMap neutralLosses,
NeutralLoss neutralLoss,
Ion ion,
Peptide peptide)
Returns a boolean indicating whether the neutral loss should be accounted
for.
|
boolean |
lossesValidated(NeutralLossesMap neutralLosses,
Ion theoreticIon,
Peptide peptide)
Returns a boolean indicating whether the neutral losses of the given
fragment ion are fit the requirement of the given neutral losses map.
|
java.util.ArrayList<IonMatch> |
matchPeak(Peptide peptide,
java.util.HashMap<Ion.IonType,java.util.ArrayList<java.lang.Integer>> iontypes,
java.util.ArrayList<java.lang.Integer> charges,
int precursorCharge,
NeutralLossesMap neutralLosses,
Peak peak)
This method matches the potential fragment ions of a given peptide with a
given peak.
|
void |
setMassShift(double massShift)
Sets an m/z shift on all ions.
|
void |
setPeptide(Peptide peptide,
int precursorCharge)
Sets a new peptide to match.
|
public java.util.ArrayList<IonMatch> matchPeak(Peptide peptide, java.util.HashMap<Ion.IonType,java.util.ArrayList<java.lang.Integer>> iontypes, java.util.ArrayList<java.lang.Integer> charges, int precursorCharge, NeutralLossesMap neutralLosses, Peak peak)
peptide
- The peptideiontypes
- The fragment ions selectedcharges
- The charges of the fragment to search forprecursorCharge
- The precursor charge as deduced by the search
engineneutralLosses
- Map of expected neutral losses: neutral loss ->
maximal position in the sequence (first aa is 1). let null if neutral
losses should not be considered.peak
- The peak to matchpublic static java.util.Vector<DefaultSpectrumAnnotation> getSpectrumAnnotation(java.util.ArrayList<IonMatch> ionMatches)
ionMatches
- list of ion matchespublic void setPeptide(Peptide peptide, int precursorCharge)
peptide
- the new peptideprecursorCharge
- the new precursor chargepublic static NeutralLossesMap getDefaultLosses(Peptide peptide) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.InterruptedException
peptide
- the peptide of interestjava.io.IOException
java.lang.IllegalArgumentException
java.lang.InterruptedException
public boolean isAccounted(NeutralLossesMap neutralLosses, NeutralLoss neutralLoss, Ion ion, Peptide peptide)
neutralLosses
- Map of expected neutral lossesneutralLoss
- the neutral loss of interestion
- the fragment ion of interestpeptide
- the peptide of interestpublic boolean lossesValidated(NeutralLossesMap neutralLosses, Ion theoreticIon, Peptide peptide)
neutralLosses
- Map of expected neutral losses: neutral loss.theoreticIon
- the ion of interestpeptide
- the inspected peptidepublic boolean chargeValidated(Ion theoreticIon, int charge, int precursorCharge)
theoreticIon
- the ion of interestcharge
- the candidate chargeprecursorCharge
- the precursor chargepublic java.util.ArrayList<IonMatch> getSpectrumAnnotation(java.util.HashMap<Ion.IonType,java.util.ArrayList<java.lang.Integer>> iontypes, NeutralLossesMap neutralLosses, java.util.ArrayList<java.lang.Integer> charges, int precursorCharge, MSnSpectrum spectrum, Peptide peptide, double intensityLimit, double mzTolerance, boolean isPpm)
iontypes
- The expected ions to look forneutralLosses
- Map of expected neutral losses: neutral loss ->
first position in the sequence (first aa is 1). let null if neutral
losses should not be considered.charges
- List of expected chargesprecursorCharge
- the precursor chargespectrum
- The spectrum to matchpeptide
- The peptide of interestintensityLimit
- The intensity limit to usemzTolerance
- The m/z tolerance to useisPpm
- a boolean indicating whether the mass tolerance is in ppm or
in Dapublic java.util.HashMap<java.lang.Integer,java.util.ArrayList<Ion>> getExpectedIons(java.util.HashMap<Ion.IonType,java.util.ArrayList<java.lang.Integer>> iontypes, NeutralLossesMap neutralLosses, java.util.ArrayList<java.lang.Integer> charges, int precursorCharge, Peptide peptide)
iontypes
- The expected ions to look forneutralLosses
- Map of expected neutral losses: neutral loss ->
first position in the sequence (first aa is 1). let null if neutral
losses should not be considered.charges
- List of expected chargespeptide
- The peptide of interestprecursorCharge
- The precursor chargepublic java.util.ArrayList<IonMatch> getCurrentAnnotation(java.util.HashMap<Ion.IonType,java.util.ArrayList<java.lang.Integer>> iontypes, NeutralLossesMap neutralLosses, java.util.ArrayList<java.lang.Integer> charges)
iontypes
- The expected fragment ions to look forneutralLosses
- Map of expected neutral losses: neutral loss ->
first position in the sequence (first aa is 1). let null if neutral
losses should not be considered.charges
- List of expected chargespublic java.lang.String getCurrentlyLoadedSpectrumKey()
public Peptide getCurrentlyLoadedPeptide()
public double getMassShift()
public void setMassShift(double massShift)
massShift
- the m/z shift to applyCopyright © 2013. All Rights Reserved.