/*
This file includes default values for all Bactopia parameters.
*/

params {
    // Bactopia
    genome_size = null
    max_retry = 3
    min_time = 60
    max_time = 120
    max_memory = 32
    cpus = 4
    outdir = '.'
    fastqs = null
    R1 = null
    R2 = null
    SE = null
    hybrid = false
    accessions = null
    accession = null
    assembly = null
    reassemble = false
    sample = null
    datasets = null
    species = null
    available_datasets = null
    example_fastqs = null
    check_fastqs = null
    compress = false
    keep_all_files = false
    help = null
    help_all = null
    version = null
    infodir = "${params.outdir}/bactopia-info"
    envname = null
    include_tools = null
    verbose = null
    silent = null

    publish_mode = 'copy'
    nfdir = false
    overwrite = false

    sleep_time = 5
    conda_help = false
    force = false
    skip_logs = false
    cleanup_workdir = null
    empty_proteins = "${baseDir}/data/EMPTY_PROTEINS"
    empty_tf = "${baseDir}/data/EMPTY_TF"

    // Profile configs
    condadir = "${baseDir}/conda/envs"
    singularity_cache = "$HOME/.bactopia/singularity"
    registry = "dockerhub"
    queue = 'general,high-memory'
    disable_scratch = false
    aws_region = 'us-east-1'
    aws_volumes = '/opt/conda:/mnt/conda'
    aws_cli_path = '/home/ec2-user/conda/bin/aws'
    aws_upload_storage_class = 'STANDARD'
    aws_max_parallel_transfers = 8
    aws_delay_between_attempts = 15
    aws_max_transfer_attempts = 3
    aws_max_retry = 4
    aws_ecr_registry = null

    /* Nextflow config files
    nfconfig - allows you to provide your own config file to Nextflow

    What this means is you can adjust process rules such as max runtimes, cpu and 
        memory usage, etc...

    Most importantly, this means you can create a profile that allows you to better
        use Bactopia in your environment. This will allow you to create a profile 
        for things such as Sun Grid Engine, SLURM, AWS, etc...

    If you provide a config, its loaded after the default configs. So any changes 
        to the defaults in your config will be reflected.

    Links to Nextflow Docs:
        Nextflow Docs: https://www.nextflow.io/docs/latest/config.html#scope-process
        Nextflow Docs: https://www.nextflow.io/docs/latest/config.html#config-profiles
        Nextflow Executors: https://www.nextflow.io/docs/latest/executor.html
    */
    nfconfig = null

    // process gather_fastqs
    max_downloads = 3
    use_ena = false
    no_cache = false

    // process fastq_status & estimate_genome_size
    /*
        The default value for min_basepairs is based on having a minimum of 20x coverage
        of Nasuia deltocephalinicola (https://en.wikipedia.org/wiki/Nasuia_deltocephalinicola).
        At the time (2019-08-07), it had the smallest genome of all bacteria, clocking in at
        112,091 nucleotides. At 20x, the minimum basepairs required is only ~2Mbp.

        Please, consider this parameter as a technical parameter to prevent downstream
        analyses from failing due to very low coverage. You will need to determine if the
        coverage of processed samples is sufficient or not.

        The default value for min_reads is min_basepairs / 300 . The value of 300 was selected
        based on it being the longest available read length of an Illumina product (MiSeq).

        The default value for max_genome_size was set by adding 2Mbp to the Minicystis rosea
        (https://www.ncbi.nlm.nih.gov/assembly/GCF_001931535.1) genome size (16,040,666 bp).

        The default value for min_genome_size was based on the above Nasuia deltocephalinicola
        genome size (112,091 bp).

        These two parameters are only applied if the genome size is estimated using Mash.
    */
    min_basepairs = '2241820'
    min_reads = '7472'
    min_proportion = 0.5
    max_genome_size = '18040666'
    min_genome_size = '100000'
    skip_fastq_check = false
    
    // process qc_reads
    coverage = '100'
    adapters = null
    ktrim = 'r'
    adapter_k = 23
    mink = 11
    hdist = 1
    tpe = 't'
    tbo = 't'
    phix = null
    phix_k = 31
    qtrim = 'rl'
    trimq = 6
    minlength = 35
    maq = 10
    qout = 33
    tossjunk = 't'
    ftm = 5
    maxcor = 1
    sampleseed = 42
    skip_error_correction = false
    skip_qc = false
    qc_ram = 4

    // process assemble_genome
    shovill_ram = 8
    unicycler_ram = 32
    assembler = 'skesa'
    min_contig_len = 500
    min_contig_cov = 2
    contig_namefmt = null
    shovill_opts = null
    shovill_kmers = null
    trim = null
    nostitch = null
    nocorr = null
    unicycler_mode = 'normal'
    no_miniasm = false
    no_pilon = false
    no_rotate = false
    min_polish_size = 10000
    min_component_size = 1000
    min_dead_end_size = 1000

    // process assembly_qc 
    // checkm
    checkm_unique = 10
    checkm_multi = 10
    aai_strain = 0.9
    checkm_length = 0.7
    full_tree = null
    skip_pseudogene_correction = null
    ignore_thresholds = null
    checkm_ali = null
    checkm_nt = null
    force_domain = null
    no_refinement = null
    individual_markers = null
    skip_adj_correction = null
    skip_checkm = false

    // quast
    contig_thresholds = '0,1000,10000,100000,250000,1000000'
    plots_format = 'pdf'

    // process count_31mers
    cortex_ram = 8
    keep_singletons = false

    // process annotate_genome
    compliant = false
    centre = 'Bactopia'
    nogenes = false
    addmrna = false
    rawproduct = null
    cdsrnaolap = null
    prokka_evalue = '1e-09'
    prokka_coverage = '80'
    norrna = null
    notrna = null
    rnammer = null
    rfam = null
    skip_prodigal_tf = false

    // process minmer_sketch
    mash_sketch = 10000
    sourmash_scale = 10000

    // process minmer_query
    screen_w = true
    screen_i = 0.8
    minmer_ram = 5

    // process ariba_analysis
    nucmer_min_id = 90
    nucmer_min_len = 20
    nucmer_breaklen = 200
    assembly_cov = 50
    min_scaff_depth = 10
    spades_options = null
    assembled_threshold = 0.95
    gene_nt_extend = 30
    unique_threshold = 0.03
    ariba_no_clean = false

    // process call_variants
    snippy_ram = 4
    mapqual = 60
    basequal = 13
    mincov = 10
    minfrac = 0
    minqual = 100
    maxsoft = 10
    bwaopt = null
    fbopt = null

    // process call_variants_auto
    disable_auto_variants = false
    max_references = 1
    random_tie_break = false

    // process blast_query
    perc_identity = 50
    qcov_hsp_perc = 50
    max_target_seqs = 2000

    // process mapping_query
    bwa_mem_opts = null
    bwa_aln_opts = null
    bwa_samse_opts = null
    bwa_sampe_opts = null
    bwa_n = 9999
    keep_unmapped_reads = false

    // process antimicrobial_resistance
    update_amr = false
    amr_ident_min = -1
    amr_coverage_min = 0.5
    amr_organism = null
    amr_translation_table = 11
    amr_plus = false
    amr_report_common = false
}
