Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse creator and license information from CWL documents. #117

Open
jmchilton opened this issue Nov 9, 2020 · 1 comment
Open

Parse creator and license information from CWL documents. #117

jmchilton opened this issue Nov 9, 2020 · 1 comment

Comments

@jmchilton
Copy link

galaxyproject#10408 adds the ability to view this data in the GUI and annotate it in tools and workflows.

The Galaxy hook on the tool side is parse_license and parse_creator inside of lib/galaxy/tool_util/parser/cwl.py.

The workflow hook is lib/galaxy/tool_util/cwl/parser.py:WorkflowProxy.to_dict. This method produces a vanilla Galaxy workflow description for a CWL workflow - if that is populated with license and creator metadata as it would appear in a .ga file - the GUI should display the info.

@mr-c
Copy link
Member

mr-c commented Nov 9, 2020

Here's an example of the recommended way to encode metadata about CWL documents themselves (as opposed to metadata about the tool(s) they are describing)

https://github.com/common-workflow-language/user_guide/blob/1f49ff5fa7d01081378afdbf3eb0d388f744ca6d/_includes/cwl/17-metadata/metadata_example2.cwl#L26

so if a CWL document has $namespaces: { s: https://schema.org/ } (or equivalent) then the CWL s:license: https://spdx.org/licenses/Apache-2.0 maps to Galaxy's license: https://spdx.org/licenses/Apache-2.0 or license: Apache-2.0. Note the CWL document might spell out "http://schema.org/license": "https://spdx.org/licenses/Apache-2.0" or use a different prefix other than s as a shorthand for https://schema.org/. I don't know if this fork of Galaxy has access to the post-schema-salad processing document tree, if so, then you won't need to parse $namespaces, everything will be expanded to the full URL.

Rendered lesson is at https://www.commonwl.org/user_guide/17-metadata/index.html

Does this fork already bring over any listed tool citations about the tool being described? If not, then look at https://www.commonwl.org/user_guide/20-software-requirements/index.html to learn about the optional SoftwareRequirement including optional version and identifier fields.

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

No branches or pull requests

2 participants