aboutsummaryrefslogtreecommitdiff
path: root/workflows/pangenome-generate/relabel-seqs.cwl
diff options
context:
space:
mode:
authorLLTommy2020-04-23 20:18:36 +0200
committerGitHub2020-04-23 20:18:36 +0200
commit7049cd5d29acd601ccbbc9d04f001b84a51e9bd5 (patch)
tree34a1254d81c2e526427fedb1deaa9f8441e8b260 /workflows/pangenome-generate/relabel-seqs.cwl
parentf38b9c6f22b82327df9648938a5a4bcf863d8c41 (diff)
parentc7612e7eda5cd38bfbb2d293bebf732893a41b6c (diff)
downloadbh20-seq-resource-7049cd5d29acd601ccbbc9d04f001b84a51e9bd5.tar.gz
bh20-seq-resource-7049cd5d29acd601ccbbc9d04f001b84a51e9bd5.tar.lz
bh20-seq-resource-7049cd5d29acd601ccbbc9d04f001b84a51e9bd5.zip
Merge branch 'master' into patch-3
Diffstat (limited to 'workflows/pangenome-generate/relabel-seqs.cwl')
-rw-r--r--workflows/pangenome-generate/relabel-seqs.cwl50
1 files changed, 50 insertions, 0 deletions
diff --git a/workflows/pangenome-generate/relabel-seqs.cwl b/workflows/pangenome-generate/relabel-seqs.cwl
new file mode 100644
index 0000000..c1f17a4
--- /dev/null
+++ b/workflows/pangenome-generate/relabel-seqs.cwl
@@ -0,0 +1,50 @@
+cwlVersion: v1.1
+class: CommandLineTool
+inputs:
+ readsFA: File[]
+ subjects: string[]
+ script:
+ type: File
+ default: {class: File, location: relabel-seqs.py}
+ inputBinding: {}
+outputs:
+ relabeledSeqs:
+ type: File
+ outputBinding:
+ glob: relabeledSeqs.fasta
+ originalLabels:
+ type: File
+ outputBinding:
+ glob: originalLabels.ttl
+requirements:
+ InlineJavascriptRequirement: {}
+ InitialWorkDirRequirement:
+ 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]