secondaryFiles in optional input do not work on Arvados

Hi,
I want to use secondaryFiles for optional input:

  reference_genome: 
    type: File?
    secondaryFiles: [.fai]
    inputBinding:
      shellQuote: false
      prefix: -r
      position: 1

When I run workflow locally it success. But when I run on arvados I have an error:

cwltool.errors.WorkflowException: components/joint_genotyping/joint_genotyping.cwl:24:5: Missing required secondary file 'Homo_sapiens_assembly38.fasta.fai' from file object: {
components/joint_genotyping/joint_genotyping.cwl:24:5:     "class": "File",
components/joint_genotyping/joint_genotyping.cwl:24:5:     "location": "keep:570c54e5cc295045cfe9f5b361d63e36+6185/Homo_sapiens_assembly38.fasta",
components/joint_genotyping/joint_genotyping.cwl:24:5:     "size": 3249912778,
components/joint_genotyping/joint_genotyping.cwl:24:5:     "basename": "Homo_sapiens_assembly38.fasta",
components/joint_genotyping/joint_genotyping.cwl:24:5:     "nameroot": "Homo_sapiens_assembly38",
components/joint_genotyping/joint_genotyping.cwl:24:5:     "nameext": ".fasta",
components/joint_genotyping/joint_genotyping.cwl:24:5:     "secondaryFiles": []
components/joint_genotyping/joint_genotyping.cwl:24:5: }

If I change it back to obligatory it passes.
Is there any solution?

Thanks

Hi Monika,

If the only difference is whether type is optional, that could be a bug in the code that is supposed to infer what secondary files to use. I’ll have to investigate further.

Something you can try is listing the secondary index file explicitly in your input yaml like this:

{
  "class": "File",
  "location": "keep:570c54e5cc295045cfe9f5b361d63e36+6185/Homo_sapiens_assembly38.fasta",
  "secondaryFiles": [{
    "class": "File",
    "location": "keep:570c54e5cc295045cfe9f5b361d63e36+6185/Homo_sapiens_assembly38.fasta.fai",
  }]
}