Running multiple scripts via baseCommand

Hi to all the CWL experts out there:

I am trying to execute 2 shell scripts sequentially within my CWL code:

baseCommand:

  • /bin/bash
  • copy_files_to_dir.sh
  • ‘&&’
  • /bin/bash
  • combine_STARfusion_prediction_output_v2.sh

However, when I run the CWL code, the second script never gets executed. When I run them individually it works i.e. I get the output from each run but, together only the first one executes and I never get the output from the second script.

Anyone have experience with this? Thank you.

I suggest you use a method like this instead;


#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: CommandLineTool
baseCommand: ["bash", "add_header.sh"]
stdout: output.txt
requirements:
  InitialWorkDirRequirement:
    listing:
      - entryname: add_header.sh
        entry: |-
          echo "$1"
          cat "$2"

inputs:
  header_str:
    type: string
    inputBinding:
      position: 1
  input_file:
    type: File
    inputBinding:
      position: 2

outputs:
  output_file:
    type: stdout
1 Like