Commit 8985a206 authored by Chris Cheshire's avatar Chris Cheshire
Browse files

Updated deeptools plot heatmap

parent 42efc361
Loading
Loading
Loading
Loading
+15 −17
Original line number Diff line number Diff line
/*
 * -----------------------------------------------------
 *  Utility functions used in nf-core DSL2 module files
 * -----------------------------------------------------
 */
//
//  Utility functions used in nf-core DSL2 module files
//

/*
 * Extract name of software tool from process name using $task.process
 */
//
// Extract name of software tool from process name using $task.process
//
def getSoftwareName(task_process) {
    return task_process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()
}

/*
 * Function to initialise default values and to generate a Groovy Map of available options for nf-core modules
 */
//
// Function to initialise default values and to generate a Groovy Map of available options for nf-core modules
//
def initOptions(Map args) {
    def Map options = [:]
    options.args            = args.args ?: ''
@@ -26,18 +24,18 @@ def initOptions(Map args) {
    return options
}

/*
 * Tidy up and join elements of a list to return a path string
 */
//
// Tidy up and join elements of a list to return a path string
//
def getPathFromList(path_list) {
    def paths = path_list.findAll { item -> !item?.trim().isEmpty() }      // Remove empty entries
    paths     = paths.collect { it.trim().replaceAll("^[/]+|[/]+\$", "") } // Trim whitespace and trailing slashes
    return paths.join('/')
}

/*
 * Function to save/publish module results
 */
//
// Function to save/publish module results
//
def saveFiles(Map args) {
    if (!args.filename.endsWith('.version.txt')) {
        def ioptions  = initOptions(args.options)
+3 −3
Original line number Diff line number Diff line
@@ -11,11 +11,11 @@ process DEEPTOOLS_PLOTHEATMAP {
        mode: params.publish_dir_mode,
        saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) }

    conda (params.enable_conda ? "bioconda::deeptools=3.5.0" : null)
    conda (params.enable_conda ? 'bioconda::deeptools=3.5.1' : null)
    if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
        container "https://depot.galaxyproject.org/singularity/deeptools:3.5.0--py_0"
        container "https://depot.galaxyproject.org/singularity/deeptools:3.5.1--py_0"
    } else {
        container "quay.io/biocontainers/deeptools:3.5.0--py_0"
        container "quay.io/biocontainers/deeptools:3.5.1--py_0"
    }

    input: