We're considering building a new "runner". We envision using a graph database (e.g. Neo4j) to describe and control the running workflow. Step one is to convert a CWL file to a graph. Is there any extant software/library to do this? We've looked at extracting parse code from cwltool
or Toil but that looks like an overly complicated hack. Python YAML packages (e.g. pyyaml
) exist, or cwl-utils
, but those don't appear to parse to a graph (nodes, dependencies, etc.). Maybe, given a dictionary from pyyaml
, the task/dependency structure is easily apparent and we just need to look a little deeper?
Michael,
Thanks for your prompt response.
Honestly, I was hoping my first post would result in a "Hey, we already did that..." reply from the community ;-)
We were able to run the
cwltool --print...
versions. They seem to work fine.I probably didn't look hard enough at
cwl-utils
. I need to work on understanding the relationship between Schema Salad and that tool. At first glance it looked like a _verifyier_ of a CWL file. I will look at the link you provided.Thanks for the hint on
cwltool --pack
.At this point our test case CWL files (test run with Toil,
cwl-runner
) are very simplistic. Is there a repository of canonical test CWL files that are relatively large and complicated (and cover the spectrum of CWL capabilities)? The Bio folks seem to have some monstrous ones, but "blessed" examples would be preferable.Thanks again for your help!
cwl-utils
is a collection of scripts to demonstrate the use of the new Python classes for loading and parsing CWL v1.0 documents.schema-salad-tool --codegen python https://github.com/common-workflow-language/common-workflow-language/raw/master/v1.0/CommonWorkflowLanguage.yml
was used to create https://github.com/common-workflow-language/cwl-utils/blob/master/cwl_utils/parser_v1_0.py(Thanks for asking, I just updated the README with the above explanation)
You may find the CWL conformance tests to be useful, though I don't recommend reading them for style hints :-)
https://github.com/common-workflow-language/common-workflow-language/blob/master/CONFORMANCE_TESTS.md https://github.com/common-workflow-language/common-workflow-language/blob/master/v1.0/conformance_test_v1.0.yaml https://github.com/common-workflow-language/common-workflow-language/tree/master/v1.0/v1.0
FYI:
cwl-runner
is the generic name for any CWL runner. The CWL reference runner iscwltool
.I too am looking for something like what you described. I want to create a workflow from a python script (or any language for the matter), convert to a digraph and store. The digraph can then be converted to CWL or WDL or anything else. We would also need to import the digraph from CWL to convert to another workflow language. I haven't seen anything like this yet. If you have started implementing something, please post what it is and where we can find it. Thanks.
Official
cwl
support has moved to this forum from Biostars. Please post this there.