Class MassErrorBubblePlot

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class MassErrorBubblePlot
extends JPanel
Creates a MassErrorBubblePlot displaying the mz values vs the mass error with the intensity as the size of the bubbles.
Author:
Harald Barsnes
See Also:
Serialized Form
  • Field Details

  • Constructor Details

    • MassErrorBubblePlot

      public MassErrorBubblePlot()
      Empty default constructor
    • MassErrorBubblePlot

      public MassErrorBubblePlot​(ArrayList<String> dataIndexes, ArrayList<IonMatch[]> annotations, ArrayList<Spectrum> currentSpectra, double massTolerance, boolean fragmentIonLabels, boolean addMarkers)
      Creates a new MassErrorBubblePlot.
      Parameters:
      dataIndexes - the data set indexes/labels
      annotations - the full list of spectrum annotations
      currentSpectra - the current spectra
      massTolerance - the mass error tolerance
      fragmentIonLabels - if true, the fragment ion type is used as the data series key, otherwise the psm index is used
      addMarkers - if true interval markers for the fragment ions will be shown
    • MassErrorBubblePlot

      public MassErrorBubblePlot​(ArrayList<String> dataIndexes, ArrayList<IonMatch[]> annotations, ArrayList<Spectrum> currentSpectra, double massTolerance, boolean fragmentIonLabels, boolean addMarkers, boolean useRelativeError)
      Creates a new MassErrorBubblePlot.
      Parameters:
      dataIndexes - the data set indexes/labels
      annotations - the full list of spectrum annotations
      currentSpectra - the current spectra
      massTolerance - the mass error tolerance
      fragmentIonLabels - if true, the fragment ion type is used as the data series key, otherwise the psm index is used
      addMarkers - if true interval markers for the fragment ions will be shown
      useRelativeError - if true the relative error (ppm) is used instead of the absolute error (Da)
    • MassErrorBubblePlot

      public MassErrorBubblePlot​(ArrayList<String> dataIndexes, ArrayList<IonMatch[]> annotations, ArrayList<Spectrum> currentSpectra, double massTolerance, double bubbleScale, boolean fragmentIonLabels, boolean addMarkers, boolean useRelativeError)
      Creates a new MassErrorBubblePlot.
      Parameters:
      dataIndexes - the data set indexes/labels
      annotations - the full list of spectrum annotations
      currentSpectra - the current spectra
      massTolerance - the mass error tolerance
      bubbleScale - the bubble scale value
      fragmentIonLabels - if true, the fragment ion type is used as the data series key, otherwise the psm index is used
      addMarkers - if true interval markers for the fragment ions will be shown
      useRelativeError - if true the relative error (ppm) is used instead of the absolute error (Da)
  • Method Details

    • addFragmentIonTypeMarkers

      public static void addFragmentIonTypeMarkers​(HashMap<IonMatch,​ArrayList<XYZDataPoint>> data, org.jfree.chart.JFreeChart chart, boolean showMarkers)
      Adds interval markers for all the fragment ion types.
      Parameters:
      data - the data to get the interval markers from
      chart - the chart to add the markers to
      showMarkers - if true interval markers for the fragment ions will be added
    • getNumberOfDataPointsInPlot

      public int getNumberOfDataPointsInPlot()
      Returns the current number of data points in the mass error plot.
      Returns:
      the current number of data points
    • addXYZDataSeries

      public org.jfree.data.xy.DefaultXYZDataset addXYZDataSeries​(HashMap<IonMatch,​ArrayList<XYZDataPoint>> data)
      Adds the provided data series to an XYZ data set.
      Parameters:
      data - the data to add
      Returns:
      the created data set
    • getChartPanel

      public org.jfree.chart.ChartPanel getChartPanel()
      Returns the chart panel.
      Returns:
      the chart panel