2.18. メタデータと著者#

正しい実行に必須でない実装拡張(例えば、GUI表示に関するフィールド)およびツールまたはワークフロー自体に関するメタデータ(例えば、引用で使用するための著者名)は、任意のオブジェクトの追加フィールドとして提供できます。このような拡張フィールド(例:format: edam:format_2572 )は、Schema Salad仕様で説明されているように、文書の$namespaces セクション(例: edam: http://edamontology.org/ )に記載されている名前空間プレフィックスを使用できます。一度名前空間プレフィックスを追加すれば、以下のように定義内のどこにでもアクセスできるようになります。それ以外の場合は、完全なURLを使用しなければなりません。format: http://edamontology.org/format_2572.

すべての開発者に対し、ツールおよびワークフローに関する以下の最小限のメタデータを推奨します。この例では、他の人があなたのツールを引用するためのメタデータを含んでいます。

metadata_example2.cwl#
#!/usr/bin/env cwl-runner
cwlVersion: v1.2
class: CommandLineTool

label: An example tool demonstrating metadata.
doc: Note that this is an example and the metadata is not necessarily consistent.

inputs:
  aligned_sequences:
    type: File
    label: Aligned sequences in BAM format
    format: edam:format_2572
    inputBinding:
      position: 1

baseCommand: [ wc, -l ]

stdout: output.txt

outputs:
  report:
    type: stdout
    format: edam:format_1964
    label: A text file that contains a line count

s:author:
  - class: s:Person
    s:identifier: https://orcid.org/0000-0002-6130-1021
    s:email: mailto:dyuen@oicr.on.ca
    s:name: Denis Yuen

s:contributor:
  - class: s:Person
    s:identifier: http://orcid.org/0000-0002-7681-6415
    s:email: mailto:briandoconnor@gmail.com
    s:name: Brian O'Connor

s:citation: https://dx.doi.org/10.6084/m9.figshare.3115156.v2
s:codeRepository: https://github.com/common-workflow-language/common-workflow-language
s:dateCreated: "2016-12-13"
s:license: https://spdx.org/licenses/Apache-2.0

$namespaces:
  s: https://schema.org/
  edam: http://edamontology.org/

$schemas:
  - https://schema.org/version/latest/schemaorg-current-https.rdf
  - http://edamontology.org/EDAM_1.18.owl

このCWL定義に相当するものをコマンドライン形式にすると:

$ wc -l /path/to/aligned_sequences.ext > output.txt

2.18.1. 拡張された例#

高いモチベーションを持つ人であれば、ツールにもっと多くのメタデータを付与することも可能です。この例では、EDAMオントロジーのタグをキーワードとして含み(関連するツールのグループ化が可能)、ツールを使用するために必要なハードウェアのヒントや、さらにいくつかのメタデータフィールドがあります。

metadata_example3.cwl#
#!/usr/bin/env cwl-runner
cwlVersion: v1.2
class: CommandLineTool

label: An example tool demonstrating metadata.
doc: Note that this is an example and the metadata is not necessarily consistent.

hints:
  ResourceRequirement:
    coresMin: 4

inputs:
  aligned_sequences:
    type: File
    label: Aligned sequences in BAM format
    format: edam:format_2572
    inputBinding:
      position: 1

baseCommand: [ wc, -l ]

stdout: output.txt

outputs:
  report:
    type: stdout
    format: edam:format_1964
    label: A text file that contains a line count

s:author:
  - class: s:Person
    s:identifier: https://orcid.org/0000-0002-6130-1021
    s:email: mailto:dyuen@oicr.on.ca
    s:name: Denis Yuen

s:contributor:
  - class: s:Person
    s:identifier: http://orcid.org/0000-0002-7681-6415
    s:email: mailto:briandoconnor@gmail.com
    s:name: Brian O'Connor

s:citation: https://dx.doi.org/10.6084/m9.figshare.3115156.v2
s:codeRepository: https://github.com/common-workflow-language/common-workflow-language
s:dateCreated: "2016-12-13"
s:license: https://spdx.org/licenses/Apache-2.0

s:keywords: edam:topic_0091 , edam:topic_0622
s:programmingLanguage: C

$namespaces:
  s: https://schema.org/
  edam: http://edamontology.org/

$schemas:
  - https://schema.org/version/latest/schemaorg-current-https.rdf
  - http://edamontology.org/EDAM_1.18.owl