Skip to content

Commit

Permalink
Issue 553: Save compounds to mzrollDB file.
Browse files Browse the repository at this point in the history
  • Loading branch information
PMSeitzer committed Jul 13, 2022
1 parent 9213eb6 commit 6127801
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/peakdetector/peakdetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1289,13 +1289,17 @@ void writeReport(string setName) {
if (isSpecialSearch()) {
project->deleteSearchResults(tblName);
project->savePeakGroupsTableData(searchTableData);

set<Compound*> 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());
}
Expand All @@ -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<Compound*> 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());
}
Expand Down

0 comments on commit 6127801

Please sign in to comment.