/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Config file for defining DSL2 per module options and publishing paths
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Available keys to override module options:
        ext.args            = Additional arguments appended to command in module.
        ext.args2           = Second set of arguments appended to command in module (multi-tool modules).
        ext.args3           = Third set of arguments appended to command in module (multi-tool modules).
        ext.prefix          = File name prefix for output files.
        ext.when            = Conditional clause
----------------------------------------------------------------------------------------
*/

//
// cnvnator calling options
//

process {

    withName: ".*CALL_STRUCTURAL_VARIANTS:CALL_SV_CNVNATOR:CNVNATOR_HIST" {
        tag = { "$meta2.id" }
        ext.args = { "-his ${params.cnvnator_binsize}" }
    }

    withName: ".*CALL_STRUCTURAL_VARIANTS:CALL_SV_CNVNATOR:CNVNATOR_STAT" {
        tag = { "$meta2.id" }
        ext.args = { "-stat ${params.cnvnator_binsize}" }
    }

    withName: ".*CALL_STRUCTURAL_VARIANTS:CALL_SV_CNVNATOR:CNVNATOR_PARTITION" {
        tag = { "$meta2.id" }
        ext.args = { "-partition ${params.cnvnator_binsize}" }
    }

    withName: ".*CALL_STRUCTURAL_VARIANTS:CALL_SV_CNVNATOR:CNVNATOR_CALL" {
        tag = { "$meta2.id" }
        ext.args = { "-call ${params.cnvnator_binsize}" }
    }

    withName: '.*CALL_STRUCTURAL_VARIANTS:CALL_SV_CNVNATOR:SVDB_MERGE_CNVNATOR' {
        ext.args   = '--notag --pass_only'
        ext.prefix = { "${meta.id}_cnvnator" }
    }
}
