aboutsummaryrefslogtreecommitdiff
path: root/workflows/pangenome-generate/relabel-seqs.cwl
diff options
context:
space:
mode:
authorPeter Amstutz2020-04-21 15:37:58 -0400
committerPeter Amstutz2020-04-21 15:38:33 -0400
commitf4c3da88c1233802fea46cc972a81dc3b5b51185 (patch)
treeec3d7bd36669ce3b6005b7d3bce07c920a13b458 /workflows/pangenome-generate/relabel-seqs.cwl
parentcad23032ecf6ef325aab2978d5df36609ad50088 (diff)
downloadbh20-seq-resource-f4c3da88c1233802fea46cc972a81dc3b5b51185.tar.gz
bh20-seq-resource-f4c3da88c1233802fea46cc972a81dc3b5b51185.tar.lz
bh20-seq-resource-f4c3da88c1233802fea46cc972a81dc3b5b51185.zip
Work around CWL content size limit by chunking
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>
Diffstat (limited to 'workflows/pangenome-generate/relabel-seqs.cwl')
-rw-r--r--workflows/pangenome-generate/relabel-seqs.cwl31
1 files changed, 27 insertions, 4 deletions
diff --git a/workflows/pangenome-generate/relabel-seqs.cwl b/workflows/pangenome-generate/relabel-seqs.cwl
index 2b780d4..01196f6 100644
--- a/workflows/pangenome-generate/relabel-seqs.cwl
+++ b/workflows/pangenome-generate/relabel-seqs.cwl
@@ -3,6 +3,10 @@ class: CommandLineTool
inputs:
readsFA: File[]
subjects: string[]
+ script:
+ type: File
+ default: {class: File, location: relabel-seqs.py}
+ inputBinding: {}
outputs:
relabeledSeqs:
type: File
@@ -15,11 +19,30 @@ outputs:
requirements:
InlineJavascriptRequirement: {}
InitialWorkDirRequirement:
- listing:
- - entry: {$include: relabel-seqs.py}
- entryname: relabel-seqs.py
+ listing: |
+ ${
+ var i = 0;
+ var b = 1;
+ var out = [];
+ for (; i < inputs.readsFA.length; i++) {
+ var block = [];
+ for (; i < (b*100) && i < inputs.readsFA.length; i++) {
+ block.push(inputs.readsFA[i]);
+ }
+ out.push({
+ entryname: "block"+b,
+ entry: JSON.stringify(block)
+ });
+ b++;
+ }
+ out.push({
+ entry: JSON.stringify(inputs.subjects),
+ entryname: "subjects"
+ });
+ return out;
+ }
hints:
DockerRequirement:
dockerPull: commonworkflowlanguage/cwltool_module
stdout:
-baseCommand: [python, relabel-seqs.py]
+baseCommand: [python]