|
||||||||||
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,
HashMap<NeutralLoss,Integer> 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 HashMap<NeutralLoss,Integer> |
getDefaultLosses(Peptide peptide)
Returns the possible neutral losses expected by default for a given peptide |
static HashMap<NeutralLoss,Integer> |
getDefaultLosses(Peptide peptide,
ArrayList<NeutralLoss> imposedNeutralLosses)
Returns the neutral losses map by default for a given peptide and a given list of neutral losses |
HashMap<Integer,ArrayList<PeptideFragmentIon>> |
getExpectedIons(ArrayList<PeptideFragmentIon.PeptideFragmentIonType> expectedFragmentIons,
HashMap<NeutralLoss,Integer> neutralLosses,
ArrayList<Integer> charges,
Peptide peptide,
int precursorCharge)
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. |
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,
HashMap<NeutralLoss,Integer> neutralLosses,
ArrayList<Integer> charges,
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(HashMap<NeutralLoss,Integer> neutralLosses,
NeutralLoss neutralLoss,
PeptideFragmentIon fragmentIon,
Peptide peptide)
Returns a boolean indicating whether the neutral loss should be accounted for |
boolean |
lossesValidated(HashMap<NeutralLoss,Integer> 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,
HashMap<NeutralLoss,Integer> neutralLosses,
Peak peak,
double massTolerance)
This method matches the potential fragment ions of a given peptide with a given peak. |
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, HashMap<NeutralLoss,Integer> neutralLosses, Peak peak, double massTolerance)
peptide
- The peptidefragmentTypes
- The fragment ions selectedcharge
- The charges of the fragment to search forneutralLosses
- 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 static HashMap<NeutralLoss,Integer> getDefaultLosses(Peptide peptide, ArrayList<NeutralLoss> imposedNeutralLosses)
peptide
- the peptide of interestimposedNeutralLosses
- a given list of neutral losses
public static HashMap<NeutralLoss,Integer> getDefaultLosses(Peptide peptide)
peptide
- the peptide of interest
public boolean isAccounted(HashMap<NeutralLoss,Integer> neutralLosses, NeutralLoss neutralLoss, PeptideFragmentIon fragmentIon, Peptide peptide)
neutralLosses
- 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.neutralLoss
- the neutral loss of interestfragmentIon
- the fragment ion of interestpeptide
- the peptide of interest
public boolean lossesValidated(HashMap<NeutralLoss,Integer> neutralLosses, PeptideFragmentIon fragmentIon, Peptide peptide)
neutralLosses
- 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.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, HashMap<NeutralLoss,Integer> neutralLosses, ArrayList<Integer> charges, 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, HashMap<NeutralLoss,Integer> neutralLosses, ArrayList<Integer> charges, Peptide peptide, int precursorCharge)
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 interestintensityLimit
- The intensity limit to usemzTolerance
- The m/z tolerance to use
public ArrayList<IonMatch> getCurrentAnnotation(ArrayList<PeptideFragmentIon.PeptideFragmentIonType> expectedFragmentIons, HashMap<NeutralLoss,Integer> 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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |