Skip to content

Make output of planemo workflow_job_init more helpful#1595

Merged
jmchilton merged 7 commits intogalaxyproject:masterfrom
mvdbeek:claude/add-parameter-comments-xKHpI
Jan 5, 2026
Merged

Make output of planemo workflow_job_init more helpful#1595
jmchilton merged 7 commits intogalaxyproject:masterfrom
mvdbeek:claude/add-parameter-comments-xKHpI

Conversation

@mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Jan 4, 2026

Before:

Collection paired FASTQ files:
  class: Collection
  collection_type: list
  elements:
  - class: File
    identifier: todo_element_name
    path: todo_test_data_path.ext
Compute Cufflinks FPKM: todo_param_value
Compute StringTie FPKM: todo_param_value
GTF file of annotation:
  class: File
  path: todo_test_data_path.ext
Generate additional QC reports: todo_param_value
Reference genome: todo_param_value
Strandedness: todo_param_value
Use featureCounts for generating count tables: todo_param_value

After:

# type: collection, collection_type: list:paired, doc: Should be a list of paired-end RNA-seq fastqs
Collection paired FASTQ files:
  class: Collection
  collection_type: list:paired
  elements:
  - class: Collection
    type: paired
    identifier: todo_element_name
    elements:
    - class: File
      identifier: forward
      path: todo_test_data_path_forward.ext
    - class: File
      identifier: reverse
      path: todo_test_data_path_reverse.ext
# type: string, doc: This is optional. Fastp will use overlapping. If you want to specify, for Nextera use: CTGTCTCTTATACACATCTCCGAGCCCACGAGAC, for TruSeq: GATCGGAAGAGCACACGTCTGAACTCCAGTCAC or AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC, optional: true
Forward adapter: todo_param_value
# type: string, doc: This is optional. Fastp will use overlapping. If you want to specify, for Nextera use: CTGTCTCTTATACACATCTGACGCTGCCGACGA, for TruSeq: GATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT or AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT, optional: true
Reverse adapter: todo_param_value
# type: boolean, doc: Whether to compute additional QC like fastQC, gene body coverage etc...
Generate additional QC reports: false
# type: string, doc: Select the reference genome
Reference genome: todo_param_value
# type: data, doc: GTF compatible with the reference genome. Mind the UCSC/Ensembl differences in chromosome naming.
GTF file of annotation:
  class: File
  path: todo_test_data_path.ext
# type: string, doc: For stranded RNA, reverse means that the read is complementary to the coding sequence, forward means that the read is in the same orientation as the coding sequence
Strandedness: todo_param_value
# type: boolean, doc: Use featureCounts tool instead of RNA STAR?
Use featureCounts for generating count tables: false
# type: boolean, doc: Whether FPKM values should be computed with Cufflinks
Compute Cufflinks FPKM: false
# type: data, doc: It could be a GTF with for example one entry for the chrM forward and one entry for the chrM reverse, optional: true
GTF with regions to exclude from FPKM normalization with Cufflinks:
  class: File
  path: todo_test_data_path.ext
# type: boolean, doc: Whether FPKM values should be computed with StringTie
Compute StringTie FPKM: false

The workflow_job_init command now includes YAML comments with the input
parameter type and doc (description) above each input entry in the
generated job file. This helps users understand the expected input
types when filling out job templates.
- Replace manual comment generation with ruamel.yaml for proper
  YAML comment support in workflow job templates
- Add ruamel.yaml as a dependency
- Include optionality information in parameter metadata comments
  (shows "optional: true" for optional parameters or those with defaults)
- Include all workflow inputs (not just required ones) in the generated
  job template
- Add default values to metadata and display them in YAML comments
- Use default values as template values for parameters that have them
- Show "optional: true" for optional parameters or those with defaults
When workflow inputs have a format restriction (e.g., fastq, tabular),
this is now displayed in the YAML comment for that input parameter.
- Add test workflow with various parameter types (optional, defaults, format)
- Test integer and boolean parameter handling
- Test that optional parameters show "optional: true" in comments
- Test that default values are displayed in comments and used as values
- Test that format restrictions are shown in comments
- All tests use real workflow files with no mocking
Boolean parameters without a specified default now use `false` as the
template value instead of the placeholder string "todo_param_value".
- Add collection_type to job template metadata and comments
- Generate appropriate sample elements based on collection_type:
  - list: single element with identifier
  - paired: forward and reverse elements
  - list:paired: nested paired collection structure
- Add comprehensive test for collection type handling
Copy link
Member

@jmchilton jmchilton left a comment

Choose a reason for hiding this comment

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

Amazing - thank you!

@jmchilton jmchilton merged commit 96807da into galaxyproject:master Jan 5, 2026
14 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