Commit 4bf0df0a authored by Tamara Hodgetts's avatar Tamara Hodgetts
Browse files

Included name- and label-specific resource settings in resources.config

parent 3e668e2f
Loading
Loading
Loading
Loading
+151 −2
Original line number Diff line number Diff line
@@ -6,6 +6,12 @@
----------------------------------------------------------------------------------------
*/

/*
========================================================================================
    MINIMAL AND ULTRA LOW RESOURCE ALLOCATION
========================================================================================
*/

process {
    withLabel:process_min {
        cpus   = { check_max( 1     * task.attempt, 'cpus'    ) }
@@ -19,3 +25,146 @@ process {
        time   = { check_max( 4.h   * task.attempt, 'time'    ) }
    }
}

/*
========================================================================================
    MODULE-SPECIFIC RESOURCE ALLOCATION
========================================================================================
*/

process {
    withName: '.*:ALIGN_BOWTIE2:BOWTIE2_ALIGN' {
        cpus   = { check_max( 32     * task.attempt, 'cpus'    ) }
        memory = { check_max( 64.GB  * task.attempt, 'memory'  ) }
        time   = { check_max( 4.h    * task.attempt, 'time'    ) }
    }
    
    withName: '.*:ALIGN_BOWTIE2:BOWTIE2_SPIKEIN_ALIGN' {
        cpus   = { check_max( 32     * task.attempt, 'cpus'    ) }
        memory = { check_max( 64.GB  * task.attempt, 'memory'  ) }
        time   = { check_max( 4.h    * task.attempt, 'time'    ) }
    }

    withName: 'NFCORE_CUTANDRUN:CUTANDRUN:DEEPTOOLS_COMPUTEMATRIX_GENE' {
        cpus   = { check_max( 16     * task.attempt, 'cpus'    ) }
        memory = { check_max( 32.GB  * task.attempt, 'memory'  ) }
        time   = { check_max( 4.h    * task.attempt, 'time'    ) }
    }

    withName: 'NFCORE_CUTANDRUN:CUTANDRUN:DEEPTOOLS_COMPUTEMATRIX_PEAKS' {
        cpus   = { check_max( 16     * task.attempt, 'cpus'    ) }
        memory = { check_max( 32.GB  * task.attempt, 'memory'  ) }
        time   = { check_max( 4.h    * task.attempt, 'time'    ) }
    }

    withName: 'NFCORE_CUTANDRUN:CUTANDRUN:CUSTOM_DUMPSOFTWAREVERSIONS' {
        cpus   = { check_max( 1     * task.attempt, 'cpus'    ) }
        memory = { check_max( 2.GB  * task.attempt, 'memory'  ) }
        time   = { check_max( 1.h   * task.attempt, 'time'    ) }
    }

    withName: 'NFCORE_CUTANDRUN:CUTANDRUN:.*:SAMTOOLS_INDEX' {
        cpus   = { check_max( 1     * task.attempt, 'cpus'    ) }
        memory = { check_max( 2.GB  * task.attempt, 'memory'  ) }
        time   = { check_max( 1.h   * task.attempt, 'time'    ) }
    }

    withName: 'NFCORE_CUTANDRUN:CUTANDRUN:.*:SAMTOOLS_STATS' {
        cpus   = { check_max( 1     * task.attempt, 'cpus'    ) }
        memory = { check_max( 2.GB  * task.attempt, 'memory'  ) }
        time   = { check_max( 1.h   * task.attempt, 'time'    ) }
    }

    withName: 'NFCORE_CUTANDRUN:CUTANDRUN:.*:SAMTOOLS_STATS' {
        cpus   = { check_max( 1     * task.attempt, 'cpus'    ) }
        memory = { check_max( 2.GB  * task.attempt, 'memory'  ) }
        time   = { check_max( 1.h   * task.attempt, 'time'    ) }
    }

    withName: 'NFCORE_CUTANDRUN:CUTANDRUN:.*:SAMTOOLS_IDXSTATS' {
        cpus   = { check_max( 1     * task.attempt, 'cpus'    ) }
        memory = { check_max( 2.GB  * task.attempt, 'memory'  ) }
        time   = { check_max( 1.h   * task.attempt, 'time'    ) }
    }

    withName: 'NFCORE_CUTANDRUN:CUTANDRUN:.*:SAMTOOLS_FLAGSTAT' {
        cpus   = { check_max( 1     * task.attempt, 'cpus'    ) }
        memory = { check_max( 2.GB  * task.attempt, 'memory'  ) }
        time   = { check_max( 1.h   * task.attempt, 'time'    ) }
    }

    withName: '.*CHROMSIZES' {
        cpus   = { check_max( 1     * task.attempt, 'cpus'    ) }
        memory = { check_max( 2.GB  * task.attempt, 'memory'  ) }
        time   = { check_max( 1.h   * task.attempt, 'time'    ) }
    }

    // 1 CPU 8 GB
    withName: 'NFCORE_CUTANDRUN:CUTANDRUN:PREPARE_PEAKCALLING:BEDTOOLS_GENOMECOV' {
        cpus   = { check_max( 1     * task.attempt, 'cpus'    ) }
        memory = { check_max( 8.GB  * task.attempt, 'memory'  ) }
        time   = { check_max( 4.h   * task.attempt, 'time'    ) }
    }

    withName: 'NFCORE_CUTANDRUN:CUTANDRUN:PREPARE_PEAKCALLING:BEDTOOLS_SORT' {
        cpus   = { check_max( 1     * task.attempt, 'cpus'    ) }
        memory = { check_max( 8.GB  * task.attempt, 'memory'  ) }
        time   = { check_max( 4.h   * task.attempt, 'time'    ) }
    }

    withName: 'NFCORE_CUTANDRUN:CUTANDRUN:PREPARE_PEAKCALLING:UCSC_BEDGRAPHTOBIGWIG' {
        cpus   = { check_max( 1     * task.attempt, 'cpus'    ) }
        memory = { check_max( 8.GB  * task.attempt, 'memory'  ) }
        time   = { check_max( 4.h   * task.attempt, 'time'    ) }
    }

    withName: 'NFCORE_CUTANDRUN:CUTANDRUN:BEDTOOLS_INTERSECT' {
        cpus   = { check_max( 1     * task.attempt, 'cpus'    ) }
        memory = { check_max( 8.GB  * task.attempt, 'memory'  ) }
        time   = { check_max( 4.h   * task.attempt, 'time'    ) }
    }

    withName: '.*:CONSENSUS_PEAKS:BEDTOOLS_MERGE|.*:CONSENSUS_PEAKS_ALL:BEDTOOLS_MERGE' {
        cpus   = { check_max( 1     * task.attempt, 'cpus'    ) }
        memory = { check_max( 8.GB  * task.attempt, 'memory'  ) }
        time   = { check_max( 4.h   * task.attempt, 'time'    ) }
    }

    withName: 'NFCORE_CUTANDRUN:CUTANDRUN:PREPARE_PEAKCALLING:UCSC_BEDCLIP' {
        cpus   = { check_max( 1     * task.attempt, 'cpus'    ) }
        memory = { check_max( 8.GB  * task.attempt, 'memory'  ) }
        time   = { check_max( 4.h   * task.attempt, 'time'    ) }
    }

    // ultralow
    withName: '.*:CALCULATE_FRAGMENTS:BEDTOOLS_BAMTOBED' {
        cpus   = { check_max( 2     * task.attempt, 'cpus'    ) }
        memory = { check_max( 8.GB  * task.attempt, 'memory'  ) }
        time   = { check_max( 4.h   * task.attempt, 'time'    ) }
    }

    withName: 'NFCORE_CUTANDRUN:CUTANDRUN:SEACR_CALLPEAK' {
        cpus   = { check_max( 2     * task.attempt, 'cpus'    ) }
        memory = { check_max( 8.GB  * task.attempt, 'memory'  ) }
        time   = { check_max( 4.h   * task.attempt, 'time'    ) }
    }

    withName: 'NFCORE_CUTANDRUN:CUTANDRUN:FASTQC_TRIMGALORE:FASTQC' {
        cpus   = { check_max( 2     * task.attempt, 'cpus'    ) }
        memory = { check_max( 8.GB  * task.attempt, 'memory'  ) }
        time   = { check_max( 4.h   * task.attempt, 'time'    ) }
    }

    // memory
    withName: 'NFCORE_CUTANDRUN:CUTANDRUN:DEEPTOOLS_PLOTHEATMAP_PEAKS' {
        cpus   = { check_max( 1     * task.attempt, 'cpus'    ) }
        memory = { check_max( 32.GB  * task.attempt, 'memory'  ) }
        time   = { check_max( 4.h   * task.attempt, 'time'    ) }
    }

    withName: 'NFCORE_CUTANDRUN:CUTANDRUN:.*:SAMTOOLS_VIEW' {
        cpus   = { check_max( 1     * task.attempt, 'cpus'    ) }
        memory = { check_max( 32.GB  * task.attempt, 'memory'  ) }
        time   = { check_max( 4.h   * task.attempt, 'time'    ) }
    }
}
 No newline at end of file