Skip to content

refine - #18

Merged
daichengxin merged 2 commits into
bigbio:mainfrom
daichengxin:main
Dec 29, 2025
Merged

daichengxin merged 2 commits into
bigbio:mainfrom
daichengxin:main

Conversation

@daichengxin

@daichengxin daichengxin commented Dec 29, 2025 •

Copy link
Copy Markdown
Contributor

Pull Request

Description

Checklist

  • Module follows nf-core standards
  • main.nf includes process definition
  • meta.yml includes complete documentation
  • environment.yml specifies dependencies
  • Tests are included
  • Code is formatted (prettier)
  • CI checks pass

Module Type

  • New module
  • Module update
  • Bug fix
  • Documentation

Related Issues

Closes #

Summary by CodeRabbit

  • New Features
    • Added Parquet format support to file conversion capabilities, expanding output options alongside existing mzML and mgf formats.

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

@coderabbitai

coderabbitai Bot commented Dec 29, 2025 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The thermorawfileparser module's output pattern is extended to include Parquet format alongside existing mzML and mgf formats. A corresponding test expectation is updated to verify a different sample file's converted output.

Changes

Cohort / File(s) Summary
Output Pattern & Test Updates
modules/bigbio/thermorawfileparser/meta.yml, modules/bigbio/thermorawfileparser/tests/main.nf.test
Added Parquet (*.parquet) to the convert_files artifact output pattern. Updated test assertion to validate a different sample file output (UPS1_50amol_R3.mzML vs. TMT_Erwinia_1uLSike_Top10HCD_isol2_45stepped_60min_01.mzML).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested labels

Review effort 3/5

Suggested reviewers

  • ypriverol
  • jpfeuffer

Poem

🐰✨ Parquet joins the format parade,
mzML and mgf in a fine blockade,
Tests now dance with samples new,
Format flexibility—hip-hop, achoo! 🎉

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'refine' is vague and does not convey meaningful information about the actual changes (Parquet support addition and test updates). Use a more descriptive title that captures the main changes, such as 'Add Parquet output support to thermorawfileparser' or 'Update thermorawfileparser with Parquet output and test fixes'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
modules/bigbio/thermorawfileparser/meta.yml (2)

2-2: Update description to include Parquet format.

The description mentions "mzML or MGF files" but the module now supports Parquet format (as documented in line 13 and line 37). Update this to maintain consistency.

🔎 Proposed fix
-description: Convert RAW file to mzML or MGF files
+description: Convert RAW file to mzML, MGF, or Parquet files

3-7: Consider adding Parquet to keywords for discoverability.

Since Parquet is now a supported output format, adding it to the keywords list would improve module discoverability.

🔎 Proposed addition
 keywords:
   - raw
   - mzML
   - MGF
+  - Parquet
   - OpenMS
modules/bigbio/thermorawfileparser/tests/main.nf.test (1)

10-29: Consider adding a test case specifically for Parquet format output.

While the PR aims to add Parquet support, the test cases only verify mzML output. Adding a test that explicitly uses -f=3 or the Parquet format option would strengthen confidence in the Parquet functionality.

💡 Example test structure
test("Should convert RAW to Parquet") {
    when {
        process {
            """
            input[0] = [
                [ id: 'test_parquet', mzml_id: 'UPS1_50amol_R3' ],
                file(params.test_data['proteomics']['msspectra']['ups1_50amol_r3'], checkIfExists: false)
            ]
            // Ensure task.ext.args includes -f=3 for Parquet output
            """
        }
    }
    then {
        assert process.success
        assert new File(process.out.convert_files[0][1]).name == 'UPS1_50amol_R3.parquet'
    }
}

Note: This would require configuring the process to use -f=3 via task.ext.args.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 61e9541 and a815e33.

📒 Files selected for processing (2)
  • modules/bigbio/thermorawfileparser/meta.yml
  • modules/bigbio/thermorawfileparser/tests/main.nf.test
⏰ 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). (1)
  • GitHub Check: docker | bigbio/thermorawfileparser
🔇 Additional comments (1)
modules/bigbio/thermorawfileparser/tests/main.nf.test (1)

26-26: The filename change fixes an incorrect test assertion.

The expected output filename UPS1_50amol_R3.mzML is correct. The stub process uses meta.mzml_id as the output filename prefix (main.nf:52), and the test metadata specifies mzml_id: 'UPS1_50amol_R3'. The previous expected filename TMT_Erwinia_1uLSike_Top10HCD_isol2_45stepped_60min_01.mzML didn't match this metadata, so the test was incorrect. This change fixes that discrepancy. The second test case (lines 39–49) confirms the pattern: metadata mzml_id: 'test_sample' correctly expects output filename test_sample.mzML.

Note: The module supports Parquet format output (main.nf:33, line 55) but the tests only cover mzML. Consider adding test coverage for Parquet conversion.

Converted files in mzML or MGF format depending on the format parameter (-f).
Format options: 0 for MGF, 1 for mzML, 2 for indexed mzML (default), 3 for Parquet, 4 for None.
pattern: "*.{mzML,mgf}"
pattern: "*.{mzML,mgf,parquet}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

cat modules/bigbio/thermorawfileparser/main.nf

Repository: bigbio/nf-modules

Length of output: 2098


Fix stub section to correctly handle Parquet format output.

The pattern and main script implementation correctly support Parquet output via the -f=3 option. However, the stub section has a bug: it only checks for -f=0 (MGF format) and defaults to mzML, meaning it would create an .mzML file instead of .parquet when format 3 is specified. The stub must handle all format options (0=MGF, 1-2=mzML, 3=Parquet, 4=None) to match the output pattern and ensure correct test behavior.

🤖 Prompt for AI Agents
In modules/bigbio/thermorawfileparser/meta.yml around line 38, the stub logic
only checks for -f=0 and otherwise defaults to mzML, which mislabels format 3
(Parquet); update the stub to inspect the format option and map it properly:
-f=0 -> .mgf, -f=1 or -f=2 -> .mzML, -f=3 -> .parquet, -f=4 -> no output (or
skip creating a file); ensure the generated filename extension matches this
mapping so the stub output aligns with the pattern "*.{mzML,mgf,parquet}" and
test expectations.

@daichengxin daichengxin reopened this Dec 29, 2025
@daichengxin
daichengxin merged commit a1a4a11 into bigbio:main Dec 29, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Mar 19, 2026
3 of 13 tasks
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.

1 participant