/*
 * -------------------------------------------------
 *  Nextflow config file for running tests
 * -------------------------------------------------
 * Defines bundled input files and everything required
 * to run a fast and simple test. Use as follows:
 * nextflow run nf-core/eager -profile test, docker (or singularity, or conda)
 */

params {
   config_profile_name = 'nf-core/eager benchmarking - human profile'
   config_profile_description = "A 'fullsized' benchmarking profile for deepish Human sequencing aDNA data" 

   //Input data
   input = 'https://raw.githubusercontent.com/jfy133/test-datasets/eager/testdata/Benchmarking/benchmarking_human.tsv'
   // Genome reference
   fasta = 'https://hgdownload.soe.ucsc.edu/goldenPath/hg19/bigZips/hg19.fa.gz'

   run_bam_filtering = true
   bam_discard_unmapped = true
   bam_unmapped_type = 'discard'
   bam_mapping_quality_threshold = 30

   dedupper = 'markduplicates'
  
   run_trim_bam = true
   bamutils_clip_left = 1
   bamutils_clip_right = 1
   
   // JAR will need to be downloaded first!
   run_genotyping = true
   genotyping_tool = 'ug'
   genotyping_source = 'trimmed'
   gatk_ug_jar = 'GenomeAnalysisTK.jar'
   gatk_call_conf = 20

   run_sexdeterrmine = true
   sexdeterrmine_bedfile = 'https://raw.githubusercontent.com/nf-core/test-datasets/eager/reference/Human/1240K.pos.list_HG19.0based.bed.gz'

   run_nuclear_contamination = true
   contamination_chrom_name = 'chrX'

   run_mtnucratio = true


}

process {
   withName:'makeBWAIndex'{
      time = { check_max( 4.h * task.attempt, 'time' ) }
   }
   withName:'adapter_removal'{
      cpus = { check_max( 8, 'cpus' ) }
      memory = { check_max( 16.GB * task.attempt, 'memory' ) }
      time = { check_max( 2.h * task.attempt, 'time' ) }
   }
   withName:'bwa'{
      cpus = { check_max( 8, 'cpus' ) }
      memory = { check_max( 16.GB * task.attempt, 'memory' ) }
      time = { check_max( 4.h * task.attempt, 'time' ) }
   }
   withName:'markDup'{
      cpus = { check_max( 16, 'cpus' ) }
      memory = { check_max( 64.GB * task.attempt, 'memory' ) }
      time = { check_max( 4.h * task.attempt, 'time' ) }
   }
   withName:'damageprofiler'{
      cpus = 1
      memory = { check_max( 8.GB * task.attempt, 'memory' ) }
      time = { check_max( 2.h * task.attempt, 'time' ) }
   }
}
