From 6347311a294eb44a1cecbda15cba8bcfd48d6ac7 Mon Sep 17 00:00:00 2001 From: nservant <nicolas.servant@curie.fr> Date: Thu, 5 May 2022 15:43:24 +0200 Subject: [PATCH] [MODIF] update --- .nf-core.yml | 3 ++ modules.json | 6 --- .../cload/main.nf => local/cooler/cload.nf} | 0 .../dump/main.nf => local/cooler/dump.nf} | 0 modules/local/hicpro/bowtie2_merge.nf | 7 ++- modules/local/hicpro/combine_mates.nf | 2 + .../local/hicpro/get_restriction_fragments.nf | 4 +- modules/local/hicpro/get_valid_interaction.nf | 4 +- .../hicpro/get_valid_interaction_dnase.nf | 4 +- modules/local/hicpro/hicpro2pairs.nf | 5 ++ modules/local/hicpro/merge_stats.nf | 2 + modules/local/hicpro/run_ice.nf | 2 + modules/nf-core/modules/cooler/cload/meta.yml | 52 ------------------- modules/nf-core/modules/cooler/dump/main.nf~ | 35 ------------- modules/nf-core/modules/cooler/dump/meta.yml | 44 ---------------- subworkflows/local/cooler.nf | 7 +-- 16 files changed, 33 insertions(+), 144 deletions(-) create mode 100644 .nf-core.yml rename modules/{nf-core/modules/cooler/cload/main.nf => local/cooler/cload.nf} (100%) rename modules/{nf-core/modules/cooler/dump/main.nf => local/cooler/dump.nf} (100%) delete mode 100644 modules/nf-core/modules/cooler/cload/meta.yml delete mode 100644 modules/nf-core/modules/cooler/dump/main.nf~ delete mode 100644 modules/nf-core/modules/cooler/dump/meta.yml diff --git a/.nf-core.yml b/.nf-core.yml new file mode 100644 index 0000000..a497878 --- /dev/null +++ b/.nf-core.yml @@ -0,0 +1,3 @@ +repository_type: pipeline +repository_type: pipeline +repository_type: pipeline diff --git a/modules.json b/modules.json index 58d8105..ef01adb 100644 --- a/modules.json +++ b/modules.json @@ -9,12 +9,6 @@ "bowtie2/build": { "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" }, - "cooler/cload": { - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, - "cooler/dump": { - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, "cooler/zoomify": { "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" }, diff --git a/modules/nf-core/modules/cooler/cload/main.nf b/modules/local/cooler/cload.nf similarity index 100% rename from modules/nf-core/modules/cooler/cload/main.nf rename to modules/local/cooler/cload.nf diff --git a/modules/nf-core/modules/cooler/dump/main.nf b/modules/local/cooler/dump.nf similarity index 100% rename from modules/nf-core/modules/cooler/dump/main.nf rename to modules/local/cooler/dump.nf diff --git a/modules/local/hicpro/bowtie2_merge.nf b/modules/local/hicpro/bowtie2_merge.nf index b020b70..f0a35fe 100644 --- a/modules/local/hicpro/bowtie2_merge.nf +++ b/modules/local/hicpro/bowtie2_merge.nf @@ -1,7 +1,12 @@ process MERGE_BOWTIE2{ tag "$prefix" label 'process_medium' - + + conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" + input: tuple val(meta), path(bam1), path(bam2) diff --git a/modules/local/hicpro/combine_mates.nf b/modules/local/hicpro/combine_mates.nf index a137b78..00a88c8 100644 --- a/modules/local/hicpro/combine_mates.nf +++ b/modules/local/hicpro/combine_mates.nf @@ -2,6 +2,8 @@ process COMBINE_MATES { tag "$prefix" label 'process_low' + conda (params.enable_conda ? "conda-forge::python=3.7.6 bioconda::pysam=0.15.4" : null) + input: tuple val(meta), path(bam) diff --git a/modules/local/hicpro/get_restriction_fragments.nf b/modules/local/hicpro/get_restriction_fragments.nf index 7b304e4..63b08f2 100644 --- a/modules/local/hicpro/get_restriction_fragments.nf +++ b/modules/local/hicpro/get_restriction_fragments.nf @@ -1,7 +1,9 @@ process GET_RESTRICTION_FRAGMENTS { tag "$res_site" label 'process_low' - + + conda (params.enable_conda ? "conda-forge::python=3.7.6 conda-forge::numpy=1.18.1" : null) + input: path fasta val(res_site) diff --git a/modules/local/hicpro/get_valid_interaction.nf b/modules/local/hicpro/get_valid_interaction.nf index d8ea17f..1d271a4 100644 --- a/modules/local/hicpro/get_valid_interaction.nf +++ b/modules/local/hicpro/get_valid_interaction.nf @@ -1,7 +1,9 @@ process GET_VALID_INTERACTION { tag "$meta.id" label 'process_low' - + + conda (params.enable_conda ? "conda-forge::python=3.7.6 bioconda::pysam=0.15.4" : null) + input: tuple val(meta), path(bam) path(resfrag) diff --git a/modules/local/hicpro/get_valid_interaction_dnase.nf b/modules/local/hicpro/get_valid_interaction_dnase.nf index 4bb40b8..c43bf3f 100644 --- a/modules/local/hicpro/get_valid_interaction_dnase.nf +++ b/modules/local/hicpro/get_valid_interaction_dnase.nf @@ -1,7 +1,9 @@ process GET_VALID_INTERACTION_DNASE { tag "$meta.id" label 'process_low' - + + conda (params.enable_conda ? "conda-forge::python=3.7.6 bioconda::pysam=0.15.4" : null) + input: tuple val(meta), path(bam) diff --git a/modules/local/hicpro/hicpro2pairs.nf b/modules/local/hicpro/hicpro2pairs.nf index 99e4a6b..305bc87 100644 --- a/modules/local/hicpro/hicpro2pairs.nf +++ b/modules/local/hicpro/hicpro2pairs.nf @@ -2,6 +2,11 @@ process HICPRO2PAIRS { tag "$meta.id" label 'process_medium' + conda (params.enable_conda ? "bioconda::pairix=0.3.7" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/pairix:0.3.7--py36h30a8e3e_3' : + 'quay.io/biocontainers/pairix:0.3.7--py36h30a8e3e_3' }" + input: tuple val(meta), path(vpairs) path chrsize diff --git a/modules/local/hicpro/merge_stats.nf b/modules/local/hicpro/merge_stats.nf index 8fb0eee..c79afbc 100644 --- a/modules/local/hicpro/merge_stats.nf +++ b/modules/local/hicpro/merge_stats.nf @@ -1,6 +1,8 @@ process MERGE_STATS { label 'process_low' + conda (params.enable_conda ? "conda-forge::python=3.7.6" : null) + input: tuple val(meta), path(fstat) diff --git a/modules/local/hicpro/run_ice.nf b/modules/local/hicpro/run_ice.nf index 7b4ee63..ef7da65 100644 --- a/modules/local/hicpro/run_ice.nf +++ b/modules/local/hicpro/run_ice.nf @@ -2,6 +2,8 @@ process ICE_NORMALIZATION{ tag "$rmaps" label 'process_highmem' + conda (params.enable_conda ? "conda-forge::python=3.7.6 bioconda::iced=0.5.6" : null) + input: tuple val(meta), val(res), path(rmaps), path(bed) diff --git a/modules/nf-core/modules/cooler/cload/meta.yml b/modules/nf-core/modules/cooler/cload/meta.yml deleted file mode 100644 index ddb0443..0000000 --- a/modules/nf-core/modules/cooler/cload/meta.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: cooler_cload -description: Create a cooler from genomic pairs and bins -keywords: - - cool -tools: - - cooler: - description: Sparse binary format for genomic interaction matrices - homepage: https://cooler.readthedocs.io/en/latest/index.html - documentation: https://cooler.readthedocs.io/en/latest/index.html - tool_dev_url: https://github.com/open2c/cooler - doi: "10.1093/bioinformatics/btz540" - licence: ["BSD-3-clause"] - -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - pairs: - type: file - description: Path to contacts (i.e. read pairs) file. - - index: - type: file - description: Path to index file of the contacts. - - cool_bin: - type: value - description: Bins size in bp - - chromsizes: - type: file - description: Path to a chromsizes file. - -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - version: - type: file - description: File containing software version - pattern: "versions.yml" - - cool: - type: file - description: Output COOL file path - pattern: "*.cool" - - cool_bin: - type: value - description: Bins size in bp - -authors: - - "@jianhong" diff --git a/modules/nf-core/modules/cooler/dump/main.nf~ b/modules/nf-core/modules/cooler/dump/main.nf~ deleted file mode 100644 index ffa36a1..0000000 --- a/modules/nf-core/modules/cooler/dump/main.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), val(resolution), path(cool) - - 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 ?: "${cool.baseName}" - 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/nf-core/modules/cooler/dump/meta.yml b/modules/nf-core/modules/cooler/dump/meta.yml deleted file mode 100644 index fc12cdf..0000000 --- a/modules/nf-core/modules/cooler/dump/meta.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: cooler_dump -description: Dump a cooler’s data to a text stream. -keywords: - - dump -tools: - - cooler: - description: Sparse binary format for genomic interaction matrices - homepage: https://cooler.readthedocs.io/en/latest/index.html - documentation: https://cooler.readthedocs.io/en/latest/index.html - tool_dev_url: https://github.com/open2c/cooler - doi: "10.1093/bioinformatics/btz540" - licence: ["BSD-3-Clause"] - -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - cool: - type: file - description: Path to COOL file - pattern: "*.{cool,mcool}" - - resolution: - type: value - description: Resolution - -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - bedpe: - type: file - description: Output text file - pattern: "*.bedpe" - -authors: - - "@jianhong" diff --git a/subworkflows/local/cooler.nf b/subworkflows/local/cooler.nf index 7e49aa4..8780b82 100644 --- a/subworkflows/local/cooler.nf +++ b/subworkflows/local/cooler.nf @@ -4,14 +4,15 @@ * OUTPUT : cooler files */ -include { COOLER_CLOAD } from '../../modules/nf-core/modules/cooler/cload/main' -include { COOLER_DUMP } from '../../modules/nf-core/modules/cooler/dump/main' include { COOLER_ZOOMIFY } from '../../modules/nf-core/modules/cooler/zoomify/main' +include { COOLER_DUMP } from '../../modules/local/cooler/dump' +include { COOLER_CLOAD } from '../../modules/local/cooler/cload' include { COOLER_BALANCE } from '../../modules/local/cooler/balance' -include { SPLIT_COOLER_DUMP } from '../../modules/local/split_cooler_dump' include { COOLER_MAKEBINS } from '../../modules/local/cooler/makebins' +include { SPLIT_COOLER_DUMP } from '../../modules/local/split_cooler_dump' + // add resolution in meta def addResolution(row) { def meta = [:] -- GitLab