Purpose of secondaryFiles in InputParameter and CommandInputParameter
1
0
Entering edit mode
6.2 years ago

Hi,

I understand that secondaryFiles in a CommandInputParameter can be a convenience function as input files can be specified implicitly when they have filenames that, for example, share a prefix with the primary input file. But my understanding is that a CommandLineTool with secondaryFiles in one of the CommandInputParameters cannot be used in a workflow, as the name of the secondaryFiles (i.e. the name of the primary input file) may not be known yet at submission time. I saw that related questions on biostars regarding the use of secondaryFiles were answered with ideas for workarounds for this problem. I have the impression that the use of patterns in secondaryFiles defeats the idea of being able to compose new workflows by connecting Workflows and {CommandLine,Expression}Tools!?

cwl • 1.5k views
ADD COMMENT
0
Entering edit mode
a CommandLineTool with secondaryFiles in one of the CommandInputParameters cannot be used in a workflow

I don't believe this should be a problem in CWL, this should be supported:

inputs:
  input_bams:
    type:
      type: array
      items: File
    inputBinding:
      prefix: --in
    secondaryFiles:
    - ^.bai

Could you possibly provide a link to the biostars questions you refer to?

ADD REPLY
0
Entering edit mode

I was referring to this question: CWL passing secondary files in a workflow

ADD REPLY
0
Entering edit mode
6.2 years ago

I think I found the answer to my problem myself. SecondaryFiles in a CommandLineTool within a workflow, do not come from disk via the pattern. They are provided as a File with SecondaryFiles via the workflow input or output of another Tool. The pattern has no relevance at this point. Before a tool is executed, the engine provides a input file with its SecondaryFiles. Only then the pattern may or may not be used to verify the SecondaryFiles match the correct pattern.

ADD COMMENT

Login before adding your answer.

Traffic: 1843 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6