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);
}
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);
}
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;
}
Aggregations