Skip to content

Specifying data types with SchemaDefRequirement #150

Closed

Description

@vardaofthevalier

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.

Activity

  1. mr-c commented on Oct 26, 2015

    @mr-c
    Member

    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.

  2. vardaofthevalier commented on Oct 26, 2015

    @vardaofthevalier
    Author

    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.

  3. mr-c commented on Oct 27, 2015

    @mr-c
    Member

    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.

  4. vardaofthevalier commented on Oct 28, 2015

    @vardaofthevalier
    Author

    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?

  5. tetron commented on Oct 29, 2015

    @tetron
    Member

    @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?

  6. mr-c commented on Nov 9, 2015

    @mr-c
    Member

    Hello @vardaofthevalier , it was good to briefly meet you last week. Did the design I worked out with Matt Bookman seem reasonable?

  7. vardaofthevalier commented on Nov 11, 2015

    @vardaofthevalier
    Author

    @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.

  8. added a commit that references this issue on Mar 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions