aboutsummaryrefslogtreecommitdiff
path: root/workflows/pangenome-generate/relabel-seqs.cwl
diff options
context:
space:
mode:
Diffstat (limited to 'workflows/pangenome-generate/relabel-seqs.cwl')
-rw-r--r--workflows/pangenome-generate/relabel-seqs.cwl33
1 files changed, 29 insertions, 4 deletions
diff --git a/workflows/pangenome-generate/relabel-seqs.cwl b/workflows/pangenome-generate/relabel-seqs.cwl
index 2b780d4..c1f17a4 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,32 @@ 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 = [];
+ var sub = [];
+ for (; i < (b*150) && i < inputs.readsFA.length; i++) {
+ block.push(inputs.readsFA[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;
+ }
hints:
DockerRequirement:
dockerPull: commonworkflowlanguage/cwltool_module
stdout:
-baseCommand: [python, relabel-seqs.py]
+baseCommand: [python]