viash-io / viash

script + metadata = standalone component
https://viash.io
GNU General Public License v3.0
39 stars 2 forks source link

Let user know when a undefined arg is used. #659

Open KaiWaldrant opened 8 months ago

KaiWaldrant commented 8 months ago

Feature summary

Add a "warning" when a argument is called with nextflow if that argument is not defined in the config.

Feature description

in the nextflow workflow config file the following arg is defined:

argument_groups:
    - name: Sampling options
      arguments:
        - name: "--do_subsample"
          type: boolean
          default: false
          description: "Whether or not to subsample the dataset"
        - name: "--n_obs"
          type: integer
          description: Maximum number of observations to be kept. It might end up being less because empty cells / genes are removed.
          default: 500
        - name: "--n_vars"
          type: integer
          description: Maximum number of variables to be kept. It might end up being less because empty cells / genes are removed.
          default: 500

running the nextflow workflow:

nextflow run . \
  -main-script target/nextflow/datasets/workflows/process_openproblems_v1/main.nf \
  -profile docker \
  -c src/wf_utils/labels_ci.config \
  -resume \
  --do_subsample true \
  --n_obs 600 \
  --n_var 1500

This should be flagged because n_var is not defined in the config file.

Why is this feature beneficial?

It would help detect typos when providing arguments when running a nextflow workflow.

Alternatives considered

No response

Possible solution

No response

Confirmation