From 7da045e1511f2eb4abf5182f9520975c62fe9920 Mon Sep 17 00:00:00 2001
From: Mia Croiset <mia.croiset@ens-lyon.fr>
Date: Wed, 14 Jun 2023 08:59:44 +0200
Subject: [PATCH] update docker registry + delete samtools index

---
 modules/local/filterbam/main.nf               |  4 +-
 modules/local/hicexplorer/hicPlotMatrix.nf    |  2 +-
 modules/local/hicstuff/bam2pairs.nf           |  2 +-
 modules/local/hicstuff/build_matrix.nf        |  2 +-
 modules/local/hicstuff/build_matrix_cool.nf   |  2 +-
 .../local/hicstuff/build_matrix_cool_alt.nf   |  2 +-
 modules/local/hicstuff/distance_law.nf        |  2 +-
 modules/local/hicstuff/filter_event.nf        |  2 +-
 modules/local/hicstuff/filter_pcr.nf          |  2 +-
 modules/local/hicstuff/fragment_enzyme.nf     |  2 +-
 .../custom/picard/markduplicates/main.nf      |  2 +-
 modules/nf-core/custom/samtools/index/main.nf | 46 ----------------
 .../nf-core/custom/samtools/index/meta.yml    | 53 -------------------
 modules/nf-core/custom/samtools/sort/main.nf  |  2 +-
 .../nf-core/custom/samtools_n/sort/main.nf    |  2 +-
 subworkflows/local/filter_pcr_dup.nf          |  1 -
 16 files changed, 14 insertions(+), 114 deletions(-)
 delete mode 100644 modules/nf-core/custom/samtools/index/main.nf
 delete mode 100644 modules/nf-core/custom/samtools/index/meta.yml

diff --git a/modules/local/filterbam/main.nf b/modules/local/filterbam/main.nf
index 0f63be6..525c49a 100644
--- a/modules/local/filterbam/main.nf
+++ b/modules/local/filterbam/main.nf
@@ -5,7 +5,7 @@ process FILTER_PAIR {
     conda "bioconda::samtools=1.17"
     container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
         'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' :
-        'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }"
+        'biocontainers/samtools:1.17--h00cdaf9_0' }"
 
     input:
     tuple val(meta1), path(bam1), val(meta2), path(bam2)
@@ -22,4 +22,4 @@ process FILTER_PAIR {
     samtools view -h -N common_reads.txt ${bam2} -O BAM > ${meta2.id}_2paired.bam
 
     """
-}
\ No newline at end of file
+}
diff --git a/modules/local/hicexplorer/hicPlotMatrix.nf b/modules/local/hicexplorer/hicPlotMatrix.nf
index 8041aa1..60e1fec 100644
--- a/modules/local/hicexplorer/hicPlotMatrix.nf
+++ b/modules/local/hicexplorer/hicPlotMatrix.nf
@@ -5,7 +5,7 @@ process HIC_PLOT_MATRIX {
     conda "bioconda::hicexplorer=3.7.2"
     container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
         'https://depot.galaxyproject.org/singularity/hicexplorer:3.7.2--pyhdfd78af_1' :
-        'quay.io/biocontainers/hicexplorer:3.7.2--pyhdfd78af_1' }"
+        'biocontainers/hicexplorer:3.7.2--pyhdfd78af_1' }"
 
 
     input:
diff --git a/modules/local/hicstuff/bam2pairs.nf b/modules/local/hicstuff/bam2pairs.nf
index 4b2b26e..fba720d 100644
--- a/modules/local/hicstuff/bam2pairs.nf
+++ b/modules/local/hicstuff/bam2pairs.nf
@@ -3,7 +3,7 @@ process BAM2PAIRS {
     label 'process_high'
 
     conda "conda-forge::python=3.9 conda-forge::biopython=1.80 conda-forge::numpy=1.22.3 conda-forge::matplotlib=3.6.3 conda-forge::pandas=1.5.3"
-    container = "lbmc/hicstuff:3.1.3"
+    container = "docker.io/lbmc/hicstuff:3.1.3"
 
     input:
     tuple val(meta1), path(bam1), val(meta2), path(bam2)
diff --git a/modules/local/hicstuff/build_matrix.nf b/modules/local/hicstuff/build_matrix.nf
index d8ff6a6..4d531e9 100644
--- a/modules/local/hicstuff/build_matrix.nf
+++ b/modules/local/hicstuff/build_matrix.nf
@@ -3,7 +3,7 @@ process BUILD_MATRIX {
     label 'process_single'
 
     conda "conda-forge::python=3.9 conda-forge::biopython=1.80 conda-forge::numpy=1.22.3 conda-forge::matplotlib=3.6.3 conda-forge::pandas=1.5.3"
-    container = "lbmc/hicstuff:3.1.3"
+    container = "docker.io/lbmc/hicstuff:3.1.3"
 
     input:
     tuple val(meta1), path(idx_pairs)
diff --git a/modules/local/hicstuff/build_matrix_cool.nf b/modules/local/hicstuff/build_matrix_cool.nf
index 3611061..b39f669 100644
--- a/modules/local/hicstuff/build_matrix_cool.nf
+++ b/modules/local/hicstuff/build_matrix_cool.nf
@@ -3,7 +3,7 @@ process BUILD_MATRIX_COOL {
     label 'process_single'
 
     conda "conda-forge::python=3.9 conda-forge::biopython=1.80 conda-forge::numpy=1.22.3 conda-forge::matplotlib=3.6.3 conda-forge::pandas=1.5.3"
-    container = "lbmc/hicstuff:3.1.3"
+    container = "docker.io/lbmc/hicstuff:3.1.3"
 
     input:
     tuple val(meta1), path(idx_pairs)
diff --git a/modules/local/hicstuff/build_matrix_cool_alt.nf b/modules/local/hicstuff/build_matrix_cool_alt.nf
index a52465d..93dfd35 100644
--- a/modules/local/hicstuff/build_matrix_cool_alt.nf
+++ b/modules/local/hicstuff/build_matrix_cool_alt.nf
@@ -3,7 +3,7 @@ process BUILD_MATRIX_COOL_ALT {
     label 'process_single'
 
     conda "conda-forge::python=3.9 conda-forge::biopython=1.80 conda-forge::numpy=1.22.3 conda-forge::matplotlib=3.6.3 conda-forge::pandas=1.5.3"
-    container = "lbmc/hicstuff:3.1.3"
+    container = "docker.io/lbmc/hicstuff:3.1.3"
 
     input:
     tuple val(meta), path(chromosome_size)
diff --git a/modules/local/hicstuff/distance_law.nf b/modules/local/hicstuff/distance_law.nf
index c87112c..9a6ad8e 100644
--- a/modules/local/hicstuff/distance_law.nf
+++ b/modules/local/hicstuff/distance_law.nf
@@ -3,7 +3,7 @@ process DISTANCE_LAW {
     label 'process_high'
 
     conda "conda-forge::python=3.9 conda-forge::biopython=1.80 conda-forge::numpy=1.22.3 conda-forge::matplotlib=3.6.3 conda-forge::pandas=1.5.3"
-    container = "lbmc/hicstuff:3.1.3"
+    container = "docker.io/lbmc/hicstuff:3.1.3"
 
     input:
     tuple val(meta1), path(idx_pairs)
diff --git a/modules/local/hicstuff/filter_event.nf b/modules/local/hicstuff/filter_event.nf
index 2fa7051..777ad50 100644
--- a/modules/local/hicstuff/filter_event.nf
+++ b/modules/local/hicstuff/filter_event.nf
@@ -3,7 +3,7 @@ process FILTER_EVENT {
     label 'process_high'
 
     conda "conda-forge::python=3.9 conda-forge::biopython=1.80 conda-forge::numpy=1.22.3 conda-forge::matplotlib=3.6.3 conda-forge::pandas=1.5.3"
-    container = "lbmc/hicstuff:3.1.3"
+    container = "docker.io/lbmc/hicstuff:3.1.3"
 
     input:
     tuple val(meta1), path(idx_pairs)
diff --git a/modules/local/hicstuff/filter_pcr.nf b/modules/local/hicstuff/filter_pcr.nf
index 57ab0f4..0b6800f 100644
--- a/modules/local/hicstuff/filter_pcr.nf
+++ b/modules/local/hicstuff/filter_pcr.nf
@@ -3,7 +3,7 @@ process FILTER_PCR {
     label 'process_high'
 
     conda "conda-forge::python=3.9 conda-forge::biopython=1.80 conda-forge::numpy=1.22.3 conda-forge::matplotlib=3.6.3 conda-forge::pandas=1.5.3"
-    container = "lbmc/hicstuff:3.1.3"
+    container = "docker.io/lbmc/hicstuff:3.1.3"
 
     input:
     tuple val(meta1), path(idx_pairs)
diff --git a/modules/local/hicstuff/fragment_enzyme.nf b/modules/local/hicstuff/fragment_enzyme.nf
index b770ee4..855bf48 100644
--- a/modules/local/hicstuff/fragment_enzyme.nf
+++ b/modules/local/hicstuff/fragment_enzyme.nf
@@ -3,7 +3,7 @@ process FRAGMENT_ENZYME {
     label "process_single"
 
     conda "conda-forge::python=3.9 conda-forge::biopython=1.80 conda-forge::numpy=1.22.3 conda-forge::matplotlib=3.6.3 conda-forge::pandas=1.5.3"
-    container = "lbmc/hicstuff:3.1.3"
+    container = "docker.io/lbmc/hicstuff:3.1.3"
 
     input:
     val(digestion)
diff --git a/modules/nf-core/custom/picard/markduplicates/main.nf b/modules/nf-core/custom/picard/markduplicates/main.nf
index eef8c81..d7b3567 100644
--- a/modules/nf-core/custom/picard/markduplicates/main.nf
+++ b/modules/nf-core/custom/picard/markduplicates/main.nf
@@ -5,7 +5,7 @@ process PICARD_MARKDUPLICATES {
     conda "bioconda::picard=3.0.0"
     container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
         'https://depot.galaxyproject.org/singularity/picard:3.0.0--hdfd78af_1' :
-        'quay.io/biocontainers/picard:3.0.0--hdfd78af_1' }"
+        'biocontainers/picard:3.0.0--hdfd78af_1' }"
 
     input:
     tuple val(meta), path(bam)
diff --git a/modules/nf-core/custom/samtools/index/main.nf b/modules/nf-core/custom/samtools/index/main.nf
deleted file mode 100644
index 05fa975..0000000
--- a/modules/nf-core/custom/samtools/index/main.nf
+++ /dev/null
@@ -1,46 +0,0 @@
-process SAMTOOLS_INDEX {
-    tag "$meta.id"
-    label 'process_low'
-
-    conda "bioconda::samtools=1.17"
-    container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
-        'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' :
-        'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }"
-
-    input:
-    tuple val(meta), path(input)
-
-    output:
-    tuple val(meta), path("*.bai") , optional:true, emit: bai
-    tuple val(meta), path("*.csi") , optional:true, emit: csi
-    tuple val(meta), path("*.crai"), optional:true, emit: crai
-    path  "versions.yml"           , emit: versions
-
-    when:
-    task.ext.when == null || task.ext.when
-
-    script:
-    def args = task.ext.args ?: ''
-    """
-    samtools \\
-        index \\
-        -@ ${task.cpus-1} \\
-        $args \\
-        $input
-    cat <<-END_VERSIONS > versions.yml
-    "${task.process}":
-        samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
-    END_VERSIONS
-    """
-
-    stub:
-    """
-    touch ${input}.bai
-    touch ${input}.crai
-    touch ${input}.csi
-    cat <<-END_VERSIONS > versions.yml
-    "${task.process}":
-        samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
-    END_VERSIONS
-    """
-}
\ No newline at end of file
diff --git a/modules/nf-core/custom/samtools/index/meta.yml b/modules/nf-core/custom/samtools/index/meta.yml
deleted file mode 100644
index 6037b9e..0000000
--- a/modules/nf-core/custom/samtools/index/meta.yml
+++ /dev/null
@@ -1,53 +0,0 @@
-name: samtools_index
-description: Index SAM/BAM/CRAM file
-keywords:
-  - index
-  - bam
-  - sam
-  - cram
-tools:
-  - samtools:
-      description: |
-        SAMtools is a set of utilities for interacting with and post-processing
-        short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li.
-        These files are generated as output by short read aligners like BWA.
-      homepage: http://www.htslib.org/
-      documentation: http://www.htslib.org/doc/samtools.html
-      doi: 10.1093/bioinformatics/btp352
-      licence: ["MIT"]
-input:
-  - meta:
-      type: map
-      description: |
-        Groovy Map containing sample information
-        e.g. [ id:'test', single_end:false ]
-  - bam:
-      type: file
-      description: BAM/CRAM/SAM file
-      pattern: "*.{bam,cram,sam}"
-output:
-  - meta:
-      type: map
-      description: |
-        Groovy Map containing sample information
-        e.g. [ id:'test', single_end:false ]
-  - bai:
-      type: file
-      description: BAM/CRAM/SAM index file
-      pattern: "*.{bai,crai,sai}"
-  - crai:
-      type: file
-      description: BAM/CRAM/SAM index file
-      pattern: "*.{bai,crai,sai}"
-  - csi:
-      type: file
-      description: CSI index file
-      pattern: "*.{csi}"
-  - versions:
-      type: file
-      description: File containing software versions
-      pattern: "versions.yml"
-authors:
-  - "@drpatelh"
-  - "@ewels"
-  - "@maxulysse"
\ No newline at end of file
diff --git a/modules/nf-core/custom/samtools/sort/main.nf b/modules/nf-core/custom/samtools/sort/main.nf
index f569257..b2bbfe1 100644
--- a/modules/nf-core/custom/samtools/sort/main.nf
+++ b/modules/nf-core/custom/samtools/sort/main.nf
@@ -5,7 +5,7 @@ process SAMTOOLS_SORT {
     conda "bioconda::samtools=1.17"
     container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
         'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' :
-        'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }"
+        'biocontainers/samtools:1.17--h00cdaf9_0' }"
 
     input:
     tuple val(meta), path(bam)
diff --git a/modules/nf-core/custom/samtools_n/sort/main.nf b/modules/nf-core/custom/samtools_n/sort/main.nf
index 59a6e2a..740441e 100644
--- a/modules/nf-core/custom/samtools_n/sort/main.nf
+++ b/modules/nf-core/custom/samtools_n/sort/main.nf
@@ -5,7 +5,7 @@ process SAMTOOLS_SORT_N {
     conda "bioconda::samtools=1.17"
     container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
         'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' :
-        'quay.io/biocontainers/samtools:1.17--h00cdaf9_0' }"
+        'biocontainers/samtools:1.17--h00cdaf9_0' }"
 
     input:
     tuple val(meta), path(bam)
diff --git a/subworkflows/local/filter_pcr_dup.nf b/subworkflows/local/filter_pcr_dup.nf
index 7fb3fa5..3530d6f 100644
--- a/subworkflows/local/filter_pcr_dup.nf
+++ b/subworkflows/local/filter_pcr_dup.nf
@@ -6,7 +6,6 @@
 include { SAMTOOLS_SORT } from '../../modules/nf-core/custom/samtools/sort/main'
 include { SAMTOOLS_SORT_N } from '../../modules/nf-core/custom/samtools_n/sort/main'
 include { FILTER_PAIR } from '../../modules/local/filterbam/main'
-include { SAMTOOLS_INDEX } from '../../modules/nf-core/custom/samtools/index/main'
 include { PICARD_MARKDUPLICATES } from '../../modules/nf-core/custom/picard/markduplicates/main'
 
 workflow FILTER_PCR_DUP {
-- 
GitLab