Class TagSpectrumAnnotator
java.lang.Object
com.compomics.util.experiment.identification.spectrum_annotation.SpectrumAnnotator
com.compomics.util.experiment.identification.spectrum_annotation.spectrum_annotators.TagSpectrumAnnotator
public class TagSpectrumAnnotator extends SpectrumAnnotator
Annotates a spectrum with information from a tag.
- Author:
- Marc Vaudel
-
Nested Class Summary
Nested classes/interfaces inherited from class com.compomics.util.experiment.identification.spectrum_annotation.SpectrumAnnotator
SpectrumAnnotator.TiesResolution
-
Field Summary
Fields inherited from class com.compomics.util.experiment.identification.spectrum_annotation.SpectrumAnnotator
defaultPrecursorCharges, fragmentFactory, intensityLimit, ionMatchKeysCache, isPpm, massShift, massShiftCTerm, massShiftNTerm, MAX_ISOTOPIC_CORRRECTION, MIN_ISOTOPIC_CORRRECTION, mzTolerance, precursorCharge, specificAnnotationSettings, spectrumFile, spectrumTitle, SUBTRACT_ISOTOPE, theoreticalFragmentIons, tiesResolution
-
Constructor Summary
Constructors Constructor Description TagSpectrumAnnotator()
Empty default constructor -
Method Summary
Modifier and Type Method Description IonMatch[]
getCurrentAnnotation(String spectrumFile, String spectrumTitle, Spectrum spectrum, AnnotationParameters annotationSettings, SpecificAnnotationParameters specificAnnotationSettings, ModificationParameters modificationParameters, SequenceProvider sequenceProvider, SequenceMatchingParameters modificationsSequenceMatchingParameters, boolean useIntensityFilter)
Returns the currently matched ions with the given settings.static NeutralLossesMap
getDefaultLosses(Tag tag, ModificationParameters modificationParameters, SequenceMatchingParameters modificationsSequenceMatchingParameters)
Returns the possible neutral losses expected by default for a given tag.IonMatch[]
getSpectrumAnnotation(AnnotationParameters annotationSettings, ModificationParameters modificationParameters, SequenceMatchingParameters modificationsSequenceMatchingParameters, SpecificAnnotationParameters specificAnnotationSettings, String spectrumFile, String spectrumTitle, Spectrum spectrum, Tag tag)
Returns the spectrum annotations of a spectrum in a list of IonMatches using an intensity filter.IonMatch[]
getSpectrumAnnotation(AnnotationParameters annotationSettings, ModificationParameters modificationParameters, SequenceMatchingParameters modificationsSequenceMatchingParameters, SpecificAnnotationParameters specificAnnotationSettings, String spectrumFile, String spectrumTitle, Spectrum spectrum, Tag tag, boolean useIntensityFilter)
Returns the spectrum annotations of a spectrum in a list of IonMatches.Tag
getTag()
Returns the tag to annotate.void
setTag(Tag newTag, ModificationParameters modificationParameters, SequenceMatchingParameters modificationsSequenceMatchingParameters, int precursorCharge)
Sets a new tag to match.Methods inherited from class com.compomics.util.experiment.identification.spectrum_annotation.SpectrumAnnotator
chargeValidated, getCurrentAnnotation, getCurrentlyLoadedSpectrumFile, getCurrentlyLoadedSpectrumTitle, getDefaultLosses, getExpectedIons, getMassShift, getMassShiftCTerm, getMassShiftNTerm, getSpectrumAnnotation, isAccounted, lossesValidated, matchInSpectrum, matchPeak, matchReporterIon, setBestPeak, setMassShift, setMassShifts, setMassTolerance, setSpectrum, setTerminalMassShifts, updateMassShifts
-
Constructor Details
-
TagSpectrumAnnotator
public TagSpectrumAnnotator()Empty default constructor
-
-
Method Details
-
getTag
Returns the tag to annotate.- Returns:
- the tag to annotate
-
setTag
public void setTag(Tag newTag, ModificationParameters modificationParameters, SequenceMatchingParameters modificationsSequenceMatchingParameters, int precursorCharge)Sets a new tag to match.- Parameters:
newTag
- the new tagmodificationParameters
- the modification parameters the modification parametersmodificationsSequenceMatchingParameters
- the sequence matching parameters to use for modificationsprecursorCharge
- the new precursor charge
-
getDefaultLosses
public static NeutralLossesMap getDefaultLosses(Tag tag, ModificationParameters modificationParameters, SequenceMatchingParameters modificationsSequenceMatchingParameters)Returns the possible neutral losses expected by default for a given tag. /!\ this method will work only if the modification found in the tag are in the factory.- Parameters:
tag
- the tag of interestmodificationParameters
- the modification parameters the modification parametersmodificationsSequenceMatchingParameters
- the sequence matching parameters to use for modifications- Returns:
- the expected possible neutral losses
-
getSpectrumAnnotation
public IonMatch[] getSpectrumAnnotation(AnnotationParameters annotationSettings, ModificationParameters modificationParameters, SequenceMatchingParameters modificationsSequenceMatchingParameters, SpecificAnnotationParameters specificAnnotationSettings, String spectrumFile, String spectrumTitle, Spectrum spectrum, Tag tag)Returns the spectrum annotations of a spectrum in a list of IonMatches using an intensity filter. Note that, except for +1 precursors, fragments ions will be expected to have a charge strictly smaller than the precursor ion charge.- Parameters:
annotationSettings
- the annotation settingsmodificationParameters
- the modification parameters the modification parametersmodificationsSequenceMatchingParameters
- the sequence matching parameters to use for modificationsspecificAnnotationSettings
- the specific annotation settingsspectrumFile
- the file of the spectrum to annotatespectrumTitle
- the title of the spectrum to annotatespectrum
- the spectrum to matchtag
- the tag of interest- Returns:
- an ArrayList of IonMatch containing the ion matches with the given settings
-
getSpectrumAnnotation
public IonMatch[] getSpectrumAnnotation(AnnotationParameters annotationSettings, ModificationParameters modificationParameters, SequenceMatchingParameters modificationsSequenceMatchingParameters, SpecificAnnotationParameters specificAnnotationSettings, String spectrumFile, String spectrumTitle, Spectrum spectrum, Tag tag, boolean useIntensityFilter)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.- Parameters:
annotationSettings
- the annotation settingsmodificationParameters
- the modification parameters the modification parametersmodificationsSequenceMatchingParameters
- the sequence matching parameters to use for modificationsspecificAnnotationSettings
- the specific annotation settingsspectrumFile
- the file of the spectrum to annotatespectrumTitle
- the title of the spectrum to annotatespectrum
- the spectrum to annotatetag
- the tag of interestuseIntensityFilter
- boolean indicating whether intensity filters should be used- Returns:
- an ArrayList of IonMatch containing the ion matches with the given settings
-
getCurrentAnnotation
public IonMatch[] getCurrentAnnotation(String spectrumFile, String spectrumTitle, Spectrum spectrum, AnnotationParameters annotationSettings, SpecificAnnotationParameters specificAnnotationSettings, ModificationParameters modificationParameters, SequenceProvider sequenceProvider, SequenceMatchingParameters modificationsSequenceMatchingParameters, boolean useIntensityFilter)Description copied from class:SpectrumAnnotator
Returns the currently matched ions with the given settings.- Specified by:
getCurrentAnnotation
in classSpectrumAnnotator
- Parameters:
spectrumFile
- the file of the spectrum to annotatespectrumTitle
- the title of the spectrum to annotatespectrum
- the spectrum to annotateannotationSettings
- the annotation settingsspecificAnnotationSettings
- the specific annotation settingsmodificationParameters
- the modification parameters the modification parameterssequenceProvider
- a protein sequence providermodificationsSequenceMatchingParameters
- the sequence matching parameters to use for modificationsuseIntensityFilter
- boolean indicating whether intensity filters should be used- Returns:
- the currently matched ions with the given settings
-