This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Rules regarding secondaryFiles in subworkflows

I have workflow a step that outputs the following:

outputs:
  standard_bams:
    type: File[]
    outputSource: flatten_array_bams/output_bams

and a subsequent step that accepts this^ output:

inputs:
  standard_bam:
    type: File
    secondaryFiles: [^.bai]

I was wondering, is it only necessary to specify secondaryFiles in the inputs of the second step, and not in the outputs of the first step? (I assume this to be the case as that is what appears to be happening, but wanted to make sure).

cwl

1 answer

This depends on where you run the workflow. Some executors have a feature to delete unnecessary intermediate files to save up on disk space during execution. Setting the secondary file on output of the first step would signal that the ^.bai file is needed and should not be deleted.

Log in to answer this question.