Class SequenceFragmentationPanel

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.compomics.util.gui.spectrum.SequenceFragmentationPanel
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class SequenceFragmentationPanel
extends JPanel
This class was imported from the Peptizer and MascotDatfile parser, and was developed to display fragmentation information on the modified sequence as inspired by X!Tandem.
Author:
Kenny Helsens, Lennart Martens, Harald Barsnes, Marc Vaudel
See Also:
Serialized Form
  • Constructor Details

    • SequenceFragmentationPanel

      public SequenceFragmentationPanel()
      Empty default constructor
    • SequenceFragmentationPanel

      public SequenceFragmentationPanel​(String aSequence, IonMatch[] aIonMatches, boolean boolModifiedSequence, boolean aHighlightModifications, ModificationParameters modificationProfile, int forwardIon, int rewindIon)
      Creates a new SequenceFragmentationPanel working with B and Y ions.
      Parameters:
      aSequence - String with the Modified Sequence of an peptide identification.
      aIonMatches - Array with fragment ion matches.
      boolModifiedSequence - boolean describing the sequence. This constructor can be used to enter a ModifiedSequence or a normal sequence.
      aHighlightModifications - boolean decides whether the modification are highlighted by adding a star above the modified residue instead if displaying the PTM short name
      modificationProfile - the modification profile
      forwardIon - the forward ion type (for instance B ion) as indexed by the PeptideFragmentIon static fields
      rewindIon - the rewind ion type (for instance Y ion) as indexed by the PeptideFragmentIon static fields
      See Also:
      GraphicsEnvironment.isHeadless(), JComponent.getDefaultLocale()
    • SequenceFragmentationPanel

      public SequenceFragmentationPanel​(String taggedModifiedSequence, IonMatch[] aIonMatches, boolean aHighlightModifications, ModificationParameters modificationProfile, int forwardIon, int rewindIon) throws HeadlessException
      Creates a new SequenceFragmentationPanel working with B and Y ions.
      Parameters:
      taggedModifiedSequence - the tagged modified peptide sequence
      aIonMatches - Array with fragment ion matches.
      aHighlightModifications - boolean decides whether the modification are highlighted by adding a star above the modified residue instead if displaying the PTM short name
      modificationProfile - the modification profile
      forwardIon - the forward ion type (for instance B ion) as indexed by the PeptideFragmentIon static fields
      rewindIon - the rewind ion type (for instance Y ion) as indexed by the PeptideFragmentIon static fields
      Throws:
      HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
      See Also:
      GraphicsEnvironment.isHeadless(), JComponent.getDefaultLocale()
  • Method Details

    • setPeptideSequenceFont

      public void setPeptideSequenceFont​(Font peptideSequenceFont)
      Set the font to use for the peptide sequence.
      Parameters:
      peptideSequenceFont - the font to use
    • setFontColor

      public void setFontColor​(Color fontColor)
      Set the color for the font of the peptide sequence.
      Parameters:
      fontColor - the font color
    • paint

      public void paint​(Graphics g)
      Paints the SequenceFragmentationPanel. Based on the given ModifiedSequence Components and Fragmentions, a visualization (inspired by X!Tandem) is drawn on a Graphics object. Next to every possible fragmentation site of the peptide a bar is drawn whether b or y ions were found originating from this fragmentation side.
      Overrides:
      paint in class JComponent
      Parameters:
      g - the specified Graphics window
      See Also:
      Component.update(java.awt.Graphics)
    • setSequence

      public void setSequence​(String lSequence, boolean boolModifiedSequence)
      Set the Sequence for the SequenceFragmentationPanel.
      Parameters:
      lSequence - String with peptide sequence.
      boolModifiedSequence - Boolean whether lSequence is a Modified Sequence "NH2-K<Ace>ENNY-COOH" or a Flat Sequence "KENNY".
    • setIonMatches

      public void setIonMatches​(IonMatch[] lIonMatches)
      Set the ArrayList with FragmentIon matches. The double[] indexing b and y ion intensities will be recalculated.
      Parameters:
      lIonMatches - ArrayList