Repository navigation
[PERF] OSW reading: Percolator peak groups by table scans, export aggregates only exported peak groups - #10609
Conversation
…scans For ms1/ms2/ms1ms2 rescoring the peak groups were read with one query that joins FEATURE, PRECURSOR, FEATURE_MS2 and FEATURE_MS1 and orders the result by run, precursor, RT and feature id. For the 2.9 M peak groups of one Astral DIA run SQLite scans FEATURE_MS2, looks every row up in the FEATURE index (the ids are random), builds a covering index on FEATURE_MS1 on the fly and sorts everything in a temporary B-tree: about 50 s, against 16 s for reading the four tables front to back. Read the tables one after the other, join them by feature id in a hash map and sort the rows with the same key in memory. Join semantics are kept (inner join with PRECURSOR and with the score table of the level, left join with FEATURE_MS1 for ms1ms2, NULL as NaN); if a feature has more than one row in a score table, where the SQL join would return every combination, the original query is used. Measured with OpenDIA on an Orbitrap Astral DIA run (600k precursors): rescoring takes 176 s instead of 219 s, the result table is unchanged (apart from the random feature ids). Co-Authored-By: Claude Opus 5.5 <[email protected]>
readOpenSwathExportRows() built the per-feature transition aggregates (areas, apexes and annotations, joined with GROUP_CONCAT) for every peak group in the file and then looked up the exported ones. With a q-value filter the export keeps a small part of them: 1,474 of 2.9 M peak groups in an Astral DIA run, for which 17 M FEATURE_TRANSITION rows were grouped. If at most 100,000 rows are exported, run the same aggregation once per exported peak group (FEATURE_ID = ?, served by the feature id index that the export creates anyway); otherwise keep the single query over the whole table. Measured with OpenDIA on an Orbitrap Astral DIA run: the result export takes 30 s instead of 72 s, and the result table, including the aggregated columns, is unchanged apart from the random feature ids. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The entries from #10559 for the changes of this branch. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YEL28EKUFAAs9SNwbVEV9s
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 54 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
timosachsenberg
left a comment
There was a problem hiding this comment.
Reviewed 69f28793 for substantive issues. No actionable findings in the table-scan joins or export aggregation changes. I checked the required versus optional score-table rows, duplicate-row SQL fallback, group-key construction, and the existing FEATURE_TRANSITION indexes used by the per-feature queries.
Build and Test and the pyOpenMS wheel workflow passed on this head. This was a static review; I did not rerun the tests or benchmarks locally.
…#10301, #10611, #10606, #10608, #10609, #10617, #10610, #10578 ProSE Percolator rescoring, #10628) Only CHANGELOG conflicted; both entries are kept. Develop's changes to FalseDiscoveryRate, IDScoreGetterSetter, ConsensusMapMergerAlgorithm, FileInfo and ProSE work on the established classes, which this branch keeps as they are. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01B51nRFoHvZuVXD7cT8XZav
Split out of #10559 (which is closed in favour of six PRs against develop). The commits are those of #10559, cherry-picked onto develop 89cbde6; only the CHANGELOG entries were moved into a commit of their own. The measurements below were taken in #10559 on the three Orbitrap Astral DIA runs of the ProteoBench entrapment set (32 threads), where #10559 at b84b51e passed the full CI.
What
Faster reading of OSW files in rescoring and export. Output is unchanged.
Open from the review of #10559
CodeRabbit's nitpick on
OSWFile.cpp(the per-feature aggregation does not checksqlite3_steperrors) was not addressed in #10559.Commits
Generated by Claude Code