Merge branch '19785-add-cwl' into main
[lightning.git] / cwl / lightning / libray2numpy-wf.cwl
1 # Copyright (C) The Lightning Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 $namespaces:
6   arv: "http://arvados.org/cwl#"
7 cwlVersion: v1.2
8 class: Workflow
9 requirements:
10   ScatterFeatureRequirement: {}
11   SubworkflowFeatureRequirement: {}
12   StepInputExpressionRequirement: {}
13 #hints:
14 #  arv:IntermediateOutput:
15 #    outputTTL: 604800
16
17 inputs:
18   tagset:
19     type: File
20   fastadirs:
21     type:
22       type: array
23       items: Directory
24   refdirs:
25     type:
26       type: array
27       items: Directory
28   batchsize:
29     type: int
30   matchgenome_array:
31     type: string[]
32   regions_nestedarray:
33     type:
34       type: array
35       items:
36         type: array
37         items: [File, "null"]
38   threads_array:
39     type: int[]
40   mergeoutput_array:
41     type: string[]
42   expandregions_array:
43     type: int[]
44   phenotypesdir:
45     type: Directory
46   chrs: string[]
47   snpeffdatadir: Directory
48   genomeversion_array: string[]
49   dbsnp:
50     type: File
51     secondaryFiles: [.csi]
52   gnomaddir: Directory
53   readmeinfo: string[]
54
55 outputs:
56   stagednpydir:
57     type: Directory[]
58     outputSource: lightning-slice-numpy-anno2vcf-wf/stagednpydir
59   stagedonehotnpydir:
60     type: Directory[]
61     outputSource: lightning-slice-numpy-anno2vcf-wf/stagedonehotnpydir
62   stagedannotationdir:
63     type:
64       type: array
65       items: [Directory, "null"]
66     outputSource: lightning-slice-numpy-anno2vcf-wf/stagedannotationdir
67   readme:
68     type: File[]
69     outputSource: lightning-slice-numpy-anno2vcf-wf/readme
70
71 steps:
72   batch-dirs:
73     run: batch-dirs.cwl
74     in:
75       dirs: fastadirs
76       batchsize: batchsize
77     out: [batches]
78
79   lightning-import_data:
80     run: lightning-import.cwl
81     scatter: fastadirs
82     in:
83       saveincomplete:
84         valueFrom: "false"
85       tagset: tagset
86       fastadirs: batch-dirs/batches
87     out: [lib]
88
89   lightning-import_refs:
90     run: lightning-import.cwl
91     scatter: fastadirs
92     in:
93       saveincomplete:
94         valueFrom: "true"
95       tagset: tagset
96       fastadirs: refdirs
97     out: [lib]
98
99   lightning-slice:
100     run: lightning-slice.cwl
101     scatter: reflib
102     in:
103       datalibs: lightning-import_data/lib
104       reflib: lightning-import_refs/lib
105     out: [libdir]
106
107   make-arrays:
108     run: make-arrays.cwl
109     in:
110       matchgenome_array: matchgenome_array
111       libdir_array: lightning-slice/libdir
112       genomeversion_array: genomeversion_array
113       regions_nestedarray: regions_nestedarray
114       threads_array: threads_array
115       mergeoutput_array: mergeoutput_array
116       expandregions_array: expandregions_array
117     out: [full_matchgenome_array, full_libdir_array, full_genomeversion_array, full_regions_array, full_threads_array, full_mergeoutput_array, full_expandregions_array, full_libname_array]
118
119   lightning-slice-numpy-anno2vcf-wf:
120     run: lightning-slice-numpy-anno2vcf-wf.cwl
121     scatter: [matchgenome, libdir, genomeversion, regions, threads, mergeoutput, expandregions, libname]
122     scatterMethod: dotproduct
123     in:
124       matchgenome: make-arrays/full_matchgenome_array
125       libdir: make-arrays/full_libdir_array
126       regions: make-arrays/full_regions_array
127       threads: make-arrays/full_threads_array
128       mergeoutput: make-arrays/full_mergeoutput_array
129       expandregions: make-arrays/full_expandregions_array
130       phenotypesdir: phenotypesdir
131       libname: make-arrays/full_libname_array
132       chrs: chrs
133       snpeffdatadir: snpeffdatadir
134       genomeversion: make-arrays/full_genomeversion_array
135       dbsnp: dbsnp
136       gnomaddir: gnomaddir
137       readmeinfo: readmeinfo
138     out: [stagednpydir, stagedonehotnpydir, stagedannotationdir, readme]