bioinformatics
cwl
CWLDay 20

CWL User Guide 20: Specifying Software Requirements をやってみた

CWL User Guide 20: Specifying Software Requirements

今回は、ジョブに対して必要なものや、依存関係などの記述にについて書かれています

この回にでてくる主なキーワード

  • SoftwareRequirement
  • hints
  • specs

CWLファイル、custom-types.cwl (ただし明示されていない)

custom-types.cwl
cwlVersion: v1.0
class: CommandLineTool

label: "InterProScan: protein sequence classifier"

doc: |
      Version 5.21-60 can be downloaded here:
      https://github.com/ebi-pf-team/interproscan/wiki/HowToDownload

      Documentation on how to run InterProScan 5 can be found here:
      https://github.com/ebi-pf-team/interproscan/wiki/HowToRun

requirements:
  ResourceRequirement:
    ramMin: 10240
    coresMin: 3
  SchemaDefRequirement:
    types:
      - $import: InterProScan-apps.yml

hints:
  SoftwareRequirement:
    packages:
      interproscan:
        specs: [ "https://identifiers.org/rrid/RRID:SCR_005829" ]
        version: [ "5.21-60" ]

inputs:
  proteinFile:
    type: File
    inputBinding:
      prefix: --input
  applications:
    type: InterProScan-apps.yml#apps[]?
    inputBinding:
      itemSeparator: ','
      prefix: --applications

baseCommand: interproscan.sh

arguments:
 - valueFrom: $(inputs.proteinFile.nameroot).i5_annotations
   prefix: --outfile
 - valueFrom: TSV
   prefix: --formats
 - --disable-precalc
 - --goterms
 - --pathways
 - valueFrom: $(runtime.tmpdir)
   prefix: --tempdir


outputs:
  i5Annotations:
    type: File
    format: iana:text/tab-separated-values
    outputBinding:
      glob: $(inputs.proteinFile.nameroot).i5_annotations

$namespaces:
 iana: https://www.iana.org/assignments/media-types/
 s: http://schema.org/
$schemas:
 - https://schema.org/docs/schema_org_rdfa.html

s:license: "https://www.apache.org/licenses/LICENSE-2.0"
s:copyrightHolder: "EMBL - European Bioinformatics Institute"

パラメータファイル

明示されていないが19でつかった custom-types.yml ではないか?

必要なファイル

InterProScan-apps.yml
がない
test_proteins.fasta
がない

実行

実行方法

cwltool custom-types.cwl custom-types.yml

実行結果

$ cwltool custom-types.cwl custom-types.yml
/usr/local/bin/cwltool 1.0.20171107133715
Resolved 'custom-types.cwl' to 'file:///home/vagrant/cwl_user_guide_work/20-software-requirements/custom-types.cwl'
custom-types.cwl:1:1: unrecognized extension field `http://schema.org/license`.  Did you include a $schemas section?
custom-types.cwl:1:1: unrecognized extension field `http://schema.org/copyrightHolder`.  Did you include a $schemas section?
[job custom-types.cwl] /tmp/tmpjRiC7g$ interproscan.sh \
    --outfile \
    test_proteins.i5_annotations \
    --formats \
    TSV \
    --disable-precalc \
    --goterms \
    --pathways \
    --tempdir \
    /tmp/tmpTMGwaq \
    --input \
    /tmp/tmpmNwsQU/stg83da0937-cf6f-4047-8161-6e8246f3154b/test_proteins.fasta
'interproscan.sh' not found
[job custom-types.cwl] completed permanentFail
{}
Final process status is permanentFail

今回使ったファイル

cwl_user_guide_work/20-software-requirements at master · manabuishii/cwl_user_guide_work