CWL: Docker image as input parameter (for reference genome files)
1
1
Entering edit mode
6.8 years ago
well309 ▴ 70

I am trying to figure out how can I copy reference genome files into Docker containers to be used by software aligners since CWL v1.0 does not support directory copy. One idea I am testing is to create a Docker image for the aligner itself and create a second image that derives FROM from the first image by adding reference genome index files. For example:

  • bowtie1 only software, no data
    • bowtie1-hg19 download genome in FASTA and use parent image to build index
    • bowtie1-rn5 keep images for each reference genome

I would like to know if it is possible to set Docker image in requirements from inputs at run time. For example:

cwlVersion: v1.0
class: CommandLineTool
baseCommand: [uname, -a]
requirements:
  InlineJavascriptRequirement: {}
  DockerRequirement:
    dockerPull:
      valueFrom: $(inputs.docker_image)
inputs:
  docker_image:
    type: string
    default: ubuntu
outputs:
  output:
    type: stdout

I understand that docker_image is not a Tool's input. Is there any way to do this in CWL? Or a better way to deal with reference genome files?

cwl • 1.9k views
ADD COMMENT
0
Entering edit mode
6.6 years ago

Hello well309,

The type of all fields of DockerRequirement in CWL v1.0 is string and not string | Expression — therefore you can not use dynamic values here, sorry.

The CWL Directory type does get mounted into Docker containers -- does that not work for you?

ADD COMMENT

Login before adding your answer.

Traffic: 2336 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6