|
| 1 | +# Source: https://github.com/heliumdatacommons/TOPMed_RNAseq_CWL/tree/578066ec5d6847892528f973b22531d4c8487280/workflows/complex-workflow |
| 2 | + |
| 3 | +# BSD 3-Clause License |
| 4 | +# |
| 5 | +# Copyright (c) 2018, RTI International |
| 6 | +# All rights reserved. |
| 7 | +# |
| 8 | +# Redistribution and use in source and binary forms, with or without |
| 9 | +# modification, are permitted provided that the following conditions are met: |
| 10 | +# |
| 11 | +# * Redistributions of source code must retain the above copyright notice, this |
| 12 | +# list of conditions and the following disclaimer. |
| 13 | +# |
| 14 | +# * Redistributions in binary form must reproduce the above copyright notice, |
| 15 | +# this list of conditions and the following disclaimer in the documentation |
| 16 | +# and/or other materials provided with the distribution. |
| 17 | +# |
| 18 | +# * Neither the name of the copyright holder nor the names of its |
| 19 | +# contributors may be used to endorse or promote products derived from |
| 20 | +# this software without specific prior written permission. |
| 21 | +# |
| 22 | +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 23 | +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 24 | +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 25 | +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
| 26 | +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 27 | +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 28 | +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 29 | +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 30 | +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 31 | +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 32 | + |
| 33 | +cwlVersion: v1.0 |
| 34 | +class: Workflow |
| 35 | +id: complex-workflow |
| 36 | +inputs: |
| 37 | + archive: |
| 38 | + type: string |
| 39 | + files: |
| 40 | + type: |
| 41 | + type: array |
| 42 | + items: File |
| 43 | + new_archive: |
| 44 | + type: string |
| 45 | + touch_files: |
| 46 | + type: |
| 47 | + type: array |
| 48 | + items: string |
| 49 | + echo_message: |
| 50 | + type: string |
| 51 | + echo_output_location: |
| 52 | + type: string |
| 53 | + |
| 54 | +outputs: |
| 55 | + archive_out: |
| 56 | + type: File |
| 57 | + outputSource: tar_step/archive_out |
| 58 | + touch_out: |
| 59 | + type: |
| 60 | + type: array |
| 61 | + items: File |
| 62 | + outputSource: touch_step/file_out |
| 63 | + echo_out: |
| 64 | + type: File |
| 65 | + outputSource: echo_step/echo_output |
| 66 | + re_tar_out: |
| 67 | + type: File |
| 68 | + outputSource: re_tar_step/archive_out |
| 69 | + |
| 70 | +steps: |
| 71 | + tar_step: |
| 72 | + run: tar.cwl |
| 73 | + in: |
| 74 | + archive_file: |
| 75 | + source: "#archive" |
| 76 | + file_list: |
| 77 | + source: "#files" |
| 78 | + out: [archive_out] |
| 79 | + |
| 80 | + touch_step: |
| 81 | + run: touch.cwl |
| 82 | + scatter: filename |
| 83 | + scatterMethod: dotproduct |
| 84 | + in: |
| 85 | + waitfor: |
| 86 | + source: "#tar_step/archive_out" |
| 87 | + filename: |
| 88 | + source: "#touch_files" |
| 89 | + out: [file_out] |
| 90 | + |
| 91 | + echo_step: |
| 92 | + run: echo.cwl |
| 93 | + in: |
| 94 | + message: "#echo_message" |
| 95 | + output_location: "#echo_output_location" |
| 96 | + out: [echo_output] |
| 97 | + |
| 98 | + re_tar_step: |
| 99 | + run: tar.cwl |
| 100 | + in: |
| 101 | + archive_file: |
| 102 | + source: "#archive" |
| 103 | + file_list: |
| 104 | + source: ["#touch_step/file_out", "#files"] |
| 105 | + linkMerge: merge_flattened |
| 106 | + out: [archive_out] |
| 107 | + |
| 108 | + # rm_step: |
| 109 | + # run: rm.cwl |
| 110 | + # scatter: filename |
| 111 | + # scatterMethod: dotproduct |
| 112 | + # in: |
| 113 | + # waitfor: |
| 114 | + # source: "#re_tar_step/archive_out" |
| 115 | + # filename: |
| 116 | + # source: ["#files", "#touch_step/file_out", "#echo_step/echo_output"] |
| 117 | + # linkMerge: merge_flattened |
| 118 | + # out: [standard_out] |
| 119 | + |
| 120 | +requirements: |
| 121 | + - class: StepInputExpressionRequirement |
| 122 | + - class: ScatterFeatureRequirement |
| 123 | + - class: MultipleInputFeatureRequirement |
0 commit comments