Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions conformance_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3484,3 +3484,33 @@
tool: tests/paramref_arguments_roundtrip.cwl
doc: Confirm that records with defaults are accepted
tags: [ required, command_line_tool ]

- label: record_outputeval
output:
references:
genome_fa:
class: File
basename: GRCm38.primary_assembly.genome.fa
checksum: sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709
size: 0
annotation_gtf:
class: File
basename: gencode.vM21.primary_assembly.annotation.gtf
checksum: sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709
size: 0
tool: tests/record_outputeval.cwl
doc: Use of outputEval on a record itself, not the fields of the record
tags: [ inline_javascript, command_line_tool ]

- label: record_outputeval_nojs
output:
references:
annotation_gtf: gencode.vM21.primary_assembly.annotation.gtf
genome_fa: GRCm38.primary_assembly.genome.fa
summary:
class: File
checksum: sha1$c0bf6c4db73d4fc08ee24c7288825c09f9cb3cea
size: 79
tool: tests/record_outputeval_nojs.cwl
doc: Use of outputEval on a record itself, not the fields of the record (without javascript)
tags: [ required, command_line_tool ]
36 changes: 36 additions & 0 deletions tests/record_outputeval.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
cwlVersion: v1.2
class: CommandLineTool
requirements:
InlineJavascriptRequirement: {}

inputs:
gtf_version:
type: string
default: M21
organism:
type: string
default: mouse
organism_prefix:
type: string
default: m

baseCommand:
- bash
- -c
arguments:
- touch GRC$(inputs.organism_prefix)38.primary_assembly.genome.fa ; touch gencode.v$(inputs.gtf_version).primary_assembly.annotation.gtf
outputs:
- id: references
type:
name: References
fields:
- name: genome_fa
type: File
- name: annotation_gtf
type: File
type: record
outputBinding:
outputEval: '$({ "genome_fa": { "class": "File", "path": runtime.outdir+"/"+"GRC"
+ inputs.organism_prefix + "38.primary_assembly.genome.fa" }, "annotation_gtf":
{ "class": "File", "path": runtime.outdir+"/"+"gencode.v" + inputs.gtf_version
+ ".primary_assembly.annotation.gtf" } })'
26 changes: 26 additions & 0 deletions tests/record_outputeval_nojs.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
cwlVersion: v1.2
class: CommandLineTool
inputs:
ref:
type:
type: record
fields:
genome_fa: string
annotation_gtf: string
default: { genome_fa: GRCm38.primary_assembly.genome.fa,
annotation_gtf: gencode.vM21.primary_assembly.annotation.gtf }

baseCommand: echo
arguments:
- $(inputs.ref.genome_fa) $(inputs.ref.annotation_gtf)
outputs:
references:
type:
type: record
fields:
genome_fa: string
annotation_gtf: string
outputBinding:
outputEval: $(inputs.ref)
summary:
type: stdout