Skip to content

Handle all python script inputs with click#381

Merged
FerriolCalvet merged 5 commits intodevfrom
input-with-click
Oct 23, 2025
Merged

Handle all python script inputs with click#381
FerriolCalvet merged 5 commits intodevfrom
input-with-click

Conversation

@FerriolCalvet
Copy link
Copy Markdown
Member

No description provided.

- make appropriate changes in modules files
@FerriolCalvet FerriolCalvet added this to the Phase 2 milestone Oct 12, 2025
@FerriolCalvet FerriolCalvet requested a review from Copilot October 15, 2025 10:18
Copy link
Copy Markdown
Contributor

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

This PR updates all Python script invocations across the pipeline to use the Click command-line interface library instead of positional arguments, standardizing the command-line argument handling for better maintainability and user experience.

Key changes:

  • Replaced positional arguments with named Click options for all Python scripts
  • Removed TODO comments indicating the need for Click implementation
  • Updated boolean flags to use proper Click flag syntax

Reviewed Changes

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

Show a summary per file
File Description
modules/local/writemaf/main.nf Updated write_mafs.py to use --maf-file and --groups-json options
modules/local/sitesfrompositions/main.nf Converted sites_table_from_positions.py to use named options and added cleanup command
modules/local/process_annotation/panelcustom/main.nf Modified panel_custom_processing.py to use Click options and updated boolean flag handling
modules/local/process_annotation/mutations_custom/main.nf Updated mutations_custom_processing.py to use named Click options
modules/local/group_genes/main.nf Refactored features_2group_genes.py to use Click options with conditional argument handling
modules/local/filtermaf/main.nf Converted filter_cohort.py to use descriptive Click option names
modules/local/dnds/preprocess/main.nf Updated dNdS_preprocess.py to use Click options for file paths
modules/local/createpanels/sample/main.nf Modified create_panel4sample.py to use Click options and updated TODO comment
modules/local/createpanels/captured/main.nf Updated create_panel_versions.py to use Click options
modules/local/bbgtools/oncodrive3d/preprocessing/main.nf Converted oncodrive3d_preprocessing.py to use Click options

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread modules/local/sitesfrompositions/main.nf Outdated
- update tests
- update script for filterbed
Comment thread modules/local/createpanels/captured/main.nf
Comment thread bin/create_panel4sample.py
Comment thread bin/dNdS_preprocess.py
Comment thread bin/features_2group_genes.py
Comment thread bin/filter_cohort.py
Comment thread bin/mutations_custom_processing.py Outdated
@m-huertasp
Copy link
Copy Markdown
Collaborator

I was just taking advantage that I was looking at the scripts to add those comments but they are not about the implementation of click.
The only script that I could find without click is check_samplesheet.py

@m-huertasp
Copy link
Copy Markdown
Collaborator

I've done some more tests, and I think everything is working fine! I have used a small pytest script for this -->
test_click.py

@FerriolCalvet FerriolCalvet merged commit b6eb5e8 into dev Oct 23, 2025
@FerriolCalvet FerriolCalvet deleted the input-with-click branch October 23, 2025 08:20
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