Skip to content

Mirnor changes for plexDIA and msstats #78

Merged
ypriverol merged 3 commits intomainfrom
dev
Apr 8, 2026
Merged

Mirnor changes for plexDIA and msstats #78
ypriverol merged 3 commits intomainfrom
dev

Conversation

@ypriverol
Copy link
Copy Markdown
Member

@ypriverol ypriverol commented Apr 8, 2026

Summary by CodeRabbit

Release Notes

  • New Features
    • Added support for multiplexed samples with isotope labels
    • SILAC label mapping now automatically processed
    • Enhanced peptide sequence handling for improved data quality
    • Improved experimental design detection and processing

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 8, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 837063c3-05dd-44a6-b93c-c7b97a91121e

📥 Commits

Reviewing files that changed from the base of the PR and between 39d82a1 and 3416884.

📒 Files selected for processing (1)
  • quantmsutils/diann/diann2msstats.py

📝 Walkthrough

Walkthrough

The diann2msstats.py module is enhanced to support multiplexed proteomics data and SILAC labeling. Changes include Parquet schema-based column detection, conditional multiplexing detection via the Channel column, peptide sequence sanitization, dynamic IsotopeLabelType handling, and adaptive design merging with label-aware keys.

Changes

Cohort / File(s) Summary
Multiplexing & Labeling Support
quantmsutils/diann/diann2msstats.py
Added Parquet schema detection to identify Decoy and Channel columns before reading. Implemented multiplexing detection via Channel presence and unique value count. Enhanced design table building with conditional Label column inclusion and SILAC mapping (light/medium/heavy → L/M/H). Made merge keys and column sets dynamic based on multiplexing status. Introduced sequence sanitization helper to remove (SILAC) substrings. Modified IsotopeLabelType handling with filtering for null values when present, or defaulting to "L" otherwise.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ParquetReader as Parquet Reader
    participant SchemaDetector as Schema Detector
    participant DataProcessor as Data Processor
    participant DesignParser as Design Parser
    participant Merger as Table Merger

    User->>ParquetReader: Request DIA-NN data
    ParquetReader->>SchemaDetector: Read schema
    SchemaDetector->>SchemaDetector: Check for Channel & Decoy columns
    
    alt Multiplexing Detected (Channel exists & nunique > 1)
        SchemaDetector->>DataProcessor: Multiplexed mode
        DataProcessor->>DataProcessor: Expand Channel → IsotopeLabelType
        DataProcessor->>DataProcessor: Filter/sanitize sequences
        DataProcessor->>DesignParser: Request design with Label column
        DesignParser->>DesignParser: Map SILAC labels (L/M/H)
        DesignParser->>Merger: Design table with IsotopeLabelType
        Merger->>Merger: Merge on [Run, IsotopeLabelType]
    else Non-multiplexed Mode
        SchemaDetector->>DataProcessor: Non-multiplexed mode
        DataProcessor->>DataProcessor: Set default IsotopeLabelType=L
        DataProcessor->>DataProcessor: Sanitize sequences
        DataProcessor->>DesignParser: Request design without Label
        DesignParser->>Merger: Design table
        Merger->>Merger: Merge on [Run]
    end
    
    Merger->>User: Return processed MS stats
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • jpfeuffer
  • daichengxin

Poem

🐰 Channels multiplexed with grace,
SILAC labels find their place,
Sequences scrubbed clean and bright,
Schema reads with keen insight,
Merging flows both left and right!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

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.

@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 7 complexity

Metric Results
Complexity 7

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

@ypriverol ypriverol merged commit deff52d into main Apr 8, 2026
1 of 2 checks passed
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