This is a test version of Biostars. For the public version, visit https://www.biostars.org.
make paths variable in .cwl workflows and corresponding -job files

Is there a way to make paths variable in the .cwl and .yml files. Depending on what machine I am working on, the files might be located in different directories or the scripts that a step in my workflow relies on can be in a different location.

To be more specific, how could I make the /home/chris part in the run: variable to /office/home/chris in the code below?

process_fastq:
  run: /home/chris/Code/project/program.cwl
  in:
    fastqin: fastqin,
    fastqout: {default: "final.fastq"}
  out: [fastqout]

Something like this perhaps:

process_fastq:
  run: $(custom_path + 'Code/project/program.cwl')
  in:
    fastqin: fastqin,
    fastqout: {default: "final.fastq"}
  out: [fastqout]

If so do I need extra requirements:? And where would I specify the custom_path variable? In the command line when I am running the workflow?

Thank you very much for your help.

common-workflow-language cwl

1 answer

You can use relative paths for the run field

Example at https://github.com/common-workflow-language/workflows/blob/master/workflows/presentation-demo/grep-and-count.cwl#L18

Log in to answer this question.