This is a test version of Biostars. For the public version, visit https://www.biostars.org.
CWL: Docker image as input parameter (for reference genome files)

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 answer

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?

Log in to answer this question.