genome / analysis-workflows

Open workflow definitions for genomic analysis from MGI at WUSM.
MIT License
102 stars 57 forks source link

Reference string in somatic-exome.cwl #674

Closed Stikus closed 5 years ago

Stikus commented 5 years ago

Hello. According to these lines in files: somatic_exome.cwl#L13, detect_variants.cwl#L10, varscan_pre_and_post_processing.cwl#L11, varscan.cwl#L7 'reference' is a 'string', but for real it is still a 'file' and this script calling 'samtools mpileup' with '-f' flag, which specifies 'file', not 'string'. I assume that 'reference' string from file somatic_exome.yaml#L59 is path to some directory that is mounted to docker-container by default or after some docker-engine settings. Is it correct? I think so because CWL-files dont specify 'reference' as file and cwltool dont transfer this 'reference' to docker-container as file.

If I'm correct - can you tell how to run your workflow without this 'reference' in docker-containers? Do I need to modify all CWL-files to switch 'reference' type from 'string' to 'File'?

And is 'chr17_test.fa' file in exome_workflow.tgz same as 'chr17_test.fa' file from somatic_exome.yaml#L59?

johnegarza commented 5 years ago

You are correct, it is actually a file that is always mounted by default with our settings. We keep it as a string instead of a File to avoid unnecessarily copying it throughout the workflow. Your suggested fix will work and is the conventional way to do it. However, there is another option that may be slightly easier, if you're familiar with Cromwell. You can modify your Cromwell config file to launch docker tasks with an additional option, -v <local absolute path to the reference>:<desired mount point inside the container>, then specify the reference as <desired mount point inside the container> in your inputs file. Cromwell is the workflow engine we use, so unfortunately I'm not familiar with the equivalent steps for cwltool, if they exist. Yes, those two files are the same. Please let me know if you have further questions!

Stikus commented 5 years ago

Thx for the answer. Unfortunately we are not using Cromwell for now, but we will look into it.