mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
update svdb merge (#1274)
* update svdb merge * fix undefined variable error * remove prio join in the script block * fix error * fix error again * update tests and refactor
This commit is contained in:
parent
1016c9bd1a
commit
ee915a43e4
3 changed files with 25 additions and 4 deletions
|
@ -21,15 +21,19 @@ process SVDB_MERGE {
|
|||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def input = ""
|
||||
def input = "${vcfs.join(" ")}"
|
||||
def prio = ""
|
||||
if(priority) {
|
||||
prio = "--priority ${priority.join(',')}"
|
||||
for (int index = 0; index < vcfs.size(); index++) {
|
||||
input += " ${vcfs[index]}:${priority[index]}"
|
||||
}
|
||||
}
|
||||
"""
|
||||
svdb \\
|
||||
--merge \\
|
||||
$args \\
|
||||
--priority ${priority.join(',')} \\
|
||||
$prio \\
|
||||
--vcf $input \\
|
||||
> ${prefix}_sv_merge.vcf
|
||||
|
||||
|
|
|
@ -14,3 +14,13 @@ workflow test_svdb_merge {
|
|||
|
||||
SVDB_MERGE ( input, priority )
|
||||
}
|
||||
|
||||
workflow test_svdb_merge_noprio {
|
||||
|
||||
input = [ [ id:'test' ], // meta map
|
||||
[ file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test2_vcf'], checkIfExists: true) ]
|
||||
]
|
||||
|
||||
SVDB_MERGE ( input, [] )
|
||||
}
|
||||
|
|
|
@ -5,3 +5,10 @@
|
|||
- svdb/merge
|
||||
files:
|
||||
- path: output/svdb/test_sv_merge.vcf
|
||||
- name: svdb merge noprio
|
||||
command: nextflow run ./tests/modules/svdb/merge -entry test_svdb_merge_noprio -c ./tests/config/nextflow.config -c ./tests/modules/svdb/merge/nextflow.config
|
||||
tags:
|
||||
- svdb
|
||||
- svdb/merge
|
||||
files:
|
||||
- path: output/svdb/test_sv_merge.vcf
|
||||
|
|
Loading…
Reference in a new issue