From 1b0be3ad06eee6f0a8da7b8dfec2ad8693631d9c Mon Sep 17 00:00:00 2001
From: nservant <nicolas.servant@curie.fr>
Date: Mon, 19 Dec 2022 16:16:10 +0100
Subject: [PATCH] [MODULE] replace cooler local module by nfcore module

---
 modules/local/cooler/balance.nf  | 35 ----------------------------
 modules/local/cooler/cload.nf    | 39 --------------------------------
 modules/local/cooler/dump.nf     | 35 ----------------------------
 modules/local/cooler/makebins.nf | 30 ------------------------
 4 files changed, 139 deletions(-)
 delete mode 100644 modules/local/cooler/balance.nf
 delete mode 100644 modules/local/cooler/cload.nf
 delete mode 100644 modules/local/cooler/dump.nf
 delete mode 100644 modules/local/cooler/makebins.nf

diff --git a/modules/local/cooler/balance.nf b/modules/local/cooler/balance.nf
deleted file mode 100644
index d03959a..0000000
--- a/modules/local/cooler/balance.nf
+++ /dev/null
@@ -1,35 +0,0 @@
-process COOLER_BALANCE {
-    tag "$meta.id"
-    label 'process_high'
-
-    conda (params.enable_conda ? "bioconda::cooler=0.8.11" : null)
-    container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
-        'https://depot.galaxyproject.org/singularity/cooler:0.8.11--pyh3252c3a_0' :
-        'quay.io/biocontainers/cooler:0.8.11--pyh3252c3a_0' }"
-
-    input:
-    tuple val(meta), path(cool), val(resolution)
-
-    output:
-    tuple val(meta), path("${prefix}.${extension}"), emit: cool
-    path "versions.yml"                            , emit: versions
-
-    script:
-    def args = task.ext.args ?: ''
-    prefix = task.ext.prefix ?: "${cool.baseName}_balanced"
-    suffix = resolution ? "::$resolution" : ""
-    extension = cool.getExtension()
-    """
-    cooler balance \\
-        $args \\
-        -p ${task.cpus} \\
-        ${cool}${suffix}
-
-    cp ${cool} ${prefix}.${extension}
-
-    cat <<-END_VERSIONS > versions.yml
-    "${task.process}":
-        cooler: \$(cooler --version 2>&1 | sed 's/cooler, version //')
-    END_VERSIONS
-    """
-}
diff --git a/modules/local/cooler/cload.nf b/modules/local/cooler/cload.nf
deleted file mode 100644
index 2dd29b7..0000000
--- a/modules/local/cooler/cload.nf
+++ /dev/null
@@ -1,39 +0,0 @@
-process COOLER_CLOAD {
-    tag "$meta.id"
-    label 'process_high'
-
-    conda (params.enable_conda ? "bioconda::cooler=0.8.11" : null)
-    container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
-        'https://depot.galaxyproject.org/singularity/cooler:0.8.11--pyh3252c3a_0' :
-        'quay.io/biocontainers/cooler:0.8.11--pyh3252c3a_0' }"
-
-    input:
-    tuple val(meta), path(pairs), path(index), val(cool_bin)
-    path chromsizes
-
-    output:
-    tuple val(meta), path("*.cool"), val(cool_bin), emit: cool
-    path "versions.yml"                           , emit: versions
-
-    when:
-    task.ext.when == null || task.ext.when
-
-    script:
-    def args = task.ext.args ?: ''
-    def prefix = task.ext.prefix ?: "${meta.id}"
-    def nproc  = args.contains('pairix') || args.contains('tabix')? "--nproc $task.cpus" : ''
-
-    """
-    cooler cload \\
-        $args \\
-        $nproc \\
-        ${chromsizes}:${cool_bin} \\
-        $pairs \\
-        ${prefix}.${cool_bin}.cool
-
-    cat <<-END_VERSIONS > versions.yml
-    "${task.process}":
-        cooler: \$(cooler --version 2>&1 | sed 's/cooler, version //')
-    END_VERSIONS
-    """
-}
diff --git a/modules/local/cooler/dump.nf b/modules/local/cooler/dump.nf
deleted file mode 100644
index 0c01c8d..0000000
--- a/modules/local/cooler/dump.nf
+++ /dev/null
@@ -1,35 +0,0 @@
-process COOLER_DUMP {
-    tag "$meta.id"
-    label 'process_high'
-
-    conda (params.enable_conda ? "bioconda::cooler=0.8.11" : null)
-    container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
-        'https://depot.galaxyproject.org/singularity/cooler:0.8.11--pyh3252c3a_0' :
-        'quay.io/biocontainers/cooler:0.8.11--pyh3252c3a_0' }"
-
-    input:
-    tuple val(meta), path(cool), val(resolution)
-
-    output:
-    tuple val(meta), path("*.bedpe"), emit: bedpe
-    path "versions.yml"             , emit: versions
-
-    when:
-    task.ext.when == null || task.ext.when
-
-    script:
-    def args = task.ext.args ?: ''
-    def prefix = task.ext.prefix ?: "${meta.id}"
-    def suffix = resolution ? "::$resolution" : ""
-    """
-    cooler dump \\
-        $args \\
-        -o ${prefix}.bedpe \\
-        $cool$suffix
-
-    cat <<-END_VERSIONS > versions.yml
-    "${task.process}":
-        cooler: \$(cooler --version 2>&1 | sed 's/cooler, version //')
-    END_VERSIONS
-    """
-}
diff --git a/modules/local/cooler/makebins.nf b/modules/local/cooler/makebins.nf
deleted file mode 100644
index 09147d4..0000000
--- a/modules/local/cooler/makebins.nf
+++ /dev/null
@@ -1,30 +0,0 @@
-process COOLER_MAKEBINS {
-    tag "${cool_bin}"
-    label 'process_low'
-
-    conda (params.enable_conda ? "bioconda::cooler=0.8.11" : null)
-    container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
-        'https://depot.galaxyproject.org/singularity/cooler:0.8.11--pyh3252c3a_0' :
-        'quay.io/biocontainers/cooler:0.8.11--pyh3252c3a_0' }"
-
-    input:
-    tuple path(chromsizes), val(cool_bin)
-
-    output:
-    path ("*.bed")       , emit: bed
-    path ("versions.yml"), emit: versions
-
-    script:
-    def args = task.ext.args ?: ''
-    """
-    cooler makebins \\
-        $args \\
-        ${chromsizes} \\
-        ${cool_bin} > cooler_bins_${cool_bin}.bed
-
-    cat <<-END_VERSIONS > versions.yml
-    "${task.process}":
-        cooler: \$(cooler --version 2>&1 | sed 's/cooler, version //')
-    END_VERSIONS
-    """
-}
-- 
GitLab