Skip to content

Dev#556

Merged
ypriverol merged 2 commits intomainfrom
dev
Jan 18, 2026
Merged

Dev#556
ypriverol merged 2 commits intomainfrom
dev

Conversation

@ypriverol
Copy link
Member

@ypriverol ypriverol commented Jan 18, 2026

Pull Request

Description

Brief description of the changes made in this PR.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Code refactoring
  • Test addition/update
  • Updates to the dependencies has been done.

Summary by CodeRabbit

  • Refactor
    • Optimized peptide length calculations using vectorized operations for improved processing performance across data analysis modules.

✏️ Tip: You can customize this high-level summary in your review settings.

@ypriverol ypriverol merged commit a9753c1 into main Jan 18, 2026
11 of 12 checks passed
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 18, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This pull request optimizes peptide length computations in DIA and MS/mztab modules by replacing per-row lambda operations with vectorized str.len() calls, and removes the draw_dia_heatmap wrapper function in favor of direct function calls.

Changes

Cohort / File(s) Summary
DIA Utilities Optimization & Cleanup
pmultiqc/modules/common/dia_utils.py
Vectorized peptide length computation using str.len() for improved performance; flipped column membership check style; removed draw_dia_heatmap wrapper function requiring direct calls to cal_dia_heatmap and dia_plots.draw_heatmap
MSTab Vectorization
pmultiqc/modules/common/ms/mztab.py
Optimized pep_length computation from per-row apply(lambda) to vectorized str.len() operation

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Major improvements in DIA #358 — Converts per-row sequence operations to vectorized approaches and modifies heatmap-related logic in DIA code, mirroring the optimization pattern in this PR.
  • Fix bugs and add heatmap in DIA #324 — Introduces draw_dia_heatmap wrapper and related heatmap functions that this PR removes in favor of direct function calls.

Suggested labels

Review effort 2/5

Suggested reviewers

  • daichengxin

Poem

🐰 Peptides lined up, row by row,
Now vectorized—much faster flow!
Wrapper gone, direct calls remain,
Performance gains, efficiency's gain! ⚡

✨ Finishing touches
  • 📝 Generate docstrings

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