CWL multidimensional arrays or arrays of tuples
1
1
Entering edit mode
6.1 years ago
mkher ▴ 50

Does CWL support multidimensional arrays? Is there a way to specify a list of paired fastq files? I am specifying them as two arrays of files, one for read1 and another for reaad2. This is awkward and I haven't figured out how to do crossproducts using them.

I have an input that is a list of tuples, and another input and ideally I want to do a crossproduct scatter

A: [(a1_1, a1_2), (a2_1, a2_2),]
B: [b1, b2]

should result in steps with these inputs:

 (a1_1, a1_2), b1
 (a1_1, a1_2), b2
 (a2_1, a2_2), b1
 (a2_1, a2_2), b2

Thank you,

Manisha

CWL • 1.5k views
ADD COMMENT
1
Entering edit mode
6.0 years ago

Yes, you can do that. Please check http://www.commonwl.org/v1.0/Workflow.html#ScatterMethod

In your case, you define the tool to have input A as array of files and B as file. This step should receive array of arrays on input A and array of files on B. If you simply define scatter as

scatter:
  - A
  - B
scatterMethod: nested_crossproduct

you will get the steps like you defined above.

ADD COMMENT

Login before adding your answer.

Traffic: 1993 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