|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.compomics.util.experiment.identification.SpectrumAnnotator
public class SpectrumAnnotator
The spectrum annotator annotates peaks in a spectrum.
Field Summary | |
---|---|
static String |
SEPARATOR
Separator for the theoretic fragment key components |
Constructor Summary | |
---|---|
SpectrumAnnotator()
Constructor |
Method Summary | |
---|---|
boolean |
chargeValidated(PeptideFragmentIon fragmentIon,
int charge)
Returns a boolean indicating whether the given charge can be found on the given fragment ion |
ArrayList<IonMatch> |
getCurrentAnnotation(ArrayList<PeptideFragmentIon.PeptideFragmentIonType> expectedFragmentIons,
NeutralLossesMap neutralLosses,
ArrayList<Integer> charges)
Returns the currently matched ions with the given settings |
Peptide |
getCurrentlyLoadedPeptide()
Returns the currently inspected peptide |
String |
getCurrentlyLoadedSpectrumKey()
Returns the spectrum currently inspected |
static NeutralLossesMap |
getDefaultLosses(Peptide peptide)
Returns the possible neutral losses expected by default for a given peptide |
HashMap<Integer,ArrayList<PeptideFragmentIon>> |
getExpectedIons(ArrayList<PeptideFragmentIon.PeptideFragmentIonType> expectedFragmentIons,
NeutralLossesMap neutralLosses,
ArrayList<Integer> charges,
int precursorCharge,
Peptide peptide)
Returns the expected ions in a map indexed by the possible charges Note that, except for +1 precursors, fragments ions will be expected to have a charge strictly smaller than the precursor ion charge. |
double |
getMassShift()
Returns the m/z shift applied to the fragment ions |
static Vector<DefaultSpectrumAnnotation> |
getSpectrumAnnotation(ArrayList<IonMatch> ionMatches)
Translates the list of ion matches into a vector of annotations which can be read by the SpectrumPAnel |
ArrayList<IonMatch> |
getSpectrumAnnotation(ArrayList<PeptideFragmentIon.PeptideFragmentIonType> expectedFragmentIons,
NeutralLossesMap neutralLosses,
ArrayList<Integer> charges,
int precursorCharge,
MSnSpectrum spectrum,
Peptide peptide,
double intensityLimit,
double mzTolerance)
Returns the spectrum annotations of a spectrum in a list of IonMatches Note that, except for +1 precursors, fragments ions will be expected to have a charge strictly smaller than the precursor ion charge. |
static String |
getTheoreticFragmentKey(PeptideFragmentIon fragmentIon,
int charge)
Returns the key of a theoretic fragment |
boolean |
isAccounted(NeutralLossesMap neutralLosses,
NeutralLoss neutralLoss,
PeptideFragmentIon fragmentIon,
Peptide peptide)
Returns a boolean indicating whether the neutral loss should be accounted for |
boolean |
lossesValidated(NeutralLossesMap neutralLosses,
PeptideFragmentIon fragmentIon,
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 |
ArrayList<IonMatch> |
matchPeak(Peptide peptide,
ArrayList<PeptideFragmentIon.PeptideFragmentIonType> iontypes,
ArrayList<Integer> charges,
int precursorCharge,
NeutralLossesMap neutralLosses,
Peak peak,
double massTolerance)
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SEPARATOR
Constructor Detail |
---|
public SpectrumAnnotator()
Method Detail |
---|
public ArrayList<IonMatch> matchPeak(Peptide peptide, ArrayList<PeptideFragmentIon.PeptideFragmentIonType> iontypes, ArrayList<Integer> charges, int precursorCharge, NeutralLossesMap neutralLosses, Peak peak, double massTolerance)
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 matchmassTolerance
- The mass tolerance to use (in Dalton)
public static Vector<DefaultSpectrumAnnotation> getSpectrumAnnotation(ArrayList<IonMatch> ionMatches)
ionMatches
- list of ion matches
public void setPeptide(Peptide peptide, int precursorCharge)
peptide
- the new peptideprecursorChareg
- the new precursor chargepublic static NeutralLossesMap getDefaultLosses(Peptide peptide)
peptide
- the peptide of interest
public boolean isAccounted(NeutralLossesMap neutralLosses, NeutralLoss neutralLoss, PeptideFragmentIon fragmentIon, Peptide peptide)
neutralLosses
- Map of expected neutral lossesneutralLoss
- the neutral loss of interestfragmentIon
- the fragment ion of interestpeptide
- the peptide of interest
public boolean lossesValidated(NeutralLossesMap neutralLosses, PeptideFragmentIon fragmentIon, Peptide peptide)
neutralLosses
- Map of expected neutral losses: neutral loss.fragmentIon
- the fragment ion of interestpeptide
- the inspected peptide
public boolean chargeValidated(PeptideFragmentIon fragmentIon, int charge)
fragmentIon
- the fragment ion of interestcharge
- the candidate charge
public ArrayList<IonMatch> getSpectrumAnnotation(ArrayList<PeptideFragmentIon.PeptideFragmentIonType> expectedFragmentIons, NeutralLossesMap neutralLosses, ArrayList<Integer> charges, int precursorCharge, MSnSpectrum spectrum, Peptide peptide, double intensityLimit, double mzTolerance)
expectedFragmentIons
- 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 chargesspectrum
- The spectrum to matchpeptide
- The peptide of interestintensityLimit
- The intensity limit to usemzTolerance
- The m/z tolerance to use
public HashMap<Integer,ArrayList<PeptideFragmentIon>> getExpectedIons(ArrayList<PeptideFragmentIon.PeptideFragmentIonType> expectedFragmentIons, NeutralLossesMap neutralLosses, ArrayList<Integer> charges, int precursorCharge, Peptide peptide)
expectedFragmentIons
- 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 chargespeptide
- The peptide of interestprecursorCharge
- The precursor charge
public ArrayList<IonMatch> getCurrentAnnotation(ArrayList<PeptideFragmentIon.PeptideFragmentIonType> expectedFragmentIons, NeutralLossesMap neutralLosses, ArrayList<Integer> charges)
expectedFragmentIons
- 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 charges
public static String getTheoreticFragmentKey(PeptideFragmentIon fragmentIon, int charge)
fragmentIon
- the theoretic fragment ioncharge
- the charge of the theoretic fragment
public String getCurrentlyLoadedSpectrumKey()
public Peptide getCurrentlyLoadedPeptide()
public double getMassShift()
public void setMassShift(double massShift)
massShift
- the m/z shift to apply
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |