You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Specifying data types with SchemaDefRequirement #150
I'm currently attempting to write a workflow example for use on Google Cloud Platform using a bioinformatics tool called SNAPR, which has been ported to Docker by the developers of the tool. For this workflow, I'm playing around with the idea of writing a workflow step for copying files from Google Cloud Storage to the VM where the CWL process will be running, which will be used by subsequent workflow steps running SNAPR.
In order to do this, I'd like to use SchemaDefRequirement to define a custom record type with fields "url" and "destination", where "url" is a string referring to a valid GCS file url ("gs://path/to/file"), and "destination" is a string denoting a valid absolute path on the host file system for the file to be downloaded to. I'd like for my workflow to take an input of this custom type, and then use this as input for a workflow step, which uses a tool description in another file. The problem I'm having is that I can't figure out where to put the SchemaDefRequirement (either in the workflow file or the tool definition file, or both) without getting a type mismatch error when I run the workflow.
My main questions, therefore, are: 1) Where should I be creating the SchemaDefRequirement so that both the workflow and the tool can reference the same type without causing a type mismatch error, and 2) How do I then reference the type in each file?
I would have provided some code snippets highlighting the problem, but I've tried so many different ways of doing this that I'm not sure which variation would be helpful to share. If anyone has a suggestion for a specific thing I could try, I'd be happy to share the results.
Hello @vardaofthevalier, and thank you for creating this issue. I'm glad to hear that you are experimenting with the CWL!
I'm not super familiar with Google's current offering but it looks like you are talking about the Google Cloud Platform Container Enginer which uses Kubernetes to run Docker containers.
I'm a bit confused by your question. You talk about running CWL workflow both outside and inside of a VM.
Currently data delivery and management is the job of CWL implementations. I am interested to hear what @tetron @ntijanic @jmchilton or others have to say on the topic.
Hi @mr-c , thanks for responding to my question. :)
Currently I'm only trying to run a workflow on a single GCE "container-optimized" VM, which is preconfigured to have Docker and some Kubernetes components already installed on it when it boots up. I have been considering various options for scaling CWL runs across multiple hosts (using Kubernetes or some other scheduling mechanism for containers), but for the time being I'm just trying to create a simple working example of a workflow using SNAPR (which has been ported to Docker) in which all of the steps run locally.
We would consider URI relating to backing stores (like Google Cloud Storage) to be implementation details and not something that you'd want to put inside workflows. You'll need to deliver the files to a POSIX filesystem namespace from GCS yourself.
I probably should've mentioned in my first comment that I'm wrapping the command line program "gsutil" in a CommandLineTool in order to do this. It's not a crucial workflow step, but I was just trying to come up with a good end-to-end pipeline example to share with our users in order to demonstrate how to use CWL on a pre-configured GCE VM.
So would it be better if something like "CreateFileRequirement" were extended to handle GCS URIs? How/where could I make a proposal for such a feature?
This ticket has gone off in a couple different directions. Let's talk about SchemaDefRequirement here, and perhaps open a new ticket to talk about data acquisition?
I have committed a couple of test cases that demonstrate how to use SchemaDefRequirement:
@mr-c : Likewise! :) And yes, I think the approach suggested by Matt Bookman (using GCS Fuse) may be an ideal way to simplify things for users in terms of accessing data in Google Cloud Storage. I will likely still want to do a bit more research into the inner workings of GCS Fuse before making a commitment just in case there are any hidden caveats or gotchas that might cause problems later on, but I think it sounds like a promising solution.
@tetron , I have also tested the method you suggested, and I can confirm that it is working for me now. So until the time comes when I do commit to implementing a solution using GCS Fuse, I at least will have another way of achieving the goal.
Activity
mr-c commentedon Oct 26, 2015
Hello @vardaofthevalier, and thank you for creating this issue. I'm glad to hear that you are experimenting with the CWL!
I'm not super familiar with Google's current offering but it looks like you are talking about the Google Cloud Platform Container Enginer which uses Kubernetes to run Docker containers.
I'm a bit confused by your question. You talk about running CWL workflow both outside and inside of a VM.
Currently data delivery and management is the job of CWL implementations. I am interested to hear what @tetron @ntijanic @jmchilton or others have to say on the topic.
vardaofthevalier commentedon Oct 26, 2015
Hi @mr-c , thanks for responding to my question. :)
Currently I'm only trying to run a workflow on a single GCE "container-optimized" VM, which is preconfigured to have Docker and some Kubernetes components already installed on it when it boots up. I have been considering various options for scaling CWL runs across multiple hosts (using Kubernetes or some other scheduling mechanism for containers), but for the time being I'm just trying to create a simple working example of a workflow using SNAPR (which has been ported to Docker) in which all of the steps run locally.
mr-c commentedon Oct 27, 2015
You are welcome.
We would consider URI relating to backing stores (like Google Cloud Storage) to be implementation details and not something that you'd want to put inside workflows. You'll need to deliver the files to a POSIX filesystem namespace from GCS yourself.
Hope this helps.
mr-c commentedon Oct 27, 2015
(We are having a public team video chat in 27 minutes at https://plus.google.com/hangouts/_/sbgenomics.com/common-workflow if you'd like to chat about this in real time; https://gitter.im/common-workflow-language/common-workflow-language is our text chat room)
vardaofthevalier commentedon Oct 28, 2015
I probably should've mentioned in my first comment that I'm wrapping the command line program "gsutil" in a CommandLineTool in order to do this. It's not a crucial workflow step, but I was just trying to come up with a good end-to-end pipeline example to share with our users in order to demonstrate how to use CWL on a pre-configured GCE VM.
So would it be better if something like "CreateFileRequirement" were extended to handle GCS URIs? How/where could I make a proposal for such a feature?
tetron commentedon Oct 29, 2015
@vardaofthevalier
This ticket has gone off in a couple different directions. Let's talk about SchemaDefRequirement here, and perhaps open a new ticket to talk about data acquisition?
I have committed a couple of test cases that demonstrate how to use SchemaDefRequirement:
https://github.com/common-workflow-language/common-workflow-language/blob/master/draft-3/draft-3/schemadef-wf.cwl
Does this example help?
mr-c commentedon Nov 9, 2015
Hello @vardaofthevalier , it was good to briefly meet you last week. Did the design I worked out with Matt Bookman seem reasonable?
vardaofthevalier commentedon Nov 11, 2015
@mr-c : Likewise! :) And yes, I think the approach suggested by Matt Bookman (using GCS Fuse) may be an ideal way to simplify things for users in terms of accessing data in Google Cloud Storage. I will likely still want to do a bit more research into the inner workings of GCS Fuse before making a commitment just in case there are any hidden caveats or gotchas that might cause problems later on, but I think it sounds like a promising solution.
@tetron , I have also tested the method you suggested, and I can confirm that it is working for me now. So until the time comes when I do commit to implementing a solution using GCS Fuse, I at least will have another way of achieving the goal.
Squashed 'v1.1.0-dev1/salad/' changes from 98a5bea..27c20e8