From 6127801b9954058edf646f664018ae441bea0623 Mon Sep 17 00:00:00 2001 From: Phillip Seitzer Date: Wed, 13 Jul 2022 15:10:34 -0700 Subject: [PATCH] Issue 553: Save compounds to mzrollDB file. --- src/peakdetector/peakdetector.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/peakdetector/peakdetector.cpp b/src/peakdetector/peakdetector.cpp index 55b21f34..abbe3575 100644 --- a/src/peakdetector/peakdetector.cpp +++ b/src/peakdetector/peakdetector.cpp @@ -1289,13 +1289,17 @@ void writeReport(string setName) { if (isSpecialSearch()) { project->deleteSearchResults(tblName); project->savePeakGroupsTableData(searchTableData); + + set compoundSet; for (auto& group : allgroups){ if (group.compound){ + compoundSet.insert(group.compound); project->writeGroupSqlite(&group, 0, tblName); } else { project->writeGroupSqlite(&group, 0, setName.c_str()); } } + project->saveCompounds(compoundSet); } else { project->saveGroups(allgroups, setName.c_str()); } @@ -1311,18 +1315,23 @@ void writeReport(string setName) { project->deleteAll(); project->setSamples(samples); project->saveSamples(samples); + + //this is only necessary if RT alignment is actually performed project->saveAlignment(); //~50% of time in writeReport() spent here if(saveScanData) project->saveScans(samples); //~50% of time in writeReport() spent here if (isSpecialSearch()) { + set compoundSet; for (auto& group : allgroups){ if (group.compound){ + compoundSet.insert(group.compound); project->writeGroupSqlite(&group, 0, tblName); } else { project->writeGroupSqlite(&group, 0, setName.c_str()); } } + project->saveCompounds(compoundSet); } else { project->saveGroups(allgroups, setName.c_str()); }