From a12e03894ba0d4a09c177beda221582baaf64cb7 Mon Sep 17 00:00:00 2001 From: bioloni Date: Thu, 15 Feb 2024 17:28:02 +0000 Subject: [PATCH] Updated makegraph to makegraph2 --- CHANGELOG.md | 2 +- README.md | 1 + conf/modules/controlfreec.config | 2 +- modules.json | 6 -- .../makegraph/controlfreec-makegraph.diff | 23 ------- .../controlfreec/makegraph/environment.yml | 7 --- .../nf-core/controlfreec/makegraph/main.nf | 52 ---------------- .../nf-core/controlfreec/makegraph/meta.yml | 60 ------------------- .../main.nf | 6 +- tests/config/pytesttags.yml | 2 +- 10 files changed, 7 insertions(+), 154 deletions(-) delete mode 100644 modules/nf-core/controlfreec/makegraph/controlfreec-makegraph.diff delete mode 100644 modules/nf-core/controlfreec/makegraph/environment.yml delete mode 100644 modules/nf-core/controlfreec/makegraph/main.nf delete mode 100644 modules/nf-core/controlfreec/makegraph/meta.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b55a11fd0..afe7020a22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,7 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- [#1391](https://github.com/nf-core/sarek/pull/1391) - Fixed input channel for ASSESS_SIGNIFICANCE module, updated makegraph to makegraph2. +- [#1400](https://github.com/nf-core/sarek/pull/1400) - Fixed input channel for ASSESS_SIGNIFICANCE module, updated makegraph to makegraph2. - [#1334](https://github.com/nf-core/sarek/pull/1334) - Remove extra v, when reporting tower runs on slack - [#1335](https://github.com/nf-core/sarek/pull/1335) - Add docs and validation for bcftools annotation parameters - [#1345](https://github.com/nf-core/sarek/pull/1345) - Preserve STDERR for easier debugging diff --git a/README.md b/README.md index 770d390322..6df2cd5b09 100644 --- a/README.md +++ b/README.md @@ -151,6 +151,7 @@ We thank the following people for their extensive assistance in the development - [Malin Larsson](https://github.com/malinlarsson) - [Marcel Martin](https://github.com/marcelm) - [Nick Smith](https://github.com/nickhsmith) +- [Nicolas Schcolnicov](https://github.com/nschcolnicov) - [Nilesh Tawari](https://github.com/nilesh-tawari) - [Olga Botvinnik](https://github.com/olgabot) - [Oskar Wacker](https://github.com/WackerO) diff --git a/conf/modules/controlfreec.config b/conf/modules/controlfreec.config index 8ed3920c43..d177b1c459 100644 --- a/conf/modules/controlfreec.config +++ b/conf/modules/controlfreec.config @@ -50,7 +50,7 @@ process { ] } - withName: 'MAKEGRAPH' { + withName: 'MAKEGRAPH2' { ext.args = { "${params.cf_ploidy}" } publishDir = [ mode: params.publish_dir_mode, diff --git a/modules.json b/modules.json index 1bd8fb78d5..a8f8a7e436 100644 --- a/modules.json +++ b/modules.json @@ -107,12 +107,6 @@ "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", "installed_by": ["modules"] }, - "controlfreec/makegraph": { - "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", - "installed_by": ["modules"], - "patch": "modules/nf-core/controlfreec/makegraph/controlfreec-makegraph.diff" - }, "controlfreec/makegraph2": { "branch": "master", "git_sha": "a7bae48d8bccfae99e3b862fa07bbd50a8df6b82", diff --git a/modules/nf-core/controlfreec/makegraph/controlfreec-makegraph.diff b/modules/nf-core/controlfreec/makegraph/controlfreec-makegraph.diff deleted file mode 100644 index 13f4208a05..0000000000 --- a/modules/nf-core/controlfreec/makegraph/controlfreec-makegraph.diff +++ /dev/null @@ -1,23 +0,0 @@ -Changes in module 'nf-core/controlfreec/makegraph' ---- modules/nf-core/controlfreec/makegraph/main.nf -+++ modules/nf-core/controlfreec/makegraph/main.nf -@@ -8,7 +8,7 @@ - 'biocontainers/control-freec:11.6b--hdbdd923_0' }" - - input: -- tuple val(meta), path(ratio), path(baf), val(ploidy) -+ tuple val(meta), path(ratio), path(baf) - - output: - tuple val(meta), path("*_BAF.png") , emit: png_baf -@@ -25,7 +25,7 @@ - def prefix = task.ext.prefix ?: "${meta.id}" - def baf = baf ?: "" - """ -- cat \$(which makeGraph.R) | R --slave --args ${ploidy} ${args} ${ratio} ${baf} -+ cat \$(which makeGraph.R) | R --slave --args ${args} ${ratio} ${baf} - - mv *_BAF.txt.png ${prefix}_BAF.png - mv *_ratio.txt.log2.png ${prefix}_ratio.log2.png - -************************************************************ diff --git a/modules/nf-core/controlfreec/makegraph/environment.yml b/modules/nf-core/controlfreec/makegraph/environment.yml deleted file mode 100644 index 897eadf3bd..0000000000 --- a/modules/nf-core/controlfreec/makegraph/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: controlfreec_makegraph -channels: - - conda-forge - - bioconda - - defaults -dependencies: - - bioconda::control-freec=11.6b diff --git a/modules/nf-core/controlfreec/makegraph/main.nf b/modules/nf-core/controlfreec/makegraph/main.nf deleted file mode 100644 index 8d489f71f7..0000000000 --- a/modules/nf-core/controlfreec/makegraph/main.nf +++ /dev/null @@ -1,52 +0,0 @@ -process CONTROLFREEC_MAKEGRAPH { - tag "$meta.id" - label 'process_low' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/control-freec:11.6b--hdbdd923_0' : - 'biocontainers/control-freec:11.6b--hdbdd923_0' }" - - input: - tuple val(meta), path(ratio), path(baf) - - output: - tuple val(meta), path("*_BAF.png") , emit: png_baf - tuple val(meta), path("*_ratio.log2.png"), emit: png_ratio_log2 - tuple val(meta), path("*_ratio.png") , emit: png_ratio - - 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 baf = baf ?: "" - """ - cat \$(which makeGraph.R) | R --slave --args ${args} ${ratio} ${baf} - - mv *_BAF.txt.png ${prefix}_BAF.png - mv *_ratio.txt.log2.png ${prefix}_ratio.log2.png - mv *_ratio.txt.png ${prefix}_ratio.png - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - controlfreec: \$(echo \$(freec -version 2>&1) | sed 's/^.*Control-FREEC //; s/:.*\$//' | sed -e "s/Control-FREEC v//g" ) - END_VERSIONS - """ - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - """ - touch ${prefix}_BAF.png - touch ${prefix}_ratio.log2.png - touch ${prefix}_ratio.png - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - controlfreec: \$(echo \$(freec -version 2>&1) | sed 's/^.*Control-FREEC //; s/:.*\$//' | sed -e "s/Control-FREEC v//g" ) - END_VERSIONS - """ -} diff --git a/modules/nf-core/controlfreec/makegraph/meta.yml b/modules/nf-core/controlfreec/makegraph/meta.yml deleted file mode 100644 index 6f91db38aa..0000000000 --- a/modules/nf-core/controlfreec/makegraph/meta.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: controlfreec_makegraph -description: Plot Freec output -keywords: - - cna - - cnv - - somatic - - single - - tumor-only -tools: - - controlfreec: - description: Copy number and genotype annotation from whole genome and whole exome sequencing data. - homepage: http://boevalab.inf.ethz.ch/FREEC - documentation: http://boevalab.inf.ethz.ch/FREEC/tutorial.html - tool_dev_url: https://github.com/BoevaLab/FREEC/ - doi: "10.1093/bioinformatics/btq635" - licence: ["GPL >=2"] -input: - # Only when we have meta - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - ratio: - type: file - description: ratio file generated by FREEC - pattern: "*.ratio.txt" - - baf: - type: file - description: .BAF file generated by FREEC - pattern: "*.BAF" - - ploidy: - type: integer - description: Ploidy value for which graph should be created -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" - - png_baf: - type: file - description: Image of BAF plot - pattern: "*_BAF.png" - - png_ratio_log2: - type: file - description: Image of ratio log2 plot - pattern: "*_ratio.log2.png" - - png_ratio: - type: file - description: Image of ratio plot - pattern: "*_ratio.png" -authors: - - "@FriederikeHanssen" -maintainers: - - "@FriederikeHanssen" diff --git a/subworkflows/local/bam_variant_calling_tumor_only_controlfreec/main.nf b/subworkflows/local/bam_variant_calling_tumor_only_controlfreec/main.nf index 993faf127c..e7178cbaa4 100644 --- a/subworkflows/local/bam_variant_calling_tumor_only_controlfreec/main.nf +++ b/subworkflows/local/bam_variant_calling_tumor_only_controlfreec/main.nf @@ -8,7 +8,7 @@ include { CONTROLFREEC_FREEC as FREEC_TUMORONLY } from '../../. include { CONTROLFREEC_ASSESSSIGNIFICANCE as ASSESS_SIGNIFICANCE } from '../../../modules/nf-core/controlfreec/assesssignificance/main' include { CONTROLFREEC_FREEC2BED as FREEC2BED } from '../../../modules/nf-core/controlfreec/freec2bed/main' include { CONTROLFREEC_FREEC2CIRCOS as FREEC2CIRCOS } from '../../../modules/nf-core/controlfreec/freec2circos/main' -include { CONTROLFREEC_MAKEGRAPH as MAKEGRAPH } from '../../../modules/nf-core/controlfreec/makegraph/main' +include { CONTROLFREEC_MAKEGRAPH2 as MAKEGRAPH2 } from '../../../modules/nf-core/controlfreec/makegraph2/main' workflow BAM_VARIANT_CALLING_TUMOR_ONLY_CONTROLFREEC { take: @@ -30,13 +30,13 @@ workflow BAM_VARIANT_CALLING_TUMOR_ONLY_CONTROLFREEC { ASSESS_SIGNIFICANCE(FREEC_TUMORONLY.out.CNV.join(FREEC_TUMORONLY.out.ratio, failOnDuplicate: true, failOnMismatch: true)) FREEC2BED(FREEC_TUMORONLY.out.ratio) FREEC2CIRCOS(FREEC_TUMORONLY.out.ratio) - MAKEGRAPH(FREEC_TUMORONLY.out.ratio.join(FREEC_TUMORONLY.out.BAF, failOnDuplicate: true, failOnMismatch: true)) + MAKEGRAPH2(FREEC_TUMORONLY.out.ratio.join(FREEC_TUMORONLY.out.BAF, failOnDuplicate: true, failOnMismatch: true)) ch_versions = ch_versions.mix(FREEC_TUMORONLY.out.versions) ch_versions = ch_versions.mix(ASSESS_SIGNIFICANCE.out.versions) ch_versions = ch_versions.mix(FREEC2BED.out.versions) ch_versions = ch_versions.mix(FREEC2CIRCOS.out.versions) - ch_versions = ch_versions.mix(MAKEGRAPH.out.versions) + ch_versions = ch_versions.mix(MAKEGRAPH2.out.versions) emit: versions = ch_versions diff --git a/tests/config/pytesttags.yml b/tests/config/pytesttags.yml index f33e55023c..1612a9bb17 100644 --- a/tests/config/pytesttags.yml +++ b/tests/config/pytesttags.yml @@ -248,7 +248,7 @@ controlfreec: - modules/nf-core/controlfreec/freec/** - modules/nf-core/controlfreec/freec2bed/** - modules/nf-core/controlfreec/freec2circos/** - - modules/nf-core/controlfreec/makegraph/** + - modules/nf-core/controlfreec/makegraph2/** - modules/nf-core/samtools/mpileup/** - subworkflows/local/bam_variant_calling_mpileup/** - subworkflows/local/bam_variant_calling_somatic_all/**