3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Common Workflow Language (CWL)Advent Calendar 2018

Day 11

CWLの出力ファイル名で困った

Posted at

CWLで出力ファイル名を指定する

class: CommandLineTool
cwlVersion: v1.0
$namespaces:
  edam: 'http://edamontology.org/'
baseCommand: fastqc
inputs:
  - id: fastq
    type: File
    format: edam:format_1930
    inputBinding:
      position: 2
    doc: FastQ file from next-generation sequencers
outputs:
  - id: qc
    type: File
    outputBinding:
      glob: $(inputs.fastq.nameroot)_fastqc.html
label: fastqc
arguments:
  - position: 1
    prefix: -o
    valueFrom: .
hints:
  - class: DockerRequirement
    dockerPull: 'maxulysse/fastqc:latest'

こんな感じで指定できる。

CWLでは '*' を使って出力ファイルを指定できる

    outputBinding:
      glob: $(inputs.fastq.nameroot)_fastqc.html

この部分を、こう書くこともできる。

    outputBinding:
      glob: $(inputs.fastq.nameroot)*_fastqc.html

CWLで '*' を使って困ったこと

    outputBinding:
      glob: *_fastqc.html

こう書くと、怒られる。

../cwltool/cwltool.py 1.0.20181201184214
Resolved 'fastqc.cwl' to 'file:///Users/hachiya/Projects/cwl/test/fastqc.cwl'
I'm sorry, I couldn't load this CWL file, try again with --debug for more information.
The error was: found undefined alias '_fastqc.html'
  in "file:///Users/hachiya/Projects/cwl/test/fastqc.cwl", line 17, column 13

先頭で '*' を使う場合は、ダブルクォーテーションで挟むとよい。

    outputBinding:
      glob: "*_fastqc.html"

これで動いた!

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?