Search in sources :

Example 1 with ExtendedIsotopePatternDataSet

use of net.sf.mzmine.modules.visualization.spectra.simplespectra.datasets.ExtendedIsotopePatternDataSet in project mzmine2 by mzmine.

the class IsotopePeakScannerSetupDialog method updateChart.

private void updateChart(ExtendedIsotopePattern pattern) {
    dataset = new ExtendedIsotopePatternDataSet(pattern, minIntensity, mergeWidth);
    chart = ChartFactory.createXYBarChart("Isotope pattern preview", "m/z", false, "Abundance", dataset);
    formatChart();
    pnlChart.setChart(chart);
}
Also used : ExtendedIsotopePatternDataSet(net.sf.mzmine.modules.visualization.spectra.simplespectra.datasets.ExtendedIsotopePatternDataSet)

Example 2 with ExtendedIsotopePatternDataSet

use of net.sf.mzmine.modules.visualization.spectra.simplespectra.datasets.ExtendedIsotopePatternDataSet in project mzmine2 by mzmine.

the class IsotopePatternPreviewDialog method updateChart.

/**
 * this is being called by the calculation task to update the pattern
 * @param pattern
 */
protected void updateChart(ExtendedIsotopePattern pattern) {
    dataset = new ExtendedIsotopePatternDataSet(pattern, minIntensity, mergeWidth);
    if (pol == PolarityType.NEUTRAL)
        chart = ChartFactory.createXYBarChart("Isotope pattern preview", "Exact mass / Da", false, "Abundance", dataset);
    else
        chart = ChartFactory.createXYBarChart("Isotope pattern preview", "m/z", false, "Abundance", dataset);
    formatChart();
    pnlChart.setChart(chart);
}
Also used : ExtendedIsotopePatternDataSet(net.sf.mzmine.modules.visualization.spectra.simplespectra.datasets.ExtendedIsotopePatternDataSet)

Example 3 with ExtendedIsotopePatternDataSet

use of net.sf.mzmine.modules.visualization.spectra.simplespectra.datasets.ExtendedIsotopePatternDataSet in project mzmine2 by mzmine.

the class SpectraToolTipGenerator method generateToolTip.

/**
 * @see org.jfree.chart.labels.XYToolTipGenerator#generateToolTip(org.jfree.data.xy.XYDataset,
 *      int, int)
 */
public String generateToolTip(XYDataset dataset, int series, int item) {
    double intValue = dataset.getYValue(series, item);
    double mzValue = dataset.getXValue(series, item);
    if (dataset instanceof PeakListDataSet) {
        PeakListDataSet peakListDataSet = (PeakListDataSet) dataset;
        Feature peak = peakListDataSet.getPeak(series, item);
        PeakList peakList = peakListDataSet.getPeakList();
        PeakListRow row = peakList.getPeakRow(peak);
        String tooltip = "Peak: " + peak + "\nStatus: " + peak.getFeatureStatus() + "\nFeature list row: " + row + "\nData point m/z: " + mzFormat.format(mzValue) + "\nData point intensity: " + intensityFormat.format(intValue);
        return tooltip;
    }
    if (dataset instanceof IsotopesDataSet) {
        IsotopesDataSet isotopeDataSet = (IsotopesDataSet) dataset;
        IsotopePattern pattern = isotopeDataSet.getIsotopePattern();
        double relativeIntensity = intValue / pattern.getHighestDataPoint().getIntensity() * 100;
        String tooltip = "Isotope pattern: " + pattern.getDescription() + "\nStatus: " + pattern.getStatus() + "\nData point m/z: " + mzFormat.format(mzValue) + "\nData point intensity: " + intensityFormat.format(intValue) + "\nRelative intensity: " + percentFormat.format(relativeIntensity) + "%";
        return tooltip;
    }
    if (dataset instanceof ExtendedIsotopePatternDataSet) {
        return "Isotope pattern: " + ((ExtendedIsotopePatternDataSet) dataset).getIsotopePattern().getDescription() + "\nm/z: " + mzFormat.format(mzValue) + "\nIdentity: " + ((ExtendedIsotopePatternDataSet) dataset).getItemDescription(series, item) + "\nRelative intensity: " + percentFormat.format((dataset.getY(series, item).doubleValue() * 100)) + "%";
    }
    String tooltip = "m/z: " + mzFormat.format(mzValue) + "\nIntensity: " + intensityFormat.format(intValue);
    return tooltip;
}
Also used : ExtendedIsotopePatternDataSet(net.sf.mzmine.modules.visualization.spectra.simplespectra.datasets.ExtendedIsotopePatternDataSet) PeakListRow(net.sf.mzmine.datamodel.PeakListRow) PeakListDataSet(net.sf.mzmine.modules.visualization.spectra.simplespectra.datasets.PeakListDataSet) IsotopePattern(net.sf.mzmine.datamodel.IsotopePattern) IsotopesDataSet(net.sf.mzmine.modules.visualization.spectra.simplespectra.datasets.IsotopesDataSet) PeakList(net.sf.mzmine.datamodel.PeakList) Feature(net.sf.mzmine.datamodel.Feature)

Aggregations

ExtendedIsotopePatternDataSet (net.sf.mzmine.modules.visualization.spectra.simplespectra.datasets.ExtendedIsotopePatternDataSet)3 Feature (net.sf.mzmine.datamodel.Feature)1 IsotopePattern (net.sf.mzmine.datamodel.IsotopePattern)1 PeakList (net.sf.mzmine.datamodel.PeakList)1 PeakListRow (net.sf.mzmine.datamodel.PeakListRow)1 IsotopesDataSet (net.sf.mzmine.modules.visualization.spectra.simplespectra.datasets.IsotopesDataSet)1 PeakListDataSet (net.sf.mzmine.modules.visualization.spectra.simplespectra.datasets.PeakListDataSet)1