Commit ea66eb10 authored by Tamara Hodgetts's avatar Tamara Hodgetts
Browse files

Merge branch 'resource-allocation' into dev

parents 2cea0207 9a363007
Loading
Loading
Loading
Loading

conf/resources.config

0 → 100644
+170 −0
Original line number Diff line number Diff line
/*
========================================================================================
    nf-core/cutandrun Nextflow resource config file
========================================================================================
    Minimal and process-specific resource allocation.
----------------------------------------------------------------------------------------
*/

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

process {
    withLabel:process_min {
        cpus   = { check_max( 1     * task.attempt, 'cpus'    ) }
        memory = { check_max( 2.GB  * task.attempt, 'memory'  ) }
        time   = { check_max( 1.h   * task.attempt, 'time'    ) }
    }
    
    withLabel:process_ultralow {
        cpus   = { check_max( 2     * task.attempt, 'cpus'    ) }
        memory = { check_max( 8.GB  * task.attempt, 'memory'  ) }
        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
+1 −1
Original line number Diff line number Diff line
process EXPORT_META {
    label 'process_low'
    label 'process_min'

    conda (params.enable_conda ? "conda-forge::gawk=5.1.0" : null)
    container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
+1 −1
Original line number Diff line number Diff line
process AWK {
    tag "$meta.id"
    label 'process_low'
    label 'process_ultralow'

    conda (params.enable_conda ? "conda-forge::gawk=5.1.0" : null)
    container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
+1 −1
Original line number Diff line number Diff line
process AWK_SCRIPT {
    tag "$meta.id"
    label 'process_low'
    label 'process_min'

    conda (params.enable_conda ? "conda-forge::gawk=5.1.0" : null)
    container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
+1 −1
Original line number Diff line number Diff line
process CUT {
    tag "$meta.id"
    label 'process_low'
    label 'process_min'

    conda (params.enable_conda ? "conda-forge::gawk=5.1.0" : null)
    container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
Loading