Skip to content

Conversation

@tonywu1999
Copy link
Contributor

@tonywu1999 tonywu1999 commented Jul 15, 2025

Motivation and Context

https://groups.google.com/g/msstats/c/NoBiovXEiiY

Changes

  • Add support for DIANN's new output format
  • Add example for parquet data input
  • Refactored DIANN code to be more readable

Testing

  • Added unit tests
  • Existing unit tests and new unit tests pass after refactor
  • Manually read through the code to ensure all lines are the same after refactor (used claude AI to refactor the code for the last commit of this PR)

Checklist Before Requesting a Review

  • I have read the MSstats contributing guidelines
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Added support for an "auto" option in quantification settings to handle DIANN 2.0 data, automatically combining fragment intensity columns for easier processing.
  • Documentation

    • Updated documentation to describe the new "auto" quantification option and provide clearer usage instructions and examples for DIANN 2.0 data.
  • Tests

    • Added new test coverage for DIANN 2.0 data format using the "auto" quantification option to ensure accurate processing and output consistency.
  • Chores

    • Added "arrow" package to suggested dependencies to support new data input formats.

@tonywu1999 tonywu1999 requested a review from Copilot July 15, 2025 20:28
@coderabbitai

This comment was marked as outdated.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds support for DIANN 2.0 by introducing an auto mode for quantificationColumn to collapse multiple fragment columns into a single intensity column.

  • Extend documentation across functions to describe the new auto option.
  • Implement logic in clean_DIANN.R to detect and merge fragment columns when quantificationColumn = "auto".
  • Update examples to reference the auto setting.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
man/dot-cleanRawDIANN.Rd Document new auto option for quantificationColumn.
man/MSstatsClean.Rd Document new auto option for quantificationColumn.
man/DIANNtoMSstatsFormat.Rd Document new auto option and update example comment.
R/converters_DIANNtoMSstatsFormat.R Document new auto option in roxygen and update example.
R/clean_DIANN.R Add auto-detection and collapse of fragment columns.
Comments suppressed due to low confidence (3)

man/dot-cleanRawDIANN.Rd:18

  • Wrap code elements such as 'FragmentQuantCorrected', 'FragmentQuantRaw', and 'auto' in \code{} for proper Rd formatting and consistent styling.
\item{quantificationColumn}{Use 'FragmentQuantCorrected'(default) column for quantified intensities.

R/clean_DIANN.R:16

  • Add unit tests to cover the new 'auto' behavior, including scenarios with zero fragment columns and multiple fragment columns to ensure correct merging and error handling.
  if (quantificationColumn == "auto") {

man/DIANNtoMSstatsFormat.Rd:83

  • [nitpick] Rather than only noting the 'auto' setting in a comment, include a full example call (e.g., DIANNtoMSstatsFormat(file, annotation, quantificationColumn = 'auto')) to demonstrate how to use it.
# For DIANN 2.0, set quantificationColumn = 'auto'

coderabbitai[bot]

This comment was marked as outdated.

@mstaniak mstaniak merged commit 8e38072 into devel Jul 28, 2025
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.

3 participants