This is a test version of Biostars. For the public version, visit https://www.biostars.org.
CWL : output file refer to inputs param

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

2 answers

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

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

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"

Log in to answer this question.