How to specify an output directory by the cromwell option or in the json input file?

Hi Developer,
I don't know whether there is an option to specify the output directory of the wdl workflow or any parameter that we can manage the location of the output file.

Thank you

Answers

  • RuchiRuchi Member, Broadie, Moderator, Dev admin

    Hello @pitithat,

    Let's say your WDL workflow has a single call and this is what your outputs look like:

    /<some_directory>/<workflow_name>/<workflow_uuid>/call-<call_name>
      L rc
      L stdout
      L stderr
      L sample.bam
      L sample.idx
    

    There's option to copy over all outputs in the workflow directory to a new directory, and the upstream workflow structure is retained. Docs on that here.

    Option 1: For example, if you wanted to copy all call outputs to a directory named /job-outputs -- then use the final_call_logs_dir option. The final copy results would look like...

    /job-outputs/<workflow_name>/<workflow_uuid>/call-<call_name>
      L rc
      L stdout
      L stderr
      L sample.bam
      L sample.idx
    

    Option 2: If you wanted to copy only workflow outputs to the same directory, then you have to ensure your WDL specifies which outputs are workflow outputs:

    workflow workflow_name {
      call call_name {}
    
    # Everything inside this stanza
    # is an official workflow output
      output {
        call_name.bam
      }
    }
    
    task call_name {
      command { ... }
      runtime { ... }
      output {
        File bam = "sample.bam"
        File bamIndex = "sample.idx"
      }
    }
    

    To copy workflow outputs, the option you want to use is final_workflow_outputs_dir , and the final directory would look like...

    /job-outputs/<workflow_name>/<workflow_uuid>/call-<call_name>
      L sample.bam
    

    Option 3: You want to copy specific outputs but escape the directory structure

    There's a ticket filed in our repo https://github.com/broadinstitute/cromwell/issues/1641 and there's a post at the end of the thread that provides an example of how to manage copying individual outputs to a specified directory.

    Please let me know if I missed something. Thanks

Sign In or Register to comment.