From 563a8ed08028a07dbcb77a8ff3e37da179d57845 Mon Sep 17 00:00:00 2001 From: aldosr Date: Wed, 1 Mar 2023 14:59:35 +0100 Subject: [PATCH 01/22] Set up nf-core template for purecn/run module --- modules/nf-core/purecn/run/main.nf | 75 +++++++++++++++++++ modules/nf-core/purecn/run/meta.yml | 51 +++++++++++++ tests/config/pytest_modules.yml | 21 +++--- tests/modules/nf-core/purecn/run/main.nf | 15 ++++ .../nf-core/purecn/run/nextflow.config | 5 ++ tests/modules/nf-core/purecn/run/test.yml | 12 +++ 6 files changed, 170 insertions(+), 9 deletions(-) create mode 100644 modules/nf-core/purecn/run/main.nf create mode 100644 modules/nf-core/purecn/run/meta.yml create mode 100644 tests/modules/nf-core/purecn/run/main.nf create mode 100644 tests/modules/nf-core/purecn/run/nextflow.config create mode 100644 tests/modules/nf-core/purecn/run/test.yml diff --git a/modules/nf-core/purecn/run/main.nf b/modules/nf-core/purecn/run/main.nf new file mode 100644 index 00000000000..7e5471d1f5b --- /dev/null +++ b/modules/nf-core/purecn/run/main.nf @@ -0,0 +1,75 @@ +// TODO nf-core: If in doubt look at other nf-core/modules to see how we are doing things! :) +// https://github.com/nf-core/modules/tree/master/modules/nf-core/ +// You can also ask for help via your pull request or on the #modules channel on the nf-core Slack workspace: +// https://nf-co.re/join +// TODO nf-core: A module file SHOULD only define input and output files as command-line parameters. +// All other parameters MUST be provided using the "task.ext" directive, see here: +// https://www.nextflow.io/docs/latest/process.html#ext +// where "task.ext" is a string. +// Any parameters that need to be evaluated in the context of a particular sample +// e.g. single-end/paired-end data MUST also be defined and evaluated appropriately. +// TODO nf-core: Software that can be piped together SHOULD be added to separate module files +// unless there is a run-time, storage advantage in implementing in this way +// e.g. it's ok to have a single module for bwa to output BAM instead of SAM: +// bwa mem | samtools view -B -T ref.fasta +// TODO nf-core: Optional inputs are not currently supported by Nextflow. However, using an empty +// list (`[]`) instead of a file can be used to work around this issue. + +process PURECN_RUN { + tag "$meta.id" + label 'process_low' + + // TODO nf-core: List required Conda package(s). + // Software MUST be pinned to channel (i.e. "bioconda"), version (i.e. "1.10"). + // For Conda, the build (i.e. "h9402c20_2") must be EXCLUDED to support installation on different operating systems. + // TODO nf-core: See section in main README for further information regarding finding and adding container addresses to the section below. + conda "bioconda::bioconductor-purecn=2.4.0" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE': + 'quay.io/biocontainers/YOUR-TOOL-HERE' }" + + input: + // TODO nf-core: Where applicable all sample-specific information e.g. "id", "single_end", "read_group" + // MUST be provided as an input via a Groovy Map called "meta". + // This information may not be required in some instances e.g. indexing reference genome files: + // https://github.com/nf-core/modules/blob/master/modules/nf-core/bwa/index/main.nf + // TODO nf-core: Where applicable please provide/convert compressed files as input/output + // e.g. "*.fastq.gz" and NOT "*.fastq", "*.bam" and NOT "*.sam" etc. + tuple val(meta), path(bam) + + output: + // TODO nf-core: Named file extensions MUST be emitted for ALL output channels + tuple val(meta), path("*.bam"), emit: bam + // TODO nf-core: List additional required output channels/values here + 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}" + // TODO nf-core: Where possible, a command MUST be provided to obtain the version number of the software e.g. 1.10 + // If the software is unable to output a version number on the command-line then it can be manually specified + // e.g. https://github.com/nf-core/modules/blob/master/modules/nf-core/homer/annotatepeaks/main.nf + // Each software used MUST provide the software name and version number in the YAML version file (versions.yml) + // TODO nf-core: It MUST be possible to pass additional parameters to the tool as a command-line string via the "task.ext.args" directive + // TODO nf-core: If the tool supports multi-threading then you MUST provide the appropriate parameter + // using the Nextflow "task" variable e.g. "--threads $task.cpus" + // TODO nf-core: Please replace the example samtools command below with your module's command + // TODO nf-core: Please indent the command appropriately (4 spaces!!) to help with readability ;) + """ + samtools \\ + sort \\ + $args \\ + -@ $task.cpus \\ + -o ${prefix}.bam \\ + -T $prefix \\ + $bam + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + purecn: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//' )) + END_VERSIONS + """ +} diff --git a/modules/nf-core/purecn/run/meta.yml b/modules/nf-core/purecn/run/meta.yml new file mode 100644 index 00000000000..8bab0ebd1fe --- /dev/null +++ b/modules/nf-core/purecn/run/meta.yml @@ -0,0 +1,51 @@ +name: "purecn_run" +## TODO nf-core: Add a description of the module and list keywords +description: write your description here +keywords: + - sort +tools: + - "purecn": + ## TODO nf-core: Add a description and other details for the software below + description: "Copy number calling and SNV classification using targeted short read sequencing" + homepage: "None" + documentation: "None" + tool_dev_url: "None" + doi: "" + licence: "['Artistic-2.0']" + +## TODO nf-core: Add a description of all of the variables used as input +input: + # Only when we have meta + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + # + ## TODO nf-core: Delete / customise this example input + - bam: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + +## TODO nf-core: Add a description of all of the variables used as output +output: + #Only when we have meta + - 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" + ## TODO nf-core: Delete / customise this example output + - bam: + type: file + description: Sorted BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + +authors: + - "@aldosr" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 05ef422c91d..8ae4d48684d 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -2246,7 +2246,6 @@ pangolin: - modules/nf-core/pangolin/** - tests/modules/nf-core/pangolin/** -# GitHub Actions doesn't support GPUs, so stub parabricks/fq2bam: - modules/nf-core/parabricks/fq2bam/** - tests/modules/nf-core/parabricks/fq2bam/** @@ -2255,14 +2254,14 @@ paraclu: - modules/nf-core/paraclu/** - tests/modules/nf-core/paraclu/** -paragraph/multigrmpy: - - modules/nf-core/paragraph/multigrmpy/** - - tests/modules/nf-core/paragraph/multigrmpy/** - paragraph/idxdepth: - modules/nf-core/paragraph/idxdepth/** - tests/modules/nf-core/paragraph/idxdepth/** +paragraph/multigrmpy: + - modules/nf-core/paragraph/multigrmpy/** + - tests/modules/nf-core/paragraph/multigrmpy/** + pasty: - modules/nf-core/pasty/** - tests/modules/nf-core/pasty/** @@ -2455,6 +2454,10 @@ prokka: - modules/nf-core/prokka/** - tests/modules/nf-core/prokka/** +purecn/run: + - modules/nf-core/purecn/run/** + - tests/modules/nf-core/purecn/run/** + purgedups/calcuts: - modules/nf-core/purgedups/calcuts/** - tests/modules/nf-core/purgedups/calcuts/** @@ -3140,14 +3143,14 @@ subworkflows/vcf_gather_bcftools: - subworkflows/nf-core/vcf_gather_bcftools/** - tests/subworkflows/nf-core/vcf_gather_bcftools/** -survivor/merge: - - modules/nf-core/survivor/merge/** - - tests/modules/nf-core/survivor/merge/** - subworkflows/vcf_impute_glimpse: - subworkflows/nf-core/vcf_impute_glimpse/** - tests/subworkflows/nf-core/vcf_impute_glimpse/** +survivor/merge: + - modules/nf-core/survivor/merge/** + - tests/modules/nf-core/survivor/merge/** + svdb/merge: - modules/nf-core/svdb/merge/** - tests/modules/nf-core/svdb/merge/** diff --git a/tests/modules/nf-core/purecn/run/main.nf b/tests/modules/nf-core/purecn/run/main.nf new file mode 100644 index 00000000000..f8e37f585c4 --- /dev/null +++ b/tests/modules/nf-core/purecn/run/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { PURECN_RUN } from '../../../../../modules/nf-core/purecn/run/main.nf' + +workflow test_purecn_run { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + PURECN_RUN ( input ) +} diff --git a/tests/modules/nf-core/purecn/run/nextflow.config b/tests/modules/nf-core/purecn/run/nextflow.config new file mode 100644 index 00000000000..50f50a7a357 --- /dev/null +++ b/tests/modules/nf-core/purecn/run/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/nf-core/purecn/run/test.yml b/tests/modules/nf-core/purecn/run/test.yml new file mode 100644 index 00000000000..c0723b79316 --- /dev/null +++ b/tests/modules/nf-core/purecn/run/test.yml @@ -0,0 +1,12 @@ +## TODO nf-core: Please run the following command to build this file: +# nf-core modules create-test-yml purecn/run +- name: "purecn run" + command: nextflow run ./tests/modules/nf-core/purecn/run -entry test_purecn_run -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/purecn/run/nextflow.config + tags: + - "purecn" + - "purecn/run" + files: + - path: "output/purecn/test.bam" + md5sum: e667c7caad0bc4b7ac383fd023c654fc + - path: "output/purecn/versions.yml" + md5sum: a01fe51bc4c6a3a6226fbf77b2c7cf3b From 1cbba6c4bfc30dbc351e38c15c314b033af3c6c5 Mon Sep 17 00:00:00 2001 From: aldosr Date: Wed, 1 Mar 2023 15:00:47 +0100 Subject: [PATCH 02/22] Add run script and I/O --- modules/nf-core/purecn/run/main.nf | 34 ++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/modules/nf-core/purecn/run/main.nf b/modules/nf-core/purecn/run/main.nf index 7e5471d1f5b..548b9db6feb 100644 --- a/modules/nf-core/purecn/run/main.nf +++ b/modules/nf-core/purecn/run/main.nf @@ -35,11 +35,19 @@ process PURECN_RUN { // https://github.com/nf-core/modules/blob/master/modules/nf-core/bwa/index/main.nf // TODO nf-core: Where applicable please provide/convert compressed files as input/output // e.g. "*.fastq.gz" and NOT "*.fastq", "*.bam" and NOT "*.sam" etc. - tuple val(meta), path(bam) + tuple val(meta), path(vcf) + + path coverage + path normal_db + path mapping_bias + path intervals + path blacklist + + val genome output: // TODO nf-core: Named file extensions MUST be emitted for ALL output channels - tuple val(meta), path("*.bam"), emit: bam + tuple val(meta), path("*.txt"), emit: output_purecn // TODO nf-core: List additional required output channels/values here path "versions.yml" , emit: versions @@ -59,13 +67,21 @@ process PURECN_RUN { // TODO nf-core: Please replace the example samtools command below with your module's command // TODO nf-core: Please indent the command appropriately (4 spaces!!) to help with readability ;) """ - samtools \\ - sort \\ - $args \\ - -@ $task.cpus \\ - -o ${prefix}.bam \\ - -T $prefix \\ - $bam + Rscript PureCN.R \ + --out purecn/output/${meta.id}/ \ + --tumor ${coverage} \ + --sampleid ${meta.id} \ + --vcf ${vcf} \ + --normaldb ${normal_db} \ + --mapping-bias-file ${mapping_bias} \ + --intervals ${intervals} \ + --snp-blacklist ${blacklist} \ + --genome ${genome} \ + --force \ + --post-optimize \ + --seed 123 \ + --bootstrapn 500 \ + --cores ${tasks.cpus} cat <<-END_VERSIONS > versions.yml "${task.process}": From 24dfc84153dd4dc38ba0647a42d444fe7f0c7f7b Mon Sep 17 00:00:00 2001 From: aldosr Date: Mon, 27 Mar 2023 15:07:16 +0200 Subject: [PATCH 03/22] Clean TODOs and set main script --- modules/nf-core/purecn/run/main.nf | 80 +++++++++-------------------- modules/nf-core/purecn/run/meta.yml | 17 +++--- 2 files changed, 31 insertions(+), 66 deletions(-) diff --git a/modules/nf-core/purecn/run/main.nf b/modules/nf-core/purecn/run/main.nf index 548b9db6feb..093a74b5461 100644 --- a/modules/nf-core/purecn/run/main.nf +++ b/modules/nf-core/purecn/run/main.nf @@ -1,54 +1,31 @@ -// TODO nf-core: If in doubt look at other nf-core/modules to see how we are doing things! :) -// https://github.com/nf-core/modules/tree/master/modules/nf-core/ -// You can also ask for help via your pull request or on the #modules channel on the nf-core Slack workspace: -// https://nf-co.re/join -// TODO nf-core: A module file SHOULD only define input and output files as command-line parameters. -// All other parameters MUST be provided using the "task.ext" directive, see here: -// https://www.nextflow.io/docs/latest/process.html#ext -// where "task.ext" is a string. -// Any parameters that need to be evaluated in the context of a particular sample -// e.g. single-end/paired-end data MUST also be defined and evaluated appropriately. -// TODO nf-core: Software that can be piped together SHOULD be added to separate module files -// unless there is a run-time, storage advantage in implementing in this way -// e.g. it's ok to have a single module for bwa to output BAM instead of SAM: -// bwa mem | samtools view -B -T ref.fasta -// TODO nf-core: Optional inputs are not currently supported by Nextflow. However, using an empty -// list (`[]`) instead of a file can be used to work around this issue. - process PURECN_RUN { tag "$meta.id" - label 'process_low' + label 'process_medium' - // TODO nf-core: List required Conda package(s). - // Software MUST be pinned to channel (i.e. "bioconda"), version (i.e. "1.10"). - // For Conda, the build (i.e. "h9402c20_2") must be EXCLUDED to support installation on different operating systems. - // TODO nf-core: See section in main README for further information regarding finding and adding container addresses to the section below. + // TODO: This needs a proper container + // cf: https://github.com/bioconda/bioconda-recipes/pull/40076 + // cf: https://github.com/BioContainers/multi-package-containers/pull/2554 conda "bioconda::bioconductor-purecn=2.4.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE': 'quay.io/biocontainers/YOUR-TOOL-HERE' }" input: - // TODO nf-core: Where applicable all sample-specific information e.g. "id", "single_end", "read_group" - // MUST be provided as an input via a Groovy Map called "meta". - // This information may not be required in some instances e.g. indexing reference genome files: - // https://github.com/nf-core/modules/blob/master/modules/nf-core/bwa/index/main.nf - // TODO nf-core: Where applicable please provide/convert compressed files as input/output - // e.g. "*.fastq.gz" and NOT "*.fastq", "*.bam" and NOT "*.sam" etc. tuple val(meta), path(vcf) path coverage path normal_db - path mapping_bias path intervals - path blacklist + + //TODO: optional inputs + //path blacklist + //path mapping_bias val genome output: - // TODO nf-core: Named file extensions MUST be emitted for ALL output channels - tuple val(meta), path("*.txt"), emit: output_purecn - // TODO nf-core: List additional required output channels/values here + //TODO: proper output need to be set up + //tuple val(meta), path("*.txt"), emit: output_purecn path "versions.yml" , emit: versions when: @@ -57,35 +34,24 @@ process PURECN_RUN { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - // TODO nf-core: Where possible, a command MUST be provided to obtain the version number of the software e.g. 1.10 - // If the software is unable to output a version number on the command-line then it can be manually specified - // e.g. https://github.com/nf-core/modules/blob/master/modules/nf-core/homer/annotatepeaks/main.nf - // Each software used MUST provide the software name and version number in the YAML version file (versions.yml) - // TODO nf-core: It MUST be possible to pass additional parameters to the tool as a command-line string via the "task.ext.args" directive - // TODO nf-core: If the tool supports multi-threading then you MUST provide the appropriate parameter - // using the Nextflow "task" variable e.g. "--threads $task.cpus" - // TODO nf-core: Please replace the example samtools command below with your module's command - // TODO nf-core: Please indent the command appropriately (4 spaces!!) to help with readability ;) + + //TODO: The following script is a minimal test run, for a production pipeline consider to add the followings: + // --stats-file ${SAMPLEID}_mutect_stats.txt --mapping-bias-file ${mapping_bias} --snp-blacklist ${blacklist} + // --force --post-optimize --seed 123 --bootstrapn 500 --normal ${normal_coverage} --fun-segmentation PSCBS + // --cores ${tasks.cpus} """ Rscript PureCN.R \ - --out purecn/output/${meta.id}/ \ - --tumor ${coverage} \ - --sampleid ${meta.id} \ - --vcf ${vcf} \ - --normaldb ${normal_db} \ - --mapping-bias-file ${mapping_bias} \ - --intervals ${intervals} \ - --snp-blacklist ${blacklist} \ - --genome ${genome} \ - --force \ - --post-optimize \ - --seed 123 \ - --bootstrapn 500 \ - --cores ${tasks.cpus} + --out purecn/output/${meta.id}/ \\ + --tumor ${coverage} \\ + --sampleid ${meta.id} \\ + --vcf ${vcf} \\ + --normaldb ${normal_db} \\ + --intervals ${intervals} \\ + --genome ${genome} cat <<-END_VERSIONS > versions.yml "${task.process}": - purecn: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//' )) + purecn: \$(Rscript /usr/local/lib/R/library/PureCN/extdata/PureCN.R --version) END_VERSIONS """ } diff --git a/modules/nf-core/purecn/run/meta.yml b/modules/nf-core/purecn/run/meta.yml index 8bab0ebd1fe..aba277a4d18 100644 --- a/modules/nf-core/purecn/run/meta.yml +++ b/modules/nf-core/purecn/run/meta.yml @@ -1,17 +1,15 @@ name: "purecn_run" -## TODO nf-core: Add a description of the module and list keywords -description: write your description here +description: run PureCN to normalize, segment and determine purity and ploidy keywords: - - sort + - copy number alteration calling tools: - "purecn": - ## TODO nf-core: Add a description and other details for the software below description: "Copy number calling and SNV classification using targeted short read sequencing" - homepage: "None" - documentation: "None" - tool_dev_url: "None" - doi: "" - licence: "['Artistic-2.0']" + homepage: "https://bioconductor.org/packages/release/bioc/html/PureCN.html" + documentation: "https://bioconductor.org/packages/release/bioc/html/PureCN.html" + tool_dev_url: "https://github.com/lima1/PureCN" + doi: "10.1186/s13029-016-0060-z" + licence: "Artistic-2.0" ## TODO nf-core: Add a description of all of the variables used as input input: @@ -49,3 +47,4 @@ output: authors: - "@aldosr" + - "@lbeltrame" From fe68198706432e123364a2e4404c7ea62a260456 Mon Sep 17 00:00:00 2001 From: aldosr Date: Mon, 27 Mar 2023 17:12:46 +0200 Subject: [PATCH 04/22] Fix duplicate entry --- tests/config/pytest_modules.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 4c696b4f7c5..02ef77ecb79 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -2363,11 +2363,6 @@ paragraph/vcf2paragraph: - modules/nf-core/paragraph/vcf2paragraph/** - tests/modules/nf-core/paragraph/vcf2paragraph/** - -paragraph/multigrmpy: - - modules/nf-core/paragraph/multigrmpy/** - - tests/modules/nf-core/paragraph/multigrmpy/** - pasty: - modules/nf-core/pasty/** - tests/modules/nf-core/pasty/** From 7efedb630ae58c275c57757c50d86c67abd8823a Mon Sep 17 00:00:00 2001 From: aldosr Date: Tue, 30 May 2023 16:28:45 +0200 Subject: [PATCH 05/22] Set up main script --- modules/nf-core/purecn/run/main.nf | 95 ++++++++++++++++++++++-------- 1 file changed, 69 insertions(+), 26 deletions(-) diff --git a/modules/nf-core/purecn/run/main.nf b/modules/nf-core/purecn/run/main.nf index 093a74b5461..c408464ba40 100644 --- a/modules/nf-core/purecn/run/main.nf +++ b/modules/nf-core/purecn/run/main.nf @@ -2,31 +2,53 @@ process PURECN_RUN { tag "$meta.id" label 'process_medium' - // TODO: This needs a proper container - // cf: https://github.com/bioconda/bioconda-recipes/pull/40076 - // cf: https://github.com/BioContainers/multi-package-containers/pull/2554 - conda "bioconda::bioconductor-purecn=2.4.0" + // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. + conda "bioconda::bioconductor-purecn=2.4.0 bioconda::bioconductor-txdb.hsapiens.ucsc.hg38.knowngene=3.16.0 bioconductor-txdb.hsapiens.ucsc.hg19.knowngene=3.2.2 bioconda::bioconductor-org.hs.eg.db=3.16.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE': - 'quay.io/biocontainers/YOUR-TOOL-HERE' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-582ac26068889091d5e798347c637f8208d77a71:a29c64a63498b1ee8b192521fdf6ed3c65506994-0': + 'quay.io/biocontainers/mulled-v2-582ac26068889091d5e798347c637f8208d77a71:a29c64a63498b1ee8b192521fdf6ed3c65506994-0' }" input: tuple val(meta), path(vcf) - - path coverage + path tumor_coverage + path normal_coverage path normal_db path intervals - - //TODO: optional inputs - //path blacklist - //path mapping_bias - + path mapping_bias + path blacklist val genome + val segmentation_function + val model_type + val seed_val output: - //TODO: proper output need to be set up - //tuple val(meta), path("*.txt"), emit: output_purecn - path "versions.yml" , emit: versions + tuple val(meta), path("*.csv") , emit: csv + tuple val(meta), path("*_variants.csv") , emit: variants_csv + tuple val(meta), path("*.pdf") , emit: pdf + tuple val(meta), path("*.rds") , emit: rds + tuple val(meta), path("*_amplification_pvalues.csv") , emit: csv + tuple val(meta), path("*_chromosomes.pdf") , emit: chr_pdf + tuple val(meta), path("*_dnacopy.seg") , emit: seg + tuple val(meta), path("*_genes.csv") , emit: genes_csv + tuple val(meta), path("*_local_optima.pdf") , emit: local_optima_pdf + tuple val(meta), path("*.log") , emit: log + tuple val(meta), path("*_loh.vcf") , emit: loh_vcf + tuple val(meta), path("*_loh.vcf.gz") , emit: loh_vcf_gz + tuple val(meta), path("*_loh.vcf.gz.tbi") , emit: loh_vcf_tbi + tuple val(meta), path("*_loh.csv") , emit: loh_csv + tuple val(meta), path("*_loh-effects-stats.csv") , emit: loh_stats_csv + tuple val(meta), path("*_loh-effects-stats.genes.txt") , emit: loh_effects_txt + tuple val(meta), path("*_loh-effects-stats.html") , emit: loh_effects_html + tuple val(meta), path("*_loh-effects.vcf.gz") , emit: loh_effects_vcf + tuple val(meta), path("*_loh-effects.vcf.gz.tbi") , emit: loh_effects_tbi + tuple val(meta), path("*-purecn-lohsummary.yaml") , emit: loh_summary_yaml + tuple val(meta), path("*_loh-effects.csv") , emit: loh_effects_csv + tuple val(meta), path("*_segmentation.pdf") , emit: segmentation_pdf + tuple val(meta), path("*-sort_coverage_loess.png") , emit: sort_coverage_loess_png + tuple val(meta), path("*-sort_coverage_loess_qc.txt") , emit: sort_coverage_loess_qc_txt + tuple val(meta), path("*-sort_coverage_loess.txt.gz") , emit: sort_coverage_loess_txt_gz + tuple val(meta), path("*-sort_coverage.txt.gz") , emit: sort_coverage_txt_gz + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -34,24 +56,45 @@ process PURECN_RUN { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def normal_cov = normal_coverage ? "--fun-segmentation ${normal_coverage}" : "" + def segmentation = segmentation_function ? "--fun-segmentation ${segmentation_function}" : "" + def map_bias = mapping_bias ? "--mapping-bias-file ${mapping_bias}" : "" + def model = model_type ? "--model ${model_type}" : "" + def blacklist = snp_blacklist ? "--snp-blacklist ${snp_blacklist}" : "" + def seed = seed_val ? "--seed ${seed_val}" : "" + def VERSION = '2.4.0' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. - //TODO: The following script is a minimal test run, for a production pipeline consider to add the followings: - // --stats-file ${SAMPLEID}_mutect_stats.txt --mapping-bias-file ${mapping_bias} --snp-blacklist ${blacklist} - // --force --post-optimize --seed 123 --bootstrapn 500 --normal ${normal_coverage} --fun-segmentation PSCBS - // --cores ${tasks.cpus} """ - Rscript PureCN.R \ - --out purecn/output/${meta.id}/ \\ - --tumor ${coverage} \\ - --sampleid ${meta.id} \\ + library_path=\$(Rscript -e 'cat(.libPaths(), sep = "\\n")') + Rscript "\$library_path"PureCN.R \\ + --out ./ \\ + --tumor ${tumor_coverage} \\ + --normal ${normal_cov} \\ + --sampleid ${prefix} \\ --vcf ${vcf} \\ --normaldb ${normal_db} \\ --intervals ${intervals} \\ - --genome ${genome} + --genome ${genome} \\ + --stats-file ${prefix}_stats.txt \\ + ${segmentation} \\ + ${map_bias} \\ + ${args} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + purecn: ${VERSION} + END_VERSIONS + """ + + stub: + + //TODO add STUB + + """ cat <<-END_VERSIONS > versions.yml "${task.process}": - purecn: \$(Rscript /usr/local/lib/R/library/PureCN/extdata/PureCN.R --version) + purecn: ${VERSION} END_VERSIONS """ } From 69b4b5fd3e32b2d4440c3b842e57dec0a8309524 Mon Sep 17 00:00:00 2001 From: aldosr Date: Tue, 30 May 2023 16:35:47 +0200 Subject: [PATCH 06/22] [ci skip] Format with prettier --- tests/config/pytest_modules.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 645e0333352..327220dc81f 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -2782,7 +2782,7 @@ prokka: purecn/run: - modules/nf-core/purecn/run/** - tests/modules/nf-core/purecn/run/** - + purecn/normaldb: - modules/nf-core/purecn/normaldb/** - tests/modules/nf-core/purecn/normaldb/** From 218986d113564d408cfd3202e8b2fd4b603aadf0 Mon Sep 17 00:00:00 2001 From: aldosr Date: Tue, 4 Jul 2023 15:59:38 +0200 Subject: [PATCH 07/22] [ci skip] Address review question and set up stub --- modules/nf-core/purecn/run/main.nf | 59 ++++++++++++++++++------------ 1 file changed, 35 insertions(+), 24 deletions(-) diff --git a/modules/nf-core/purecn/run/main.nf b/modules/nf-core/purecn/run/main.nf index c408464ba40..3c7bd8fe8f0 100644 --- a/modules/nf-core/purecn/run/main.nf +++ b/modules/nf-core/purecn/run/main.nf @@ -9,24 +9,16 @@ process PURECN_RUN { 'quay.io/biocontainers/mulled-v2-582ac26068889091d5e798347c637f8208d77a71:a29c64a63498b1ee8b192521fdf6ed3c65506994-0' }" input: - tuple val(meta), path(vcf) - path tumor_coverage - path normal_coverage + tuple val(meta), path(intervals), path(coverage), path(vcf) path normal_db - path intervals - path mapping_bias - path blacklist val genome - val segmentation_function - val model_type - val seed_val output: tuple val(meta), path("*.csv") , emit: csv tuple val(meta), path("*_variants.csv") , emit: variants_csv tuple val(meta), path("*.pdf") , emit: pdf tuple val(meta), path("*.rds") , emit: rds - tuple val(meta), path("*_amplification_pvalues.csv") , emit: csv + tuple val(meta), path("*_amplification_pvalues.csv") , emit: amplification_pvalues_csv tuple val(meta), path("*_chromosomes.pdf") , emit: chr_pdf tuple val(meta), path("*_dnacopy.seg") , emit: seg tuple val(meta), path("*_genes.csv") , emit: genes_csv @@ -56,28 +48,21 @@ process PURECN_RUN { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def normal_cov = normal_coverage ? "--fun-segmentation ${normal_coverage}" : "" - def segmentation = segmentation_function ? "--fun-segmentation ${segmentation_function}" : "" - def map_bias = mapping_bias ? "--mapping-bias-file ${mapping_bias}" : "" - def model = model_type ? "--model ${model_type}" : "" - def blacklist = snp_blacklist ? "--snp-blacklist ${snp_blacklist}" : "" - def seed = seed_val ? "--seed ${seed_val}" : "" def VERSION = '2.4.0' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. """ library_path=\$(Rscript -e 'cat(.libPaths(), sep = "\\n")') - Rscript "\$library_path"PureCN.R \\ + Rscript "\$library_path"/PureCN/extdata/PureCN.R \\ --out ./ \\ - --tumor ${tumor_coverage} \\ - --normal ${normal_cov} \\ + --tumor ${coverage} \\ --sampleid ${prefix} \\ --vcf ${vcf} \\ --normaldb ${normal_db} \\ --intervals ${intervals} \\ --genome ${genome} \\ + --parallel \\ + --cores ${task.cpus} \\ --stats-file ${prefix}_stats.txt \\ - ${segmentation} \\ - ${map_bias} \\ ${args} cat <<-END_VERSIONS > versions.yml @@ -87,11 +72,37 @@ process PURECN_RUN { """ stub: - - //TODO add STUB + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION = '2.4.0' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. """ - + touch ${prefix}.csv + touch ${prefix}_variants.csv + touch ${prefix}.pdf + touch ${prefix}.rds + touch ${prefix}_amplification_pvalues.csv + touch ${prefix}_chromosomes.pdf + touch ${prefix}_dnacopy.seg + touch ${prefix}_genes.csv + touch ${prefix}_local_optima.pdf + touch ${prefix}.log + touch ${prefix}_loh.vcf + touch ${prefix}_loh.vcf.gz + touch ${prefix}_loh.vcf.gz.tbi + touch ${prefix}_loh.csv + touch ${prefix}_loh-effects-stats.csv + touch ${prefix}_loh-effects-stats.genes.txt + touch ${prefix}_loh-effects-stats.html + touch ${prefix}_loh-effects.vcf.gz + touch ${prefix}_loh-effects.vcf.gz.tbi + touch ${prefix}-purecn-lohsummary.yaml + touch ${prefix}_loh-effects.csv + touch ${prefix}_segmentation.pdf + touch ${prefix}-sort_coverage_loess.png + touch ${prefix}-sort_coverage_loess_qc.txt + touch ${prefix}-sort_coverage_loess.txt.gz + touch ${prefix}-sort_coverage.txt.gz cat <<-END_VERSIONS > versions.yml "${task.process}": purecn: ${VERSION} From 8515a5354bdfe7abdf9bfc3cfb4bc1d37eb6d980 Mon Sep 17 00:00:00 2001 From: aldosr Date: Wed, 5 Jul 2023 11:46:33 +0200 Subject: [PATCH 08/22] [ci skip] Set stub for testing --- tests/modules/nf-core/purecn/run/main.nf | 27 +++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/tests/modules/nf-core/purecn/run/main.nf b/tests/modules/nf-core/purecn/run/main.nf index f8e37f585c4..5bb7f2fd537 100644 --- a/tests/modules/nf-core/purecn/run/main.nf +++ b/tests/modules/nf-core/purecn/run/main.nf @@ -4,12 +4,33 @@ nextflow.enable.dsl = 2 include { PURECN_RUN } from '../../../../../modules/nf-core/purecn/run/main.nf' +process STUB_PURECN_RUN { + output: + path("*interval_file.txt") , emit: intervals + path("*coverage.txt") , emit: coverage + path("*.vcf.gz") , emit: vcf + path("*normal_db.rds") , emit: normal_db + + stub: + """ + touch interval_file.txt + touch coverage.txt + touch test.vcf.gz + touch normal_db.rds + """ +} + workflow test_purecn_run { input = [ - [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + [ id:'test'], + STUB_PURECN_RUN.out.intervals, + STUB_PURECN_RUN.out.coverage, + STUB_PURECN_RUN.out.vcf ] - PURECN_RUN ( input ) + normal_db = STUB_PURECN_RUN.out.normal_db + genome = "hg38" + + PURECN_RUN ( input, normal_db, genome ) } From 1f1ad8a7cb20910cfcc5d26d77d6d09dabb61d58 Mon Sep 17 00:00:00 2001 From: aldosr Date: Wed, 5 Jul 2023 13:53:18 +0200 Subject: [PATCH 09/22] Reformat with prettier --- tests/config/pytest_modules.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 5009d32d4c3..19d6fe37f12 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -2858,7 +2858,7 @@ purecn/intervalfile: purecn/normaldb: - modules/nf-core/purecn/normaldb/** - tests/modules/nf-core/purecn/normaldb/** - + purecn/run: - modules/nf-core/purecn/run/** - tests/modules/nf-core/purecn/run/** From 56b9f9db4f90a50a2a261565bbf652568480f639 Mon Sep 17 00:00:00 2001 From: aldosr Date: Thu, 6 Jul 2023 13:57:51 +0200 Subject: [PATCH 10/22] [CI skip] Adjust some typos --- modules/nf-core/purecn/run/main.nf | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/nf-core/purecn/run/main.nf b/modules/nf-core/purecn/run/main.nf index 3c7bd8fe8f0..9c12e0bb357 100644 --- a/modules/nf-core/purecn/run/main.nf +++ b/modules/nf-core/purecn/run/main.nf @@ -33,13 +33,13 @@ process PURECN_RUN { tuple val(meta), path("*_loh-effects-stats.html") , emit: loh_effects_html tuple val(meta), path("*_loh-effects.vcf.gz") , emit: loh_effects_vcf tuple val(meta), path("*_loh-effects.vcf.gz.tbi") , emit: loh_effects_tbi - tuple val(meta), path("*-purecn-lohsummary.yaml") , emit: loh_summary_yaml + tuple val(meta), path("*_purecn-lohsummary.yaml") , emit: loh_summary_yaml tuple val(meta), path("*_loh-effects.csv") , emit: loh_effects_csv tuple val(meta), path("*_segmentation.pdf") , emit: segmentation_pdf - tuple val(meta), path("*-sort_coverage_loess.png") , emit: sort_coverage_loess_png - tuple val(meta), path("*-sort_coverage_loess_qc.txt") , emit: sort_coverage_loess_qc_txt - tuple val(meta), path("*-sort_coverage_loess.txt.gz") , emit: sort_coverage_loess_txt_gz - tuple val(meta), path("*-sort_coverage.txt.gz") , emit: sort_coverage_txt_gz + tuple val(meta), path("*_sort_coverage_loess.png") , emit: sort_coverage_loess_png + tuple val(meta), path("*_sort_coverage_loess_qc.txt") , emit: sort_coverage_loess_qc_txt + tuple val(meta), path("*_sort_coverage_loess.txt.gz") , emit: sort_coverage_loess_txt_gz + tuple val(meta), path("*_sort_coverage.txt.gz") , emit: sort_coverage_txt_gz path "versions.yml" , emit: versions when: @@ -96,13 +96,13 @@ process PURECN_RUN { touch ${prefix}_loh-effects-stats.html touch ${prefix}_loh-effects.vcf.gz touch ${prefix}_loh-effects.vcf.gz.tbi - touch ${prefix}-purecn-lohsummary.yaml + touch ${prefix}_purecn-lohsummary.yaml touch ${prefix}_loh-effects.csv touch ${prefix}_segmentation.pdf - touch ${prefix}-sort_coverage_loess.png - touch ${prefix}-sort_coverage_loess_qc.txt - touch ${prefix}-sort_coverage_loess.txt.gz - touch ${prefix}-sort_coverage.txt.gz + touch ${prefix}_sort_coverage_loess.png + touch ${prefix}_sort_coverage_loess_qc.txt + touch ${prefix}_sort_coverage_loess.txt.gz + touch ${prefix}_sort_coverage.txt.gz cat <<-END_VERSIONS > versions.yml "${task.process}": purecn: ${VERSION} From 0024556a5fa37bec321383c3abe8a3a766de722d Mon Sep 17 00:00:00 2001 From: aldosr Date: Thu, 6 Jul 2023 13:58:22 +0200 Subject: [PATCH 11/22] [CI skip] Set up test script using stub --- tests/modules/nf-core/purecn/run/main.nf | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/tests/modules/nf-core/purecn/run/main.nf b/tests/modules/nf-core/purecn/run/main.nf index 5bb7f2fd537..52eb3d3d520 100644 --- a/tests/modules/nf-core/purecn/run/main.nf +++ b/tests/modules/nf-core/purecn/run/main.nf @@ -6,10 +6,10 @@ include { PURECN_RUN } from '../../../../../modules/nf-core/purecn/run/main.nf' process STUB_PURECN_RUN { output: - path("*interval_file.txt") , emit: intervals - path("*coverage.txt") , emit: coverage - path("*.vcf.gz") , emit: vcf - path("*normal_db.rds") , emit: normal_db + path("*.txt") , emit: intervals + path("*.txt") , emit: coverage + path("*.vcf.gz") , emit: vcf + path("*.rds") , emit: normal_db stub: """ @@ -21,15 +21,17 @@ process STUB_PURECN_RUN { } workflow test_purecn_run { - + + STUB_PURECN_RUN() + input = [ [ id:'test'], - STUB_PURECN_RUN.out.intervals, - STUB_PURECN_RUN.out.coverage, - STUB_PURECN_RUN.out.vcf + file("interval_file.txt"), + file("coverage.txt"), + file("test.vcf.gz") ] - normal_db = STUB_PURECN_RUN.out.normal_db + normal_db = file("normal_db.rds") genome = "hg38" PURECN_RUN ( input, normal_db, genome ) From 4fcf9d9e2534372ffe594e4c2e63c909c3e0f2fc Mon Sep 17 00:00:00 2001 From: aldosr Date: Thu, 6 Jul 2023 13:58:49 +0200 Subject: [PATCH 12/22] Set up test yml --- tests/modules/nf-core/purecn/run/test.yml | 41 +++++++++++++++++------ 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/tests/modules/nf-core/purecn/run/test.yml b/tests/modules/nf-core/purecn/run/test.yml index c0723b79316..71938fdcbba 100644 --- a/tests/modules/nf-core/purecn/run/test.yml +++ b/tests/modules/nf-core/purecn/run/test.yml @@ -1,12 +1,33 @@ -## TODO nf-core: Please run the following command to build this file: -# nf-core modules create-test-yml purecn/run -- name: "purecn run" - command: nextflow run ./tests/modules/nf-core/purecn/run -entry test_purecn_run -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/purecn/run/nextflow.config +- name: purecn run + command: nextflow run ./tests/modules/nf-core/purecn/run -entry test_purecn_run -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/purecn/run/nextflow.config -stub-run tags: - - "purecn" - - "purecn/run" + - purecn + - purecn/run files: - - path: "output/purecn/test.bam" - md5sum: e667c7caad0bc4b7ac383fd023c654fc - - path: "output/purecn/versions.yml" - md5sum: a01fe51bc4c6a3a6226fbf77b2c7cf3b + - path: output/purecn/test.csv + - path: output/purecn/test_variants.csv + - path: output/purecn/test.pdf + - path: output/purecn/test.rds + - path: output/purecn/test_amplification_pvalues.csv + - path: output/purecn/test_chromosomes.pdf + - path: output/purecn/test_dnacopy.seg + - path: output/purecn/test_genes.csv + - path: output/purecn/test_local_optima.pdf + - path: output/purecn/test.log + - path: output/purecn/test_loh.vcf + - path: output/purecn/test_loh.vcf.gz + - path: output/purecn/test_loh.vcf.gz.tbi + - path: output/purecn/test_loh.csv + - path: output/purecn/test_loh-effects-stats.csv + - path: output/purecn/test_loh-effects-stats.genes.txt + - path: output/purecn/test_loh-effects-stats.html + - path: output/purecn/test_loh-effects.vcf.gz + - path: output/purecn/test_loh-effects.vcf.gz.tbi + - path: output/purecn/test_lohsummary.yaml + - path: output/purecn/test_loh-effects.csv + - path: output/purecn/test_segmentation.pdf + - path: output/purecn/test_sort_coverage_loess.png + - path: output/purecn/test_sort_coverage_loess_qc.txt + - path: output/purecn/test_sort_coverage_loess.txt.gz + - path: output/purecn/test_sort_coverage.txt.gz + - path: output/purecn/versions.yml \ No newline at end of file From 205abd4e06f3486cc6b85a6b0b315d68ffba3f66 Mon Sep 17 00:00:00 2001 From: aldosr Date: Thu, 6 Jul 2023 14:01:34 +0200 Subject: [PATCH 13/22] Reformat with prettier --- tests/modules/nf-core/purecn/run/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/modules/nf-core/purecn/run/test.yml b/tests/modules/nf-core/purecn/run/test.yml index 71938fdcbba..deb39f80165 100644 --- a/tests/modules/nf-core/purecn/run/test.yml +++ b/tests/modules/nf-core/purecn/run/test.yml @@ -30,4 +30,4 @@ - path: output/purecn/test_sort_coverage_loess_qc.txt - path: output/purecn/test_sort_coverage_loess.txt.gz - path: output/purecn/test_sort_coverage.txt.gz - - path: output/purecn/versions.yml \ No newline at end of file + - path: output/purecn/versions.yml From c77c9ec67a72633cd95c4959e96edfabb2b372f1 Mon Sep 17 00:00:00 2001 From: aldosr Date: Thu, 6 Jul 2023 14:31:14 +0200 Subject: [PATCH 14/22] Set up meta.yml file and fix typos --- modules/nf-core/purecn/run/main.nf | 4 +- modules/nf-core/purecn/run/meta.yml | 181 +++++++++++++++++++--- tests/modules/nf-core/purecn/run/test.yml | 2 +- 3 files changed, 161 insertions(+), 26 deletions(-) diff --git a/modules/nf-core/purecn/run/main.nf b/modules/nf-core/purecn/run/main.nf index 9c12e0bb357..3333300894a 100644 --- a/modules/nf-core/purecn/run/main.nf +++ b/modules/nf-core/purecn/run/main.nf @@ -33,7 +33,7 @@ process PURECN_RUN { tuple val(meta), path("*_loh-effects-stats.html") , emit: loh_effects_html tuple val(meta), path("*_loh-effects.vcf.gz") , emit: loh_effects_vcf tuple val(meta), path("*_loh-effects.vcf.gz.tbi") , emit: loh_effects_tbi - tuple val(meta), path("*_purecn-lohsummary.yaml") , emit: loh_summary_yaml + tuple val(meta), path("*_loh-summary.yaml") , emit: loh_summary_yaml tuple val(meta), path("*_loh-effects.csv") , emit: loh_effects_csv tuple val(meta), path("*_segmentation.pdf") , emit: segmentation_pdf tuple val(meta), path("*_sort_coverage_loess.png") , emit: sort_coverage_loess_png @@ -96,7 +96,7 @@ process PURECN_RUN { touch ${prefix}_loh-effects-stats.html touch ${prefix}_loh-effects.vcf.gz touch ${prefix}_loh-effects.vcf.gz.tbi - touch ${prefix}_purecn-lohsummary.yaml + touch ${prefix}_loh-summary.yaml touch ${prefix}_loh-effects.csv touch ${prefix}_segmentation.pdf touch ${prefix}_sort_coverage_loess.png diff --git a/modules/nf-core/purecn/run/meta.yml b/modules/nf-core/purecn/run/meta.yml index aba277a4d18..993f7c25224 100644 --- a/modules/nf-core/purecn/run/meta.yml +++ b/modules/nf-core/purecn/run/meta.yml @@ -1,7 +1,10 @@ -name: "purecn_run" -description: run PureCN to normalize, segment and determine purity and ploidy +name: "purecn run" +description: Run PureCN workflow to normalize, segment and determine purity and ploidy keywords: - copy number alteration calling + - hybrid capture sequencing + - targeted sequencing + - DNA sequencing tools: - "purecn": description: "Copy number calling and SNV classification using targeted short read sequencing" @@ -10,41 +13,173 @@ tools: tool_dev_url: "https://github.com/lima1/PureCN" doi: "10.1186/s13029-016-0060-z" licence: "Artistic-2.0" + args_id: "$args" -## TODO nf-core: Add a description of all of the variables used as input input: - # Only when we have meta - meta: type: map description: | Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - # - ## TODO nf-core: Delete / customise this example input - - bam: + e.g. [ id:'test' ] + - intervals: type: file - description: BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" + description: | + BED file of target intervals, generated from IntervalFile.R + pattern: "{*.bed,*.txt}" + - coverage: + type: file + description: Coverage file generated from Coverage.R + pattern: "*.txt" + - vcf: + type: file + description: | + Normal panel in VCF format, used to calculate mapping bias + pattern: "*.vcf.gz" + - normaldb: + type: file + description: | + Normal panel in RDS format, generated from NormalDB.R + pattern: "*.rds" + - genome: + type: string + description: Genome build -## TODO nf-core: Add a description of all of the variables used as output output: - #Only when we have meta - - meta: - type: map + - csv: + type: file description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - # + CSV file containing copy number calls + pattern: "*.csv" + - variants_csv: + type: file + description: | + CSV file containing SNV calls + pattern: "*_variants.csv" + - pdf: + type: file + description: | + PDF file containing copy number plots + pattern: "*.pdf" + - rds: + type: file + description: | + RDS file containing copy number calls + pattern: "*.rds" + - amplification_pvalues_csv: + type: file + description: | + CSV file containing amplification p-values + pattern: "*_amplification_pvalues.csv" + - chr_pdf: + type: file + description: | + PDF file containing chromosome plots + pattern: "*_chromosomes.pdf" + - seg: + type: file + description: | + Segmentation file generated from DNAcopy.R + pattern: "*_dnacopy.seg" + - genes_csv: + type: file + description: | + CSV file containing gene copy number calls + pattern: "*_genes.csv" + - local_optima_pdf: + type: file + description: | + PDF file containing local optima plots + pattern: "*_local_optima.pdf" + - log: + type: file + description: | + Log file + pattern: "*.log" + - loh_vcf: + type: file + description: | + VCF file containing LOH calls + pattern: "*_loh.vcf" + - loh_vcf_gz: + type: file + description: | + GZipped VCF file containing LOH calls + pattern: "*_loh.vcf.gz" + - loh_vcf_tbi: + type: file + description: | + Tabix index file for LOH VCF + pattern: "*_loh.vcf.gz.tbi" + - loh_csv: + type: file + description: | + CSV file containing LOH calls + pattern: "*_loh.csv" + - loh_stats_csv: + type: file + description: | + CSV file containing LOH statistics + pattern: "*_loh-effects-stats.csv" + - loh_effects_txt: + type: file + description: | + TXT file containing LOH effects + pattern: "*_loh-effects-stats.genes.txt" + - loh_effects_html: + type: file + description: | + HTML file containing LOH effects + pattern: "*_loh-effects-stats.html" + - loh_effects_vcf: + type: file + description: | + VCF file containing LOH effects + pattern: "*_loh-effects.vcf.gz" + - loh_effects_tbi: + type: file + description: | + Tabix index file for LOH effects VCF + pattern: "*_loh-effects.vcf.gz.tbi" + - loh_summary_yaml: + type: file + description: | + YAML file containing LOH summary + pattern: "*_loh-summary.yaml" + - loh_effects_csv: + type: file + description: | + CSV file containing LOH effects + pattern: "*_loh-effects.csv" + - segmentation_pdf: + type: file + description: | + PDF file containing segmentation plots + pattern: "*_segmentation.pdf" + - sort_coverage_loess_png: + type: file + description: | + PNG file containing sort coverage loess plots + pattern: "*_sort-coverage-loess.png" + - sort_coverage_loess_qc_txt: + type: file + description: | + TXT file containing sort coverage loess QC + pattern: "*_sort-coverage-loess.qc.txt" + - sort_coverage_loess_txt_gz: + type: file + description: | + GZipped TXT file containing sort coverage loess + pattern: "*_sort-coverage-loess.txt.gz" + - sort_coverage_txt_gz: + type: file + description: | + GZipped TXT file containing sort coverage + pattern: "*_sort-coverage.txt.gz" - versions: type: file description: File containing software versions pattern: "versions.yml" - ## TODO nf-core: Delete / customise this example output - - bam: - type: file - description: Sorted BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" authors: - "@aldosr" - - "@lbeltrame" + - "@lbeltrame" \ No newline at end of file diff --git a/tests/modules/nf-core/purecn/run/test.yml b/tests/modules/nf-core/purecn/run/test.yml index deb39f80165..bdde0b7bada 100644 --- a/tests/modules/nf-core/purecn/run/test.yml +++ b/tests/modules/nf-core/purecn/run/test.yml @@ -23,7 +23,7 @@ - path: output/purecn/test_loh-effects-stats.html - path: output/purecn/test_loh-effects.vcf.gz - path: output/purecn/test_loh-effects.vcf.gz.tbi - - path: output/purecn/test_lohsummary.yaml + - path: output/purecn/test_loh-summary.yaml - path: output/purecn/test_loh-effects.csv - path: output/purecn/test_segmentation.pdf - path: output/purecn/test_sort_coverage_loess.png From de5741649e18e0071823484ce1b686d147ddd54c Mon Sep 17 00:00:00 2001 From: aldosr Date: Thu, 6 Jul 2023 14:34:06 +0200 Subject: [PATCH 15/22] Reformat with prettier --- modules/nf-core/purecn/run/meta.yml | 210 ++++++++++++++-------------- 1 file changed, 105 insertions(+), 105 deletions(-) diff --git a/modules/nf-core/purecn/run/meta.yml b/modules/nf-core/purecn/run/meta.yml index 993f7c25224..94d4c4b008d 100644 --- a/modules/nf-core/purecn/run/meta.yml +++ b/modules/nf-core/purecn/run/meta.yml @@ -36,10 +36,10 @@ input: Normal panel in VCF format, used to calculate mapping bias pattern: "*.vcf.gz" - normaldb: - type: file - description: | - Normal panel in RDS format, generated from NormalDB.R - pattern: "*.rds" + type: file + description: | + Normal panel in RDS format, generated from NormalDB.R + pattern: "*.rds" - genome: type: string description: Genome build @@ -51,130 +51,130 @@ output: CSV file containing copy number calls pattern: "*.csv" - variants_csv: - type: file - description: | - CSV file containing SNV calls - pattern: "*_variants.csv" + type: file + description: | + CSV file containing SNV calls + pattern: "*_variants.csv" - pdf: - type: file - description: | - PDF file containing copy number plots - pattern: "*.pdf" + type: file + description: | + PDF file containing copy number plots + pattern: "*.pdf" - rds: - type: file - description: | - RDS file containing copy number calls - pattern: "*.rds" + type: file + description: | + RDS file containing copy number calls + pattern: "*.rds" - amplification_pvalues_csv: - type: file - description: | - CSV file containing amplification p-values - pattern: "*_amplification_pvalues.csv" + type: file + description: | + CSV file containing amplification p-values + pattern: "*_amplification_pvalues.csv" - chr_pdf: - type: file - description: | - PDF file containing chromosome plots - pattern: "*_chromosomes.pdf" + type: file + description: | + PDF file containing chromosome plots + pattern: "*_chromosomes.pdf" - seg: - type: file - description: | - Segmentation file generated from DNAcopy.R - pattern: "*_dnacopy.seg" + type: file + description: | + Segmentation file generated from DNAcopy.R + pattern: "*_dnacopy.seg" - genes_csv: - type: file - description: | - CSV file containing gene copy number calls - pattern: "*_genes.csv" + type: file + description: | + CSV file containing gene copy number calls + pattern: "*_genes.csv" - local_optima_pdf: - type: file - description: | - PDF file containing local optima plots - pattern: "*_local_optima.pdf" + type: file + description: | + PDF file containing local optima plots + pattern: "*_local_optima.pdf" - log: - type: file - description: | - Log file - pattern: "*.log" + type: file + description: | + Log file + pattern: "*.log" - loh_vcf: - type: file - description: | - VCF file containing LOH calls - pattern: "*_loh.vcf" + type: file + description: | + VCF file containing LOH calls + pattern: "*_loh.vcf" - loh_vcf_gz: - type: file - description: | - GZipped VCF file containing LOH calls - pattern: "*_loh.vcf.gz" + type: file + description: | + GZipped VCF file containing LOH calls + pattern: "*_loh.vcf.gz" - loh_vcf_tbi: - type: file - description: | - Tabix index file for LOH VCF - pattern: "*_loh.vcf.gz.tbi" + type: file + description: | + Tabix index file for LOH VCF + pattern: "*_loh.vcf.gz.tbi" - loh_csv: - type: file - description: | - CSV file containing LOH calls - pattern: "*_loh.csv" + type: file + description: | + CSV file containing LOH calls + pattern: "*_loh.csv" - loh_stats_csv: - type: file - description: | - CSV file containing LOH statistics - pattern: "*_loh-effects-stats.csv" + type: file + description: | + CSV file containing LOH statistics + pattern: "*_loh-effects-stats.csv" - loh_effects_txt: - type: file - description: | - TXT file containing LOH effects - pattern: "*_loh-effects-stats.genes.txt" + type: file + description: | + TXT file containing LOH effects + pattern: "*_loh-effects-stats.genes.txt" - loh_effects_html: - type: file - description: | - HTML file containing LOH effects - pattern: "*_loh-effects-stats.html" + type: file + description: | + HTML file containing LOH effects + pattern: "*_loh-effects-stats.html" - loh_effects_vcf: - type: file - description: | - VCF file containing LOH effects - pattern: "*_loh-effects.vcf.gz" + type: file + description: | + VCF file containing LOH effects + pattern: "*_loh-effects.vcf.gz" - loh_effects_tbi: - type: file - description: | - Tabix index file for LOH effects VCF - pattern: "*_loh-effects.vcf.gz.tbi" + type: file + description: | + Tabix index file for LOH effects VCF + pattern: "*_loh-effects.vcf.gz.tbi" - loh_summary_yaml: - type: file - description: | - YAML file containing LOH summary - pattern: "*_loh-summary.yaml" + type: file + description: | + YAML file containing LOH summary + pattern: "*_loh-summary.yaml" - loh_effects_csv: - type: file - description: | - CSV file containing LOH effects - pattern: "*_loh-effects.csv" + type: file + description: | + CSV file containing LOH effects + pattern: "*_loh-effects.csv" - segmentation_pdf: - type: file - description: | - PDF file containing segmentation plots - pattern: "*_segmentation.pdf" + type: file + description: | + PDF file containing segmentation plots + pattern: "*_segmentation.pdf" - sort_coverage_loess_png: - type: file - description: | - PNG file containing sort coverage loess plots - pattern: "*_sort-coverage-loess.png" + type: file + description: | + PNG file containing sort coverage loess plots + pattern: "*_sort-coverage-loess.png" - sort_coverage_loess_qc_txt: - type: file - description: | - TXT file containing sort coverage loess QC - pattern: "*_sort-coverage-loess.qc.txt" + type: file + description: | + TXT file containing sort coverage loess QC + pattern: "*_sort-coverage-loess.qc.txt" - sort_coverage_loess_txt_gz: - type: file - description: | - GZipped TXT file containing sort coverage loess - pattern: "*_sort-coverage-loess.txt.gz" + type: file + description: | + GZipped TXT file containing sort coverage loess + pattern: "*_sort-coverage-loess.txt.gz" - sort_coverage_txt_gz: - type: file - description: | - GZipped TXT file containing sort coverage - pattern: "*_sort-coverage.txt.gz" + type: file + description: | + GZipped TXT file containing sort coverage + pattern: "*_sort-coverage.txt.gz" - versions: type: file description: File containing software versions @@ -182,4 +182,4 @@ output: authors: - "@aldosr" - - "@lbeltrame" \ No newline at end of file + - "@lbeltrame" From 2247914cb3fcbed9f767d309cf590797658a0cbf Mon Sep 17 00:00:00 2001 From: aldosr Date: Thu, 6 Jul 2023 14:37:36 +0200 Subject: [PATCH 16/22] Fix typo --- modules/nf-core/purecn/run/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/purecn/run/meta.yml b/modules/nf-core/purecn/run/meta.yml index 94d4c4b008d..f33acbacd80 100644 --- a/modules/nf-core/purecn/run/meta.yml +++ b/modules/nf-core/purecn/run/meta.yml @@ -1,4 +1,4 @@ -name: "purecn run" +name: "purecn_run" description: Run PureCN workflow to normalize, segment and determine purity and ploidy keywords: - copy number alteration calling From ceace122c5bbbcdb6fae90fbd2efccb19be2b59e Mon Sep 17 00:00:00 2001 From: aldosr Date: Thu, 6 Jul 2023 15:26:36 +0200 Subject: [PATCH 17/22] Remove quay.io from container string --- modules/nf-core/purecn/run/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/purecn/run/main.nf b/modules/nf-core/purecn/run/main.nf index 3333300894a..013ff817c87 100644 --- a/modules/nf-core/purecn/run/main.nf +++ b/modules/nf-core/purecn/run/main.nf @@ -6,7 +6,7 @@ process PURECN_RUN { conda "bioconda::bioconductor-purecn=2.4.0 bioconda::bioconductor-txdb.hsapiens.ucsc.hg38.knowngene=3.16.0 bioconductor-txdb.hsapiens.ucsc.hg19.knowngene=3.2.2 bioconda::bioconductor-org.hs.eg.db=3.16.0" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mulled-v2-582ac26068889091d5e798347c637f8208d77a71:a29c64a63498b1ee8b192521fdf6ed3c65506994-0': - 'quay.io/biocontainers/mulled-v2-582ac26068889091d5e798347c637f8208d77a71:a29c64a63498b1ee8b192521fdf6ed3c65506994-0' }" + 'biocontainers/mulled-v2-582ac26068889091d5e798347c637f8208d77a71:a29c64a63498b1ee8b192521fdf6ed3c65506994-0' }" input: tuple val(meta), path(intervals), path(coverage), path(vcf) From 1210b43da98660c579980449ae668d9d49b1950d Mon Sep 17 00:00:00 2001 From: aldosr Date: Fri, 14 Jul 2023 10:13:37 +0200 Subject: [PATCH 18/22] Remove optional input argument --- modules/nf-core/purecn/run/main.nf | 3 +-- modules/nf-core/purecn/run/meta.yml | 5 ----- tests/modules/nf-core/purecn/run/main.nf | 5 +---- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/modules/nf-core/purecn/run/main.nf b/modules/nf-core/purecn/run/main.nf index 013ff817c87..f325a21e1be 100644 --- a/modules/nf-core/purecn/run/main.nf +++ b/modules/nf-core/purecn/run/main.nf @@ -9,7 +9,7 @@ process PURECN_RUN { 'biocontainers/mulled-v2-582ac26068889091d5e798347c637f8208d77a71:a29c64a63498b1ee8b192521fdf6ed3c65506994-0' }" input: - tuple val(meta), path(intervals), path(coverage), path(vcf) + tuple val(meta), path(intervals), path(coverage) path normal_db val genome @@ -56,7 +56,6 @@ process PURECN_RUN { --out ./ \\ --tumor ${coverage} \\ --sampleid ${prefix} \\ - --vcf ${vcf} \\ --normaldb ${normal_db} \\ --intervals ${intervals} \\ --genome ${genome} \\ diff --git a/modules/nf-core/purecn/run/meta.yml b/modules/nf-core/purecn/run/meta.yml index f33acbacd80..9bfc3a7e40c 100644 --- a/modules/nf-core/purecn/run/meta.yml +++ b/modules/nf-core/purecn/run/meta.yml @@ -30,11 +30,6 @@ input: type: file description: Coverage file generated from Coverage.R pattern: "*.txt" - - vcf: - type: file - description: | - Normal panel in VCF format, used to calculate mapping bias - pattern: "*.vcf.gz" - normaldb: type: file description: | diff --git a/tests/modules/nf-core/purecn/run/main.nf b/tests/modules/nf-core/purecn/run/main.nf index 52eb3d3d520..51b78278fa5 100644 --- a/tests/modules/nf-core/purecn/run/main.nf +++ b/tests/modules/nf-core/purecn/run/main.nf @@ -8,14 +8,12 @@ process STUB_PURECN_RUN { output: path("*.txt") , emit: intervals path("*.txt") , emit: coverage - path("*.vcf.gz") , emit: vcf path("*.rds") , emit: normal_db stub: """ touch interval_file.txt touch coverage.txt - touch test.vcf.gz touch normal_db.rds """ } @@ -27,8 +25,7 @@ workflow test_purecn_run { input = [ [ id:'test'], file("interval_file.txt"), - file("coverage.txt"), - file("test.vcf.gz") + file("coverage.txt") ] normal_db = file("normal_db.rds") From a3acfbd3e79f4dfdd8ad82624532cccb93ad9f14 Mon Sep 17 00:00:00 2001 From: aldosr Date: Fri, 14 Jul 2023 10:36:07 +0200 Subject: [PATCH 19/22] Add optional outputs and clean non-mandatory parameters --- modules/nf-core/purecn/run/main.nf | 59 ++++++------------------------ 1 file changed, 11 insertions(+), 48 deletions(-) diff --git a/modules/nf-core/purecn/run/main.nf b/modules/nf-core/purecn/run/main.nf index f325a21e1be..34024a8030a 100644 --- a/modules/nf-core/purecn/run/main.nf +++ b/modules/nf-core/purecn/run/main.nf @@ -14,32 +14,17 @@ process PURECN_RUN { val genome output: - tuple val(meta), path("*.csv") , emit: csv - tuple val(meta), path("*_variants.csv") , emit: variants_csv tuple val(meta), path("*.pdf") , emit: pdf - tuple val(meta), path("*.rds") , emit: rds - tuple val(meta), path("*_amplification_pvalues.csv") , emit: amplification_pvalues_csv - tuple val(meta), path("*_chromosomes.pdf") , emit: chr_pdf - tuple val(meta), path("*_dnacopy.seg") , emit: seg - tuple val(meta), path("*_genes.csv") , emit: genes_csv tuple val(meta), path("*_local_optima.pdf") , emit: local_optima_pdf - tuple val(meta), path("*.log") , emit: log - tuple val(meta), path("*_loh.vcf") , emit: loh_vcf - tuple val(meta), path("*_loh.vcf.gz") , emit: loh_vcf_gz - tuple val(meta), path("*_loh.vcf.gz.tbi") , emit: loh_vcf_tbi - tuple val(meta), path("*_loh.csv") , emit: loh_csv - tuple val(meta), path("*_loh-effects-stats.csv") , emit: loh_stats_csv - tuple val(meta), path("*_loh-effects-stats.genes.txt") , emit: loh_effects_txt - tuple val(meta), path("*_loh-effects-stats.html") , emit: loh_effects_html - tuple val(meta), path("*_loh-effects.vcf.gz") , emit: loh_effects_vcf - tuple val(meta), path("*_loh-effects.vcf.gz.tbi") , emit: loh_effects_tbi - tuple val(meta), path("*_loh-summary.yaml") , emit: loh_summary_yaml - tuple val(meta), path("*_loh-effects.csv") , emit: loh_effects_csv - tuple val(meta), path("*_segmentation.pdf") , emit: segmentation_pdf - tuple val(meta), path("*_sort_coverage_loess.png") , emit: sort_coverage_loess_png - tuple val(meta), path("*_sort_coverage_loess_qc.txt") , emit: sort_coverage_loess_qc_txt - tuple val(meta), path("*_sort_coverage_loess.txt.gz") , emit: sort_coverage_loess_txt_gz - tuple val(meta), path("*_sort_coverage.txt.gz") , emit: sort_coverage_txt_gz + tuple val(meta), path("*_dnacopy.seg") , emit: seg + tuple val(meta), path("*_genes.csv") , emit: genes_csv , optional: true + tuple val(meta), path("*_amplification_pvalues.csv") , emit: amplification_pvalues_csv , optional: true + tuple val(meta), path("*.vcf.gz") , emit: vcf.gz , optional: true + tuple val(meta), path("*_variants.csv") , emit: variants_csv , optional: true + tuple val(meta), path("*_loh.csv") , emit: loh_csv , optional: true + tuple val(meta), path("*_chromosomes.pdf") , emit: chr_pdf , optional: true + tuple val(meta), path("*_segmentation.pdf") , emit: segmentation_pdf , optional: true + tuple val(meta), path("*_multisample.seg") , emit: multisample_seg , optional: true path "versions.yml" , emit: versions when: @@ -76,32 +61,10 @@ process PURECN_RUN { def VERSION = '2.4.0' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. """ - touch ${prefix}.csv - touch ${prefix}_variants.csv touch ${prefix}.pdf - touch ${prefix}.rds - touch ${prefix}_amplification_pvalues.csv - touch ${prefix}_chromosomes.pdf - touch ${prefix}_dnacopy.seg - touch ${prefix}_genes.csv touch ${prefix}_local_optima.pdf - touch ${prefix}.log - touch ${prefix}_loh.vcf - touch ${prefix}_loh.vcf.gz - touch ${prefix}_loh.vcf.gz.tbi - touch ${prefix}_loh.csv - touch ${prefix}_loh-effects-stats.csv - touch ${prefix}_loh-effects-stats.genes.txt - touch ${prefix}_loh-effects-stats.html - touch ${prefix}_loh-effects.vcf.gz - touch ${prefix}_loh-effects.vcf.gz.tbi - touch ${prefix}_loh-summary.yaml - touch ${prefix}_loh-effects.csv - touch ${prefix}_segmentation.pdf - touch ${prefix}_sort_coverage_loess.png - touch ${prefix}_sort_coverage_loess_qc.txt - touch ${prefix}_sort_coverage_loess.txt.gz - touch ${prefix}_sort_coverage.txt.gz + touch ${prefix}_dnacopy.seg + cat <<-END_VERSIONS > versions.yml "${task.process}": purecn: ${VERSION} From aa961d09f49f3af81da17d7b164c0269c2326959 Mon Sep 17 00:00:00 2001 From: aldosr Date: Fri, 14 Jul 2023 10:40:15 +0200 Subject: [PATCH 20/22] Clean non-mandatory outputs --- tests/modules/nf-core/purecn/run/test.yml | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/tests/modules/nf-core/purecn/run/test.yml b/tests/modules/nf-core/purecn/run/test.yml index bdde0b7bada..5c062bac774 100644 --- a/tests/modules/nf-core/purecn/run/test.yml +++ b/tests/modules/nf-core/purecn/run/test.yml @@ -4,30 +4,7 @@ - purecn - purecn/run files: - - path: output/purecn/test.csv - - path: output/purecn/test_variants.csv - path: output/purecn/test.pdf - - path: output/purecn/test.rds - - path: output/purecn/test_amplification_pvalues.csv - - path: output/purecn/test_chromosomes.pdf - path: output/purecn/test_dnacopy.seg - - path: output/purecn/test_genes.csv - path: output/purecn/test_local_optima.pdf - - path: output/purecn/test.log - - path: output/purecn/test_loh.vcf - - path: output/purecn/test_loh.vcf.gz - - path: output/purecn/test_loh.vcf.gz.tbi - - path: output/purecn/test_loh.csv - - path: output/purecn/test_loh-effects-stats.csv - - path: output/purecn/test_loh-effects-stats.genes.txt - - path: output/purecn/test_loh-effects-stats.html - - path: output/purecn/test_loh-effects.vcf.gz - - path: output/purecn/test_loh-effects.vcf.gz.tbi - - path: output/purecn/test_loh-summary.yaml - - path: output/purecn/test_loh-effects.csv - - path: output/purecn/test_segmentation.pdf - - path: output/purecn/test_sort_coverage_loess.png - - path: output/purecn/test_sort_coverage_loess_qc.txt - - path: output/purecn/test_sort_coverage_loess.txt.gz - - path: output/purecn/test_sort_coverage.txt.gz - path: output/purecn/versions.yml From a4e7d59492358202fee5c04e35a168fc951f0a12 Mon Sep 17 00:00:00 2001 From: aldosr Date: Fri, 14 Jul 2023 10:45:22 +0200 Subject: [PATCH 21/22] Reformat outputs --- modules/nf-core/purecn/run/meta.yml | 111 +++++----------------------- 1 file changed, 18 insertions(+), 93 deletions(-) diff --git a/modules/nf-core/purecn/run/meta.yml b/modules/nf-core/purecn/run/meta.yml index 9bfc3a7e40c..65460518454 100644 --- a/modules/nf-core/purecn/run/meta.yml +++ b/modules/nf-core/purecn/run/meta.yml @@ -40,36 +40,16 @@ input: description: Genome build output: - - csv: - type: file - description: | - CSV file containing copy number calls - pattern: "*.csv" - - variants_csv: - type: file - description: | - CSV file containing SNV calls - pattern: "*_variants.csv" - pdf: type: file description: | PDF file containing copy number plots pattern: "*.pdf" - - rds: - type: file - description: | - RDS file containing copy number calls - pattern: "*.rds" - - amplification_pvalues_csv: - type: file - description: | - CSV file containing amplification p-values - pattern: "*_amplification_pvalues.csv" - - chr_pdf: + - local_optima_pdf: type: file description: | - PDF file containing chromosome plots - pattern: "*_chromosomes.pdf" + PDF file containing local optima plots + pattern: "*_local_optima.pdf" - seg: type: file description: | @@ -80,96 +60,41 @@ output: description: | CSV file containing gene copy number calls pattern: "*_genes.csv" - - local_optima_pdf: - type: file - description: | - PDF file containing local optima plots - pattern: "*_local_optima.pdf" - - log: - type: file - description: | - Log file - pattern: "*.log" - - loh_vcf: + - amplification_pvalues_csv: type: file description: | - VCF file containing LOH calls - pattern: "*_loh.vcf" - - loh_vcf_gz: + CSV file containing amplification p-values + pattern: "*_amplification_pvalues.csv" + - vcf_gz: type: file description: | - GZipped VCF file containing LOH calls - pattern: "*_loh.vcf.gz" - - loh_vcf_tbi: + GZipped VCF file containing SNV calls + pattern: "*.vcf.gz" + - variants_csv: type: file description: | - Tabix index file for LOH VCF - pattern: "*_loh.vcf.gz.tbi" + CSV file containing SNV calls + pattern: "*_variants.csv" - loh_csv: type: file description: | CSV file containing LOH calls pattern: "*_loh.csv" - - loh_stats_csv: - type: file - description: | - CSV file containing LOH statistics - pattern: "*_loh-effects-stats.csv" - - loh_effects_txt: - type: file - description: | - TXT file containing LOH effects - pattern: "*_loh-effects-stats.genes.txt" - - loh_effects_html: - type: file - description: | - HTML file containing LOH effects - pattern: "*_loh-effects-stats.html" - - loh_effects_vcf: - type: file - description: | - VCF file containing LOH effects - pattern: "*_loh-effects.vcf.gz" - - loh_effects_tbi: - type: file - description: | - Tabix index file for LOH effects VCF - pattern: "*_loh-effects.vcf.gz.tbi" - - loh_summary_yaml: - type: file - description: | - YAML file containing LOH summary - pattern: "*_loh-summary.yaml" - - loh_effects_csv: + - chr_pdf: type: file description: | - CSV file containing LOH effects - pattern: "*_loh-effects.csv" + PDF file containing chromosome plots + pattern: "*_chromosomes.pdf" - segmentation_pdf: type: file description: | PDF file containing segmentation plots pattern: "*_segmentation.pdf" - - sort_coverage_loess_png: + - multisample.seg: type: file description: | - PNG file containing sort coverage loess plots - pattern: "*_sort-coverage-loess.png" - - sort_coverage_loess_qc_txt: - type: file - description: | - TXT file containing sort coverage loess QC - pattern: "*_sort-coverage-loess.qc.txt" - - sort_coverage_loess_txt_gz: - type: file - description: | - GZipped TXT file containing sort coverage loess - pattern: "*_sort-coverage-loess.txt.gz" - - sort_coverage_txt_gz: - type: file - description: | - GZipped TXT file containing sort coverage - pattern: "*_sort-coverage.txt.gz" + Segmentation file generated from DNAcopy.R + pattern: "*_multisample.seg" - versions: type: file description: File containing software versions From 707633f2e6f75b111e5ce9269aa2b35f77d82061 Mon Sep 17 00:00:00 2001 From: aldosr Date: Fri, 14 Jul 2023 10:54:22 +0200 Subject: [PATCH 22/22] Fix minor and address reviews --- modules/nf-core/purecn/run/main.nf | 2 +- modules/nf-core/purecn/run/meta.yml | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/nf-core/purecn/run/main.nf b/modules/nf-core/purecn/run/main.nf index 34024a8030a..956b9efc365 100644 --- a/modules/nf-core/purecn/run/main.nf +++ b/modules/nf-core/purecn/run/main.nf @@ -19,7 +19,7 @@ process PURECN_RUN { tuple val(meta), path("*_dnacopy.seg") , emit: seg tuple val(meta), path("*_genes.csv") , emit: genes_csv , optional: true tuple val(meta), path("*_amplification_pvalues.csv") , emit: amplification_pvalues_csv , optional: true - tuple val(meta), path("*.vcf.gz") , emit: vcf.gz , optional: true + tuple val(meta), path("*.vcf.gz") , emit: vcf_gz , optional: true tuple val(meta), path("*_variants.csv") , emit: variants_csv , optional: true tuple val(meta), path("*_loh.csv") , emit: loh_csv , optional: true tuple val(meta), path("*_chromosomes.pdf") , emit: chr_pdf , optional: true diff --git a/modules/nf-core/purecn/run/meta.yml b/modules/nf-core/purecn/run/meta.yml index 65460518454..e51823a45cf 100644 --- a/modules/nf-core/purecn/run/meta.yml +++ b/modules/nf-core/purecn/run/meta.yml @@ -53,47 +53,47 @@ output: - seg: type: file description: | - Segmentation file generated from DNAcopy.R + Tab-delimited file containing segmentation results pattern: "*_dnacopy.seg" - genes_csv: type: file description: | - CSV file containing gene copy number calls + CSV file containing gene copy number calls. Optional pattern: "*_genes.csv" - amplification_pvalues_csv: type: file description: | - CSV file containing amplification p-values + CSV file containing amplification p-values. Optional pattern: "*_amplification_pvalues.csv" - vcf_gz: type: file description: | - GZipped VCF file containing SNV calls + GZipped VCF file containing SNV calls. Optional pattern: "*.vcf.gz" - variants_csv: type: file description: | - CSV file containing SNV calls + CSV file containing SNV calls. Optional pattern: "*_variants.csv" - loh_csv: type: file description: | - CSV file containing LOH calls + CSV file containing LOH calls. Optional pattern: "*_loh.csv" - chr_pdf: type: file description: | - PDF file containing chromosome plots + PDF file containing chromosome plots. Optional pattern: "*_chromosomes.pdf" - segmentation_pdf: type: file description: | - PDF file containing segmentation plots + PDF file containing segmentation plots. Optional pattern: "*_segmentation.pdf" - multisample.seg: type: file description: | - Segmentation file generated from DNAcopy.R + Tab-delimited file containing segmentation data from multiple samples. Optional pattern: "*_multisample.seg" - versions: type: file