/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    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
----------------------------------------------------------------------------------------
*/

//
// Call SNVs in mitochondria
//

process {

    withName: '.*CALL_SNV_MT:GATK4_MUTECT2_MT' {
        ext.args = '--mitochondria-mode TRUE'
    }

    withName: '.*CALL_SNV_MT:GATK4_FILTERMUTECTCALLS_MT' {
        ext.prefix = { "${meta.id}_filtered" }
    }
}

//
// Call SNVs in shifted mitochondria
//

process {

    withName: '.*CALL_SNV_MT_SHIFT:GATK4_MUTECT2_MT' {
        ext.args = '--mitochondria-mode TRUE'
    }

    withName: '.*CALL_SNV_MT_SHIFT:GATK4_FILTERMUTECTCALLS_MT' {
        ext.prefix = { "${meta.id}_filtered_shifted" }
    }

}
