diff options
author | Peter Amstutz | 2020-04-21 16:20:10 -0400 |
---|---|---|
committer | Peter Amstutz | 2020-04-21 16:20:10 -0400 |
commit | 61726edb9293fe529e6efbe5bb6f1cc953bb3c4e (patch) | |
tree | 49637a78fb9196221d4d6589c2e763b08687aadf /workflows/pangenome-generate/merge-metadata.cwl | |
parent | f4c3da88c1233802fea46cc972a81dc3b5b51185 (diff) | |
download | bh20-seq-resource-61726edb9293fe529e6efbe5bb6f1cc953bb3c4e.tar.gz bh20-seq-resource-61726edb9293fe529e6efbe5bb6f1cc953bb3c4e.tar.lz bh20-seq-resource-61726edb9293fe529e6efbe5bb6f1cc953bb3c4e.zip |
Workaround CWL limit by chunking file list
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>
Diffstat (limited to 'workflows/pangenome-generate/merge-metadata.cwl')
-rw-r--r-- | workflows/pangenome-generate/merge-metadata.cwl | 46 |
1 files changed, 39 insertions, 7 deletions
diff --git a/workflows/pangenome-generate/merge-metadata.cwl b/workflows/pangenome-generate/merge-metadata.cwl index fcefe32..4d9c808 100644 --- a/workflows/pangenome-generate/merge-metadata.cwl +++ b/workflows/pangenome-generate/merge-metadata.cwl @@ -5,16 +5,48 @@ hints: dockerPull: commonworkflowlanguage/cwltool_module inputs: metadata: File[] - metadataSchema: File subjects: string[] - dups: File? - originalLabels: File + metadataSchema: + type: File + inputBinding: {position: 2} + originalLabels: + type: File + inputBinding: {position: 3} + dups: + type: File? + inputBinding: {position: 4} + script: + type: File + inputBinding: {position: 1} + default: {class: File, location: merge-metadata.py} outputs: merged: stdout stdout: mergedmetadata.ttl requirements: + InlineJavascriptRequirement: {} InitialWorkDirRequirement: - listing: - - entry: {$include: merge-metadata.py} - entryname: merge-metadata.py -baseCommand: [python3, merge-metadata.py] + listing: | + ${ + var i = 0; + var b = 1; + var out = []; + for (; i < inputs.metadata.length; i++) { + var block = []; + var sub = []; + for (; i < (b*150) && i < inputs.metadata.length; i++) { + block.push(inputs.metadata[i]); + sub.push(inputs.subjects[i]); + } + out.push({ + entryname: "block"+b, + entry: JSON.stringify(block) + }); + out.push({ + entryname: "subs"+b, + entry: JSON.stringify(sub) + }); + b++; + } + return out; + } +baseCommand: python |