Skip to content

Instantly share code, notes, and snippets.

@tmaruy
Last active September 19, 2020 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmaruy/aa0012b7250665b4706e14f23f20fe02 to your computer and use it in GitHub Desktop.
Save tmaruy/aa0012b7250665b4706e14f23f20fe02 to your computer and use it in GitHub Desktop.
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: CommandLineTool
# doc/label: 本cwlの説明 (短い場合はlabelを使うことを推奨)
label: import FASTQ files and create qza file for QIIME2
# requirements/hints: コマンドを走らせる条件を記述 (requirementsの方が厳しい. 満たされない場合はエラーで止まる)
requirements:
DockerRequirement: # 本コマンドを走らせるDocker container
dockerPull: qiime2/core:2020.8
EnvVarRequirement: # 環境変数等を設定する
envDef:
HOGE: /hoge/hoge
# baseCommand: ベースとなるコマンド
# arguments: baseCommandに続くarguments (リストで与える)
# 以下の例では `qiime tools import --type SampleData[PairedEndSequencesWithQuality] --input-format CasavaOneEightSingleLanePerSampleDirFmt --output-path", "$(inputs.project).qza`
baseCommand: qiime
arguments: ["tools", "import",
"--type", "SampleData[PairedEndSequencesWithQuality]",
"--input-format", "CasavaOneEightSingleLanePerSampleDirFmt",
"--output-path", "$(inputs.project).qza"]
# inputs: 本コマンドに与える引数 (yamlファイルに記述する)
inputs:
fastqDir:
type: Directory
# 上記のベースコマンドの直後に "--input-path (fastqDir)" を引数として渡す
inputBinding:
position: 0
prefix: "--input-path"
project:
type: string
# outputs: 本コマンドによる出力
outputs:
# *.qzaというファイルをoutputs.qzaとして指定
qza:
type: File
outputBinding:
glob: "*.qza"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment