diff options
author | LLTommy | 2020-04-23 20:18:36 +0200 |
---|---|---|
committer | GitHub | 2020-04-23 20:18:36 +0200 |
commit | 7049cd5d29acd601ccbbc9d04f001b84a51e9bd5 (patch) | |
tree | 34a1254d81c2e526427fedb1deaa9f8441e8b260 /workflows/pangenome-generate/merge-metadata.cwl | |
parent | f38b9c6f22b82327df9648938a5a4bcf863d8c41 (diff) | |
parent | c7612e7eda5cd38bfbb2d293bebf732893a41b6c (diff) | |
download | bh20-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/merge-metadata.cwl')
-rw-r--r-- | workflows/pangenome-generate/merge-metadata.cwl | 44 |
1 files changed, 39 insertions, 5 deletions
diff --git a/workflows/pangenome-generate/merge-metadata.cwl b/workflows/pangenome-generate/merge-metadata.cwl index 9164c09..4d9c808 100644 --- a/workflows/pangenome-generate/merge-metadata.cwl +++ b/workflows/pangenome-generate/merge-metadata.cwl @@ -5,14 +5,48 @@ hints: dockerPull: commonworkflowlanguage/cwltool_module inputs: metadata: File[] - metadataSchema: File subjects: string[] + 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 |