CWL: Is there a way to output an output file with one of the inputs of the tool in a Record type?
1
1
Entering edit mode
6.6 years ago
ionox0 ▴ 390

I'm looking to do something like the following:

cwlVersion: v1.0
class: CommandLineTool

requirements:
 - class: InlineJavascriptRequirement
 - $import: Types.cwl

...

inputs: 
  an_input: string

outputs:
  an_output:
    type: 'Types.cwl#SpecialType'
    outputSource:
      valueFrom: ${
        return {
          'output_file': glob('the_tools_output.file'),
          'this_should_be_associated_with_the_file_in_a_later_step': inputs.an_input
        }
    }

Is this possible? I see a possible solution here using an ExpressionTool

https://github.com/andersgs/cwl_flows/blob/master/limit_detection/seqtk_sample_PE.cwl

But I was wondering if it could be done inline in the tool output.

cwl • 1.7k views
ADD COMMENT
2
Entering edit mode
6.5 years ago

That should be possible, however the syntax for the output would look like this:

outputs:
  an_output:
    type: 'Types.cwl#SpecialType'
    outputBinding:
      glob: something
      outputEval: |-
        ${
                return {
                  'output_file': self,
                  'this_should_be_associated_with_the_file_in_a_later_step': inputs.an_input
                  }
              }

In the expression for outputEval, self has the value of whatever is caught by glob pattern.

ADD COMMENT

Login before adding your answer.

Traffic: 2222 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6