process {

    publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
 

    withName: ASCAT_SIMPLE {
        ext.args = [
          gender    :  'XY',
          genomeVersion : 'hg19',
          minCounts :  '1',
          min_base_qual : '1',
          min_map_qual  : '1',
          chrom_names  : 'c("21","22")'
                  ]
    }



    withName: ASCAT_PLOIDY_AND_PURITY {
        ext.args = [
          gender : 'XX', 
          genomeVersion : 'hg19',
          ploidy  : '1.7', 
          purity : '0.24',
          chrom_names  : 'c("21","22")'
                  ]
    }

    withName: ASCAT_CRAM {
        ext.args = [
          gender    : 'XX', 
          genomeVersion : 'hg19',
          ref_fasta : '/home/ec2-user/input_files/fasta/human_g1k_v37.fasta',
          chrom_names  : 'c("21","22")'
                  ]
    }

}