Skip to content

Conversation

@t0mdavid-m
Copy link
Member

@t0mdavid-m t0mdavid-m commented Oct 5, 2025

Summary by CodeRabbit

  • New Features

    • Added a TIC Chromatogram view for visualizing total ion current.
    • Sequence-dependent views now appear when sequence data is provided: “Sequence view (Mass table needed)” and “Internal fragment map (Mass table needed)”.
  • Performance

    • Improved data loading and processing with streaming collection for large datasets, reducing memory usage and speeding up heatmap and compression steps.
  • Chores

    • Internal wiring to initialize and render the new TIC Chromatogram using the generated TIC data.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 5, 2025

Walkthrough

Introduces a TIC Chromatogram feature across parsing and rendering: computes per-scan TIC from MS1/MS2 heatmaps, exposes a new component and routing, and wires data into the renderer. Additionally switches some Polars collect() calls to collect(streaming=True) in parsing and compression.

Changes

Cohort / File(s) Summary
TIC Chromatogram feature (exposed + rendering)
content/FLASHDeconv/FLASHDeconvLayoutManager.py, src/render/components.py, src/render/initialize.py
Layout manager: adds "TIC Chromatogram" (tic_chromatogram) to public options/names; setSequenceView() appends two sequence-dependent entries. Components: adds Chromatogram class (title='TIC', componentName='TICChromatogram'). Initialize: handles tic_chromatogram by fetching 'tic' data, populating data_to_send['tic'], and instantiating Chromatogram().
TIC data construction (parsing)
src/parse/deconv.py
Builds TIC table by loading ms1/ms2 raw heatmaps, labeling levels, dropping mass fields, concatenating, grouping by scan_idx to compute rt (first), level (first), and tic (sum of intensity), sorting, and storing as tic. Also updates a heatmap collect to collect(streaming=True).lazy().
Streaming materialization (rendering compression)
src/render/compression.py
Changes LazyFrame materialization from sorted_data.collect() to sorted_data.collect(streaming=True) before NumPy conversions; no other logic changes.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant UI as UI / Layout Manager
  participant Init as Renderer Initialize
  participant DS as Dataset Store
  participant Comp as Chromatogram Component

  User->>UI: Select "TIC Chromatogram"
  UI->>Init: Request component init (tic_chromatogram)
  Note over DS: Parsing step (earlier):<br/>Compute TIC by grouping MS1/MS2 heatmaps<br/>per scan_idx and summing intensity
  Init->>DS: Fetch 'tic' data
  DS-->>Init: TIC table (scan_idx, rt, level, tic)
  Init->>Comp: Instantiate Chromatogram(title='TIC')
  Init-->>UI: component_arguments + data_to_send['tic']
  UI-->>User: Render TIC Chromatogram
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

I sniff the peaks where currents flow,
A river of ions in tidy rows.
New charts bloom—TIC aglow—
I thump my foot: “Onwards, go!”
With streaming streams and scans aligned,
I hop through data, ears refined.
Plot, nibble, render—perfectly timed. 🐇📈

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title “Add TicChromaogram” attempts to summarize the addition of a TIC chromatogram component but contains a typo, merges words, and does not clearly convey the acronym or component context, making it confusing despite being related to the changeset. Rename the title to something clear and correctly spelled such as “Add TIC Chromatogram component” to accurately reflect the primary change and improve readability.
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add_tic_component

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 99dd5a2 and ac399de.

📒 Files selected for processing (5)
  • content/FLASHDeconv/FLASHDeconvLayoutManager.py (2 hunks)
  • src/parse/deconv.py (2 hunks)
  • src/render/components.py (1 hunks)
  • src/render/compression.py (1 hunks)
  • src/render/initialize.py (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
src/render/initialize.py (2)
src/render/components.py (3)
  • FDRPlotly (69-72)
  • FLASHQuant (98-101)
  • Chromatogram (104-107)
src/workflow/FileManager.py (1)
  • get_results (428-478)
src/parse/deconv.py (1)
src/workflow/FileManager.py (2)
  • get_results (428-478)
  • store_data (327-345)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build-openms
  • GitHub Check: build-full-app

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants