From e64c8647099bd6d2b03d66039cf559acdb454646 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Thu, 24 Feb 2022 15:55:12 +0100 Subject: [PATCH] Add external quantitation reference entry to area % report. --- .../report/supplier/txt/io/ReportWriter2.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.report.supplier.txt/src/org/eclipse/chemclipse/chromatogram/xxd/report/supplier/txt/io/ReportWriter2.java b/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.report.supplier.txt/src/org/eclipse/chemclipse/chromatogram/xxd/report/supplier/txt/io/ReportWriter2.java index 66090f2139..4aa4a230c1 100644 --- a/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.report.supplier.txt/src/org/eclipse/chemclipse/chromatogram/xxd/report/supplier/txt/io/ReportWriter2.java +++ b/chemclipse/plugins/org.eclipse.chemclipse.chromatogram.xxd.report.supplier.txt/src/org/eclipse/chemclipse/chromatogram/xxd/report/supplier/txt/io/ReportWriter2.java @@ -32,6 +32,7 @@ import org.eclipse.chemclipse.model.core.IPeakModel; import org.eclipse.chemclipse.model.identifier.IIdentificationTarget; import org.eclipse.chemclipse.model.identifier.ILibraryInformation; +import org.eclipse.chemclipse.model.quantitation.IQuantitationEntry; import org.eclipse.chemclipse.msd.model.core.IChromatogramMSD; import org.eclipse.chemclipse.msd.model.core.IChromatogramPeakMSD; import org.eclipse.chemclipse.msd.model.core.IPeakModelMSD; @@ -113,6 +114,8 @@ private void printAreaPercentList(PrintWriter printWriter, IChromatogram quantitationEntries = peak.getQuantitationEntries(); + if(!quantitationEntries.isEmpty()) { + area = quantitationEntries.get(0).getArea(); + } + // + return area; + } + private double getPercentagePeakArea(IChromatogram chromatogram, IPeak peak) { double peakAreaPercent = 0.0d;