Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

organization of community maintained tool & workflow descriptions #4

Open
mr-c opened this issue Aug 25, 2015 · 5 comments
Open

organization of community maintained tool & workflow descriptions #4

mr-c opened this issue Aug 25, 2015 · 5 comments

Comments

@mr-c
Copy link
Member

mr-c commented Aug 25, 2015

One file per tool.
Incomplete descriptions are welcome as long as they are usable.
General encouragement to share early & often

@mr-c
Copy link
Member Author

mr-c commented Aug 25, 2015

"standing pull requests" are to be encouraged

@tetron
Copy link
Contributor

tetron commented Aug 27, 2015

Suggest adding this to the README

@seandavi
Copy link

Is there a standard for the metadata to include for later parsing into RDF and Sparql?

@pgrosu
Copy link

pgrosu commented Aug 23, 2016

@seandavi You mean something like this via the --print-rdf argument through cwltool?

$ cwltool --print-rdf metadata-custom.cwl
@prefix CommandLineBinding: <https://w3id.org/cwl/cwl#CommandLineBinding/> .
@prefix CommandLineTool: <https://w3id.org/cwl/cwl#CommandLineTool/> .
@prefix CommandOutputBinding: <https://w3id.org/cwl/cwl#CommandOutputBinding/> .
@prefix Dirent: <https://w3id.org/cwl/cwl#Dirent/> .
@prefix DockerRequirement: <https://w3id.org/cwl/cwl#DockerRequirement/> .
@prefix EnvVarRequirement: <https://w3id.org/cwl/cwl#EnvVarRequirement/> .
@prefix EnvironmentDef: <https://w3id.org/cwl/cwl#EnvironmentDef/> .
@prefix ExpressionTool: <https://w3id.org/cwl/cwl#ExpressionTool/> .
@prefix File: <https://w3id.org/cwl/cwl#File/> .
@prefix InlineJavascriptRequirement: <https://w3id.org/cwl/cwl#InlineJavascriptRequirement/> .
@prefix LinkMergeMethod: <https://w3id.org/cwl/cwl#LinkMergeMethod/> .
@prefix Parameter: <https://w3id.org/cwl/cwl#Parameter/> .
@prefix ResourceRequirement: <https://w3id.org/cwl/cwl#ResourceRequirement/> .
@prefix ScatterMethod: <https://w3id.org/cwl/cwl#ScatterMethod/> .
@prefix SchemaDefRequirement: <https://w3id.org/cwl/cwl#SchemaDefRequirement/> .
@prefix SoftwarePackage: <https://w3id.org/cwl/cwl#SoftwarePackage/> .
@prefix SoftwareRequirement: <https://w3id.org/cwl/cwl#SoftwareRequirement/> .
@prefix Workflow: <https://w3id.org/cwl/cwl#Workflow/> .
@prefix cwl: <https://w3id.org/cwl/cwl#> .
@prefix ns1: <rdfs:> .
@prefix ns2: <http://xmlns.com/foaf/0.1/> .
@prefix ns3: <http://purl.org/dc/terms/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sld: <https://w3id.org/cwl/salad#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<file:///home/pgrosu/storage/metadata-custom.cwl> a cwl:CommandLineTool ;
    ns3:creator <http://orcid.org/0000-0003-3566-7705> ;
    cwl:baseCommand ( "cat" ) ;
    cwl:cwlVersion cwl:v1.0 ;
    cwl:hints [ a cwl:DockerRequirement ;
            DockerRequirement:dockerPull "debian:wheezy" ] ;
    cwl:inputs <file:///home/pgrosu/storage/metadata-custom.cwl#file1>,
        <file:///home/pgrosu/storage/metadata-custom.cwl#numbering> ;
    ns1:comment "Print the contents of a file to stdout using 'cat' running in a docker container." .

<file:///home/pgrosu/storage/metadata-custom.cwl#file1> cwl:inputBinding [ CommandLineBinding:position 1 ] ;
    sld:type cwl:File .

<file:///home/pgrosu/storage/metadata-custom.cwl#numbering> cwl:inputBinding [ CommandLineBinding:position 0 ;
            CommandLineBinding:prefix "-n" ] ;
    sld:type xsd:boolean,
        sld:null .

<http://orcid.org/0000-0003-3566-7705> ns2:mbox "mailto:[email protected]" ;
    ns2:name "Peter Amstutz" .

$

The above was generated using the 1.0 version of cwltool, and with the following files:

$ wget https://raw.githubusercontent.com/RDFLib/rdflib/master/examples/foaf.rdf
$ wget https://raw.githubusercontent.com/common-workflow-language/cwltool/fafbdb5c077a67567c97bb89abd005732e458a7f/cwltool/schemas/v1.0/v1.0/dcterms.rdf
$ cat metadata-custom.cwl
#!/usr/bin/env cwl-runner
$namespaces:
  dct: http://purl.org/dc/terms/
  foaf: http://xmlns.com/foaf/0.1/
$schemas:
  - foaf.rdf
  - dcterms.rdf

cwlVersion: v1.0
class: CommandLineTool
doc: "Print the contents of a file to stdout using 'cat' running in a docker container."

dct:creator:
  id: "http://orcid.org/0000-0003-3566-7705"
  foaf:name: Peter Amstutz
  foaf:mbox: "mailto:[email protected]"

hints:
  DockerRequirement:
    dockerPull: debian:wheezy
inputs:
  file1:
    type: File
    inputBinding: {position: 1}
  numbering:
    type: boolean?
    inputBinding:
      position: 0
      prefix: -n
outputs: []
baseCommand: cat

Hope it helps,
~p

@seandavi
Copy link

Yep. That is what I had in mind. Just need to digest all that now. Thanks, @pgrosu.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants