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
  • Constructor Details

  • Method Details

    • getTag

      public Tag 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 tag
      modificationParameters - the modification parameters the modification parameters
      modificationsSequenceMatchingParameters - the sequence matching parameters to use for modifications
      precursorCharge - 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 interest
      modificationParameters - the modification parameters the modification parameters
      modificationsSequenceMatchingParameters - 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 settings
      modificationParameters - the modification parameters the modification parameters
      modificationsSequenceMatchingParameters - the sequence matching parameters to use for modifications
      specificAnnotationSettings - the specific annotation settings
      spectrumFile - the file of the spectrum to annotate
      spectrumTitle - the title of the spectrum to annotate
      spectrum - the spectrum to match
      tag - 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 settings
      modificationParameters - the modification parameters the modification parameters
      modificationsSequenceMatchingParameters - the sequence matching parameters to use for modifications
      specificAnnotationSettings - the specific annotation settings
      spectrumFile - the file of the spectrum to annotate
      spectrumTitle - the title of the spectrum to annotate
      spectrum - the spectrum to annotate
      tag - the tag of interest
      useIntensityFilter - 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 class SpectrumAnnotator
      Parameters:
      spectrumFile - the file of the spectrum to annotate
      spectrumTitle - the title of the spectrum to annotate
      spectrum - the spectrum to annotate
      annotationSettings - the annotation settings
      specificAnnotationSettings - the specific annotation settings
      modificationParameters - the modification parameters the modification parameters
      sequenceProvider - a protein sequence provider
      modificationsSequenceMatchingParameters - the sequence matching parameters to use for modifications
      useIntensityFilter - boolean indicating whether intensity filters should be used
      Returns:
      the currently matched ions with the given settings