common-workflow-language / common-workflow-language/cwltool

--make-template fails to create valid yaml on mixed input types

Open
#1,539 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
376
Forks
255
Avg merge
2d 7h
Merged PRs (30d)
12

Description

## Expected Behavior
Tell us what should happen

`cwltool --make-template` should create a valid yaml

## Actual Behavior
Tell us what happens instead

An invalid yaml is created when input types are mixed.

## Workflow Code

Workflow can be found [here](https://github.com/umccr/cwl-ica/blob/main/workflows/dragen-germline-pipeline/3.7.5/dragen-germline-pipeline__3.7.5.cwl)

```
$ cwltool --make-template workflows/dragen-germline-pipeline/3.7.5/dragen-germline-pipeline__3.7.5.cwl
```

Yields

```yaml
vc_target_coverage: 0 # type "int" (optional)
vc_target_bed_padding: 0 # type "int" (optional)
vc_target_bed: # type "File" (optional)
class: File
path: a/file/path
vc_roh_blacklist_bed: # type "File" (optional)
class: File
path: a/file/path
vc_remove_all_soft_clips: false # type "boolean" (optional)
vc_max_reads_per_raw_region: 0 # type "int" (optional)
vc_max_reads_per_active_region: 0 # type "int" (optional)
vc_hard_filter: a_string # type "string" (optional)
vc_enable_vcf_output: false # type "boolean" (optional)
vc_enable_roh: false # type "boolean" (optional)
vc_enable_phasing: false # type "boolean" (optional)
vc_enable_gatk_acceleration: false # type "boolean" (optional)
vc_enable_decoy_contigs: false # type "boolean" (optional)
vc_enable_baf: # type "File" (optional)
class: File
path: a/file/path
vc_decoy_contigs: a_string # type "string" (optional)
sample_sex: valid_enum_value # enum; valid values: "file:///c/Users/awluc/OneDrive/GitHub/UMCCR/cwl-ica/workflows/dragen-germline-pipeline/3.7.5/dragen-germline-pipeline__3.7.5.cwl#dragen-germline-pipeline--3.7.5/sample_sex/male", "file:///c/Users/awluc/OneDrive/GitHub/UMCCR/cwl-ica/workflows/dragen-germline-pipeline/3.7.5/dragen-germline-pipeline__3.7.5.cwl#dragen-germline-pipeline--3.7.5/sample_sex/female" (optional)
reference_tar: # type "File"
class: File
path: a/file/path
output_file_prefix: a_string # type "string"
output_directory: a_string # type "string"
lic_instance_id_location: # optional
- # type "File"
class: File path: a/file/path
- a_string # type "string"
fastq_list_rows: # array of type "file:///c/Users/awluc/OneDrive/GitHub/UMCCR/cwl-ica/schemas/fastq-list-row/1.0.0/fastq-list-row__1.0.0.yaml#fastq-list-row"
- file:///c/Users/awluc/OneDrive/GitHub/UMCCR/cwl-ica/schemas/fastq-list-row/1.0.0/fastq-list-row__1.0.0.yaml#fastq-list-row
enable_map_align_output: false # type "boolean" (optional)
enable_duplicate_marking: false # type "boolean" (optional)
dedup_min_qual: 0 # type "int" (optional)
dbsnp_annotation: # type "File" (optional)
class: File
path: a/file/path
```

Note the `lic_instance_id_location`: which can be of type `string` `File` or `null`: see (https://github.com/umccr/cwl-ica/blob/main/workflows/dragen-germline-pipeline/3.7.5/dragen-germline-pipeline__3.7.5.cwl#L205-L214)
```yaml
lic_instance_id_location: # optional
- # type "File"
class: File path: a/file/path
- a_string # type "string"
```

## Your Environment
* cwltool version: 3.1.20210628163208
Check using ``cwltool --version``

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.