/*
========================================================================================
    Config file for defining DSL2 per module options
========================================================================================
    Available keys to override module options:
        args            = Additional arguments appended to command in module.
        args2           = Second set of arguments appended to command in module (multi-tool modules).
        args3           = Third set of arguments appended to command in module (multi-tool modules).
        publish_dir     = Directory to publish results.
        publish_by_meta = Groovy list of keys available in meta map to append as directories to "publish_dir" path
                            If publish_by_meta = true                 - Value of ${meta['id']} is appended as a directory to "publish_dir" path
                            If publish_by_meta = ['id', 'custompath'] - If "id" is in meta map and "custompath" isn't then "${meta['id']}/custompath/"
                                                                        is appended as a directory to "publish_dir" path
                            If publish_by_meta = false / null         - No directories are appended to "publish_dir" path
        publish_files   = Groovy map where key = "file_ext" and value = "directory" to publish results for that file extension
                            The value of "directory" is appended to the standard "publish_dir" path as defined above.
                            If publish_files = null (unspecified)     - All files are published.
                            If publish_files = false                  - No files are published.
        suffix          = File name suffix for output files.
----------------------------------------------------------------------------------------
*/

params {
    modules {
        'create_ercc_fasta' {
            publish_dir = "references/${params.genome}"
        }
        'bowtie2_align' {
            publish_files = false
        }
        'bowtie2_index' {
            args = ""
            publish_dir = "references/${params.genome}"
        }
        'cat_fasta' {
            publish_dir = "references/${params.genome}"
        }
        'cutadapt' {
            args = "-m 20 -A 'T{68}' --pair-filter=both"
        }
        'demultiplex' {
            args = "20 1 20 1"
        }
        'extract_labels' {
            publish_files = false
        }
        'fastp' {
            publish_files = false
            args = "--split_by_lines 4000000"
        }
        'fastqc' {
            args = "--quiet"
        }
        'gunzip' {
            args = ""
            publish_dir = "references/${params.genome}"
        }
        'hisat2_index' {
            args = ""
            publish_dir = "references/${params.genome}"
        }
        'hisat2_align' {
            args = ""
            publish_files = false
        }
        'multiqc' {
            args = ""
        }
        'qc_aligned' {
            publish_files = false
        }
        'star_align' {
            args = "--soloType CB_UMI_Simple --soloCBstart 1 --soloCBlen 11 --soloUMIstart 12 --soloUMIlen 8 --soloFeatures Gene GeneFull SJ Velocyto"
        }
        'star_index' {
            publish_dir = "references/${params.genome}"
        }
        'cut_sam' {
            publish_files = false
        }
        'wget' {
            publish_dir = "references/${params.genome}"
        }
    }
}
