CWL : output file refer to inputs param
2
0
Entering edit mode
4.8 years ago
lizhichao ▴ 80

I mean refer some filed from input params For exampe: input param contains this field:
prefix: * output file ,i want the [prefix].fq.gz ,but not the [prefix].stat so ,can i write the cwl by glob: $(inputs.extractfile).fq.gz ?

cwl • 996 views
ADD COMMENT
1
Entering edit mode
4.8 years ago
lizhichao ▴ 80

ok,so,i can refer to the more specific fields.Thank you very much !

ADD COMMENT
0
Entering edit mode
4.8 years ago
lizhichao ▴ 80

emm,i tested,its ok.

cwlVersion: v1.0 class: CommandLineTool baseCommand: [tar, --extract] inputs: tarfile: type: File inputBinding: prefix: --file extractfile: type: string inputBinding: position: 1 prefix: type: string outputs: extracted_file: type: File outputBinding: glob: $(inputs.prefix).txt

ADD COMMENT
0
Entering edit mode

This will work for string inputs. I'm adding this in case somebody reading has to handle files. Let's say our input file is named "aspergillus.fastq".

The inputs section is:

inputs:
  reads:
    type: File
    inputBinding:
      prefix: -r

Referencing the input:

$(inputs.reads.basename) = "aspergillus.fastq"

$(inputs.reads.nameroot) = "aspergillus"

$(inputs.reads.nameext) = ".fastq"

ADD REPLY

Login before adding your answer.

Traffic: 1940 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