diff --git a/modules/nf-core/ichorcna/createpon/environment.yml b/modules/nf-core/ichorcna/createpon/environment.yml index ea511a17441..a26548740d2 100644 --- a/modules/nf-core/ichorcna/createpon/environment.yml +++ b/modules/nf-core/ichorcna/createpon/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::r-ichorcna=0.3.2 + - bioconda::r-ichorcna=0.5.1 diff --git a/modules/nf-core/ichorcna/createpon/main.nf b/modules/nf-core/ichorcna/createpon/main.nf index dff50051629..ab19a0332c2 100644 --- a/modules/nf-core/ichorcna/createpon/main.nf +++ b/modules/nf-core/ichorcna/createpon/main.nf @@ -1,47 +1,85 @@ process ICHORCNA_CREATEPON { label 'process_low' - // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/r-ichorcna:0.3.2--r41hdfd78af_0' : - 'biocontainers/r-ichorcna:0.3.2--r41hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/r-ichorcna:0.5.1--r43hdfd78af_0' : + 'biocontainers/r-ichorcna:0.5.1--r43hdfd78af_0' }" input: path wigs path gc_wig path map_wig path centromere + path rep_time_wig + path exons output: - path "*.rds" , emit: rds - path "*.txt" , emit: txt - path "versions.yml" , emit: versions + path "${prefix}*.rds", emit: rds + path "${prefix}*.txt", emit: txt + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' - def centro = centromere ? "--centromere ${centromere}" : '' - def prefix = task.ext.prefix ?: "PoN" - def VERSION = '0.3.2' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "PoN" + def map = map_wig ? "mapWig='${map_wig}'," : 'mapWig=NULL,' + def centro = centromere ? "centromere='${centromere}'," : '' + def rep = rep_time_wig ? "repTimeWig='${rep_time_wig}'," : 'repTimeWig=NULL,' + def exons = exons ? "exons.bed='${exons}'," : '' + + """ + #!/usr/bin/env Rscript + library("ichorCNA") + library("yaml") + + write.table(strsplit("${wigs}"," ")[[1]],"filelist.txt", row.names = FALSE, col.names = FALSE) + + createPanelOfNormals( + gcWig='${gc_wig}', + ${map} + ${rep} + filelist = "filelist.txt", + outfile = "${prefix}", + ${exons} + ${centro} + $args + ) + + ### Make Versions YAML for NF-Core ### + versions = list() + versions["r"] <- paste(R.Version()\$major, R.Version()\$minor, sep=".") + versions["ichorCNA"] <- paste(packageVersion("ichorCNA"), sep=".") + + yaml_str <- as.yaml( + list( + "${task.process}" = versions + ) + ) + writeLines(yaml_str, file("versions.yml")) """ - echo ${wigs} | tr " " "\\n" > wig_files.txt - - createPanelOfNormals.R \\ - --filelist wig_files.txt \\ - --gcWig ${gc_wig} \\ - --mapWig ${map_wig} \\ - ${centro} \\ - ${args} \\ - --outfile ${prefix} - - rm wig_files.txt - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - ichorcna: $VERSION - END_VERSIONS + + stub: + prefix = task.ext.prefix ?: "PoN" + """ + #!/usr/bin/env Rscript + library("yaml") + + file.create("${prefix}.rds") + file.create("${prefix}.txt") + + ### Make Versions YAML for NF-Core ### + versions = list() + versions["r"] <- paste(R.Version()\$major, R.Version()\$minor, sep=".") + versions["ichorCNA"] <- paste(packageVersion("ichorCNA"), sep=".") + + yaml_str <- as.yaml( + list( + "${task.process}" = versions + ) + ) + writeLines(yaml_str, file("versions.yml")) """ } diff --git a/modules/nf-core/ichorcna/createpon/meta.yml b/modules/nf-core/ichorcna/createpon/meta.yml index 2443e949925..d5fa233e39e 100644 --- a/modules/nf-core/ichorcna/createpon/meta.yml +++ b/modules/nf-core/ichorcna/createpon/meta.yml @@ -32,6 +32,15 @@ input: type: file description: Text file giving centromere locations of each genome, to exclude these windows pattern: "*.{txt}" + - rep_time_wig: + type: file + description: Replication/timing .wig file. + pattern: "*.{wig}" + - exons: + type: file + description: BED file for exon regions to annotate CNA regions. + pattern: "*.{bed}" + output: - versions: type: file diff --git a/modules/nf-core/ichorcna/createpon/tests/main.nf.test b/modules/nf-core/ichorcna/createpon/tests/main.nf.test new file mode 100644 index 00000000000..41ac2da8d2d --- /dev/null +++ b/modules/nf-core/ichorcna/createpon/tests/main.nf.test @@ -0,0 +1,96 @@ +nextflow_process { + + name "Test Process ICHORCNA_CREATEPON" + script "../main.nf" + process "ICHORCNA_CREATEPON" + + tag "modules" + tag "modules_nfcore" + tag "ichorcna" + tag "ichorcna/createpon" + + test("hg19 - one file") { + + when { + process { + """ + input[0] = file("https://raw.githubusercontent.com/gavinhalab/ichorCNA/master/inst/extdata/MBC_315.ctDNA.reads.wig", checkIfExists: true) + input[1] = file("https://raw.githubusercontent.com/gavinhalab/ichorCNA/master/inst/extdata/gc_hg19_1000kb.wig", checkIfExists: true) + input[2] = file("https://raw.githubusercontent.com/gavinhalab/ichorCNA/master/inst/extdata/map_hg19_1000kb.wig", checkIfExists: true) + input[3] = file("https://raw.githubusercontent.com/gavinhalab/ichorCNA/master/inst/extdata/GRCh37.p13_centromere_UCSC-gapTable.txt", checkIfExists: true) + input[4] = [] + input[5] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.rds[0]).name, + file(process.out.txt[0]).name, + process.out.versions + ).match() } + ) + } + + } + + + test("hg19 - two files") { + + when { + process { + """ + input[0] = [ file("https://raw.githubusercontent.com/gavinhalab/ichorCNA/master/inst/extdata/MBC_315.ctDNA.reads.wig", checkIfExists: true), + file("https://raw.githubusercontent.com/gavinhalab/ichorCNA/master/inst/extdata/MBC_315_T2.ctDNA.reads.wig", checkIfExists: true) + ] + input[1] = file("https://raw.githubusercontent.com/gavinhalab/ichorCNA/master/inst/extdata/gc_hg19_1000kb.wig", checkIfExists: true) + input[2] = file("https://raw.githubusercontent.com/gavinhalab/ichorCNA/master/inst/extdata/map_hg19_1000kb.wig", checkIfExists: true) + input[3] = file("https://raw.githubusercontent.com/gavinhalab/ichorCNA/master/inst/extdata/GRCh37.p13_centromere_UCSC-gapTable.txt", checkIfExists: true) + input[4] = [] + input[5] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.rds[0]).name, + file(process.out.txt[0]).name, + process.out.versions + ).match() } + ) + } + } + + test("stub") { + options "-stub" + when { + process { + """ + input[0] = [] + input[1] = [] + input[2] = [] + input[3] = [] + input[4] = [] + input[5] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.rds[0]).name, + file(process.out.txt[0]).name, + process.out.versions + ).match() } + ) + } + } +} diff --git a/modules/nf-core/ichorcna/createpon/tests/main.nf.test.snap b/modules/nf-core/ichorcna/createpon/tests/main.nf.test.snap new file mode 100644 index 00000000000..fe73d2efe9a --- /dev/null +++ b/modules/nf-core/ichorcna/createpon/tests/main.nf.test.snap @@ -0,0 +1,44 @@ +{ + "hg19 - one file": { + "content": [ + "PoN_median.rds", + "PoN_median.txt", + [ + "versions.yml:md5,59dbc83520b9e00a736f49ed2513657a" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-08-06T14:23:09.884294332" + }, + "stub": { + "content": [ + "PoN.rds", + "PoN.txt", + [ + "versions.yml:md5,59dbc83520b9e00a736f49ed2513657a" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-08-06T14:25:38.594727235" + }, + "hg19 - two files": { + "content": [ + "PoN_median.rds", + "PoN_median.txt", + [ + "versions.yml:md5,59dbc83520b9e00a736f49ed2513657a" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-08-06T14:23:29.496424481" + } +} \ No newline at end of file diff --git a/modules/nf-core/ichorcna/createpon/tests/tags.yml b/modules/nf-core/ichorcna/createpon/tests/tags.yml new file mode 100644 index 00000000000..6f489f506ee --- /dev/null +++ b/modules/nf-core/ichorcna/createpon/tests/tags.yml @@ -0,0 +1,2 @@ +ichorcna/createpon: + - "modules/nf-core/ichorcna/createpon/**" diff --git a/modules/nf-core/ichorcna/run/environment.yml b/modules/nf-core/ichorcna/run/environment.yml index 671b6d5514e..ae6a1571fa0 100644 --- a/modules/nf-core/ichorcna/run/environment.yml +++ b/modules/nf-core/ichorcna/run/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::r-ichorcna=0.3.2 + - bioconda::r-ichorcna=0.5.1 diff --git a/modules/nf-core/ichorcna/run/main.nf b/modules/nf-core/ichorcna/run/main.nf index ff1b9566545..6e808bbb88c 100644 --- a/modules/nf-core/ichorcna/run/main.nf +++ b/modules/nf-core/ichorcna/run/main.nf @@ -2,50 +2,107 @@ process ICHORCNA_RUN { tag "$meta.id" label 'process_low' - // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/r-ichorcna:0.3.2--pl5321r42hdfd78af_2' : - 'biocontainers/r-ichorcna:0.3.2--pl5321r42hdfd78af_2' }" + 'https://depot.galaxyproject.org/singularity/r-ichorcna:0.5.1--r43hdfd78af_0' : + 'biocontainers/r-ichorcna:0.5.1--r43hdfd78af_0' }" input: tuple val(meta), path(wig) path gc_wig path map_wig - path panel_of_normals + path normal_wig + path normal_background path centromere + path rep_time_wig + path exons output: - tuple val(meta), path("*.cna.seg") , emit: cna_seg - tuple val(meta), path("*.params.txt") , emit: ichorcna_params - path "*genomeWide.pdf" , emit: genome_plot - path "versions.yml" , emit: versions + tuple val(meta), path("${prefix}.RData") , emit: rdata + tuple val(meta), path("${prefix}.seg") , emit: seg + tuple val(meta), path("${prefix}.cna.seg") , emit: cna_seg + tuple val(meta), path("${prefix}.seg.txt") , emit: seg_txt + tuple val(meta), path("${prefix}.correctedDepth.txt"), emit: corrected_depth + tuple val(meta), path("${prefix}.params.txt") , emit: ichorcna_params + tuple val(meta), path("${prefix}/*.pdf") , emit: plots + tuple val(meta), path("**/${prefix}_genomeWide.pdf") , emit: genome_plot + 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 pon = panel_of_normals ? "--normalPanel ${panel_of_normals}" : '' - def centro = centromere ? "--centromere ${centromere}" : '' - def VERSION = '0.3.2' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + def norm = normal_wig ? "normal_wig='${normal_wig}'," : 'normal_wig=NULL,' + def pon = normal_background ? "normal_panel='${normal_background}'," : 'normal_panel=NULL,' + def map = map_wig ? "mapWig='${map_wig}'," : 'mapWig=NULL,' + def centro = centromere ? "centromere='${centromere}'," : '' + def rep = rep_time_wig ? "repTimeWig='${rep_time_wig}'," : 'repTimeWig=NULL,' + def exons = exons ? "exons.bed='${exons}'," : '' """ - runIchorCNA.R \\ - $args \\ - --WIG ${wig} \\ - --id ${prefix} \\ - --gcWig ${gc_wig} \\ - --mapWig ${map_wig} \\ - ${pon} \\ - ${centro} \\ - --outDir . - - cp */*genomeWide.pdf . - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - ichorcna: $VERSION - END_VERSIONS + #!/usr/bin/env Rscript + library("ichorCNA") + library("yaml") + + run_ichorCNA( + tumor_wig='${wig}', + id='${prefix}', + cores=${task.cpus}, + gcWig='${gc_wig}', + $norm + $pon + $map + $centro + $rep + $exons + $args + outDir="." + ) + + + ### Make Versions YAML for NF-Core ### + versions = list() + versions["r"] <- paste(R.Version()\$major, R.Version()\$minor, sep=".") + versions["ichorCNA"] <- paste(packageVersion("ichorCNA"), sep=".") + + yaml_str <- as.yaml( + list( + "${task.process}" = versions + ) + ) + writeLines(yaml_str, file("versions.yml")) + """ + + stub: + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + + """ + #!/usr/bin/env Rscript + library("ichorCNA") + library("yaml") + + file.create('${prefix}.RData') + file.create('${prefix}.seg') + file.create('${prefix}.cna.seg') + file.create('${prefix}.seg.txt') + file.create('${prefix}.correctedDepth.txt') + file.create('${prefix}.params.txt') + dir.create('${prefix}') + file.create('${prefix}/${prefix}_genomeWide.pdf') + + ### Make Versions YAML for NF-Core ### + versions = list() + versions["r"] <- paste(R.Version()\$major, R.Version()\$minor, sep=".") + versions["ichorCNA"] <- paste(packageVersion("ichorCNA"), sep=".") + + yaml_str <- as.yaml( + list( + "${task.process}" = versions + ) + ) + writeLines(yaml_str, file("versions.yml")) """ + } diff --git a/modules/nf-core/ichorcna/run/meta.yml b/modules/nf-core/ichorcna/run/meta.yml index 126049cec35..ef4a31c889b 100644 --- a/modules/nf-core/ichorcna/run/meta.yml +++ b/modules/nf-core/ichorcna/run/meta.yml @@ -20,49 +20,103 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test'] + - wig: type: file description: hmmcopy/readCounter processed .wig file giving the number of reads in the sample, in each genomic window pattern: "*.{wig}" + - gc_wig: type: file description: hmmcopy/gcCounter processed .wig file giving the gc content in the reference fasta, in each genomic window pattern: "*.{wig}" + - map_wig: type: file description: hmmcopy/mapCounter processed .wig file giving the mapability in the reference fasta, in each genomic window pattern: "*.{wig}" - - panel_of_normals: + + - normal_wig: + type: file + description: hmmcopy/readCounter processed .wig file giving the number of reads in the normal sample, in each genomic window + pattern: "*.{wig}" + + - normal_background: type: file description: Panel of normals data, generated by calling ichorCNA on a set of normal samples with the same window size etc. pattern: "*.{rds}" + - centromere: type: file description: Text file giving centromere locations of each genome, to exclude these windows pattern: "*.{txt}" + + - rep_time_wig: + type: file + description: Replication/timing .wig file. + pattern: "*.{wig}" + + - exons: + type: file + description: BED file for exon regions to annotate CNA regions. + pattern: "*.{bed}" + output: - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test'] - - versions: + + - seg: type: file - description: File containing software versions - pattern: "versions.yml" + description: Predicted copy number variation per segment + pattern: "*.{seg}" + + - seg_txt: + type: file + description: Predicted copy number variation per segment + pattern: "*.{seg.txt}" + - cna_seg: type: file description: Predicted copy number variation per segment pattern: "*.{cng.seg}" + - ichorcna_params: type: file description: A text file showing the values that ichorCNA has estimated for tumour fraction, ploidy etc pattern: "*.{params.txt}" + + - corrected_depth: + type: file + description: A text file with corrected depth per bin + pattern: "*.{params.txt}" + - genome_plot: type: file description: A plot with the best-fit genome-wide CNV data pattern: "*.{genomeWide.pdf}" + + - plots: + type: file + description: Plots with e.g. individual chromosomes and different considered ploidy + pattern: "*.{pdf}" + + - rdata: + type: file + description: RData file containing all the intermediate R objects + pattern: "*.{cng.seg}" + + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + authors: - "@sppearce" + - "@adamrtalbot" + maintainers: - "@sppearce" + - "@adamrtalbot" diff --git a/modules/nf-core/ichorcna/run/tests/main.nf.test b/modules/nf-core/ichorcna/run/tests/main.nf.test new file mode 100644 index 00000000000..0c67ef1b0fb --- /dev/null +++ b/modules/nf-core/ichorcna/run/tests/main.nf.test @@ -0,0 +1,78 @@ +nextflow_process { + + name "Test Process ICHORCNA_RUN" + script "../main.nf" + process "ICHORCNA_RUN" + + tag "modules" + tag "modules_nfcore" + tag "ichorcna" + tag "ichorcna/run" + + test("no_panel") { + config "./nextflow.config" + when { + process { + """ + input[0] = [ [ id:'test'], // meta map + file("https://raw.githubusercontent.com/gavinhalab/ichorCNA/master/inst/extdata/MBC_315.ctDNA.reads.wig", checkIfExists: true) + ] + input[1] = file("https://raw.githubusercontent.com/gavinhalab/ichorCNA/master/inst/extdata/gc_hg19_1000kb.wig", checkIfExists: true) + input[2] = file("https://raw.githubusercontent.com/gavinhalab/ichorCNA/master/inst/extdata/map_hg19_1000kb.wig", checkIfExists: true) + input[3] = [] + input[4] = [] + input[5] = file("https://raw.githubusercontent.com/gavinhalab/ichorCNA/master/inst/extdata/GRCh37.p13_centromere_UCSC-gapTable.txt", checkIfExists: true) + input[6] = [] + input[7] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.versions, + file(process.out.genome_plot.get(0).get(1)).name, + file(process.out.rdata.get(0).get(1)).name, + process.out.plots.get(0).get(1).size(), + path(process.out.cna_seg.get(0).get(1)).readLines()[0], + path(process.out.seg.get(0).get(1)).readLines()[0], + path(process.out.seg_txt.get(0).get(1)).readLines()[0], + path(process.out.corrected_depth.get(0).get(1)).readLines()[0], + path(process.out.ichorcna_params.get(0).get(1)).readLines()[0] + ).match() } + ) + } + + } + + test("no_panel - stub") { + options "-stub" + when { + process { + """ + input[0] = [ [ id:'test'], // meta map + file("https://raw.githubusercontent.com/gavinhalab/ichorCNA/master/inst/extdata/MBC_315.ctDNA.reads.wig", checkIfExists: true) + ] + input[1] = file("https://raw.githubusercontent.com/gavinhalab/ichorCNA/master/inst/extdata/gc_hg19_1000kb.wig", checkIfExists: true) + input[2] = file("https://raw.githubusercontent.com/gavinhalab/ichorCNA/master/inst/extdata/map_hg19_1000kb.wig", checkIfExists: true) + input[3] = [] + input[4] = [] + input[5] = file("https://raw.githubusercontent.com/gavinhalab/ichorCNA/master/inst/extdata/GRCh37.p13_centromere_UCSC-gapTable.txt", checkIfExists: true) + input[6] = [] + input[7] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/ichorcna/run/tests/main.nf.test.snap b/modules/nf-core/ichorcna/run/tests/main.nf.test.snap new file mode 100644 index 00000000000..7a70f7bd51d --- /dev/null +++ b/modules/nf-core/ichorcna/run/tests/main.nf.test.snap @@ -0,0 +1,167 @@ +{ + "no_panel - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.RData:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "test.seg:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test" + }, + "test.cna.seg:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test" + }, + "test.seg.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + [ + { + "id": "test" + }, + "test.correctedDepth.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "5": [ + [ + { + "id": "test" + }, + "test.params.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "6": [ + [ + { + "id": "test" + }, + "test_genomeWide.pdf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "7": [ + [ + { + "id": "test" + }, + "test_genomeWide.pdf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "8": [ + "versions.yml:md5,d2d30cedd49c7bffdcb74313e8a074c4" + ], + "cna_seg": [ + [ + { + "id": "test" + }, + "test.cna.seg:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "corrected_depth": [ + [ + { + "id": "test" + }, + "test.correctedDepth.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "genome_plot": [ + [ + { + "id": "test" + }, + "test_genomeWide.pdf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "ichorcna_params": [ + [ + { + "id": "test" + }, + "test.params.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "plots": [ + [ + { + "id": "test" + }, + "test_genomeWide.pdf:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "rdata": [ + [ + { + "id": "test" + }, + "test.RData:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "seg": [ + [ + { + "id": "test" + }, + "test.seg:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "seg_txt": [ + [ + { + "id": "test" + }, + "test.seg.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,d2d30cedd49c7bffdcb74313e8a074c4" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-08-02T06:38:13.140234725" + }, + "no_panel": { + "content": [ + [ + "versions.yml:md5,d2d30cedd49c7bffdcb74313e8a074c4" + ], + "test_genomeWide.pdf", + "test.RData", + 52, + "chr\tstart\tend\ttest.copy.number\ttest.event\ttest.logR\ttest.subclone.status\ttest.Corrected_Copy_Number\ttest.Corrected_Call\ttest.logR_Copy_Number", + "sample\tchr\tstart\tend\tevent\tcopy.number\tbins\tmedian", + "ID\tchrom\tstart\tend\tnum.mark\tseg.median.logR\tcopy.number\tcall\tsubclone.status\tlogR_Copy_Number\tCorrected_Copy_Number\tCorrected_Call", + "chr\tstart\tend\tlog2_TNratio_corrected", + "Sample\tTumor Fraction\tPloidy" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-08-03T06:43:21.625713563" + } +} \ No newline at end of file diff --git a/modules/nf-core/ichorcna/run/tests/nextflow.config b/modules/nf-core/ichorcna/run/tests/nextflow.config new file mode 100644 index 00000000000..1bd94c5b0e6 --- /dev/null +++ b/modules/nf-core/ichorcna/run/tests/nextflow.config @@ -0,0 +1,8 @@ +process { + // We need this parameter otherwise it bugs out + withName: 'ICHORCNA_RUN' { + ext.args = """ + scStates='c(1,3)', + """ + } +} \ No newline at end of file diff --git a/modules/nf-core/ichorcna/run/tests/tags.yml b/modules/nf-core/ichorcna/run/tests/tags.yml new file mode 100644 index 00000000000..63490fa3694 --- /dev/null +++ b/modules/nf-core/ichorcna/run/tests/tags.yml @@ -0,0 +1,2 @@ +ichorcna/run: + - "modules/nf-core/ichorcna/run/**" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 00fa457f0ef..97ffce19db4 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -719,12 +719,6 @@ hpsuissero: hypo: - modules/nf-core/hypo/** - tests/modules/nf-core/hypo/** -ichorcna/createpon: - - modules/nf-core/ichorcna/createpon/** - - tests/modules/nf-core/ichorcna/createpon/** -ichorcna/run: - - modules/nf-core/ichorcna/run/** - - tests/modules/nf-core/ichorcna/run/** icountmini/metagene: - modules/nf-core/icountmini/metagene/** - tests/modules/nf-core/icountmini/metagene/** diff --git a/tests/modules/nf-core/ichorcna/createpon/main.nf b/tests/modules/nf-core/ichorcna/createpon/main.nf deleted file mode 100644 index 9d9a291abb3..00000000000 --- a/tests/modules/nf-core/ichorcna/createpon/main.nf +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { ICHORCNA_CREATEPON } from '../../../../../modules/nf-core/ichorcna/createpon/main.nf' - -workflow test_ichorcna_createpon { - - input = file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/MBC_315.ctDNA.reads.wig", checkIfExists: true) - - gcwig = file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/gc_hg19_1000kb.wig", checkIfExists: true) - mapwig = file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/map_hg19_1000kb.wig", checkIfExists: true) - - centromere = file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/GRCh37.p13_centromere_UCSC-gapTable.txt", checkIfExists: true) - - ICHORCNA_CREATEPON ( input, gcwig, mapwig, centromere ) -} - -workflow test_ichorcna_createpon2 { - - input = [file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/MBC_315.ctDNA.reads.wig", checkIfExists: true), - file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/MBC_315_T2.ctDNA.reads.wig", checkIfExists: true)] - - gcwig = file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/gc_hg19_1000kb.wig", checkIfExists: true) - mapwig = file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/map_hg19_1000kb.wig", checkIfExists: true) - - centromere = file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/GRCh37.p13_centromere_UCSC-gapTable.txt", checkIfExists: true) - - ICHORCNA_CREATEPON ( input, gcwig, mapwig, centromere ) -} diff --git a/tests/modules/nf-core/ichorcna/createpon/nextflow.config b/tests/modules/nf-core/ichorcna/createpon/nextflow.config deleted file mode 100644 index 50f50a7a357..00000000000 --- a/tests/modules/nf-core/ichorcna/createpon/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} \ No newline at end of file diff --git a/tests/modules/nf-core/ichorcna/createpon/test.yml b/tests/modules/nf-core/ichorcna/createpon/test.yml deleted file mode 100644 index a4352ad5c09..00000000000 --- a/tests/modules/nf-core/ichorcna/createpon/test.yml +++ /dev/null @@ -1,21 +0,0 @@ -- name: ichorcna createpon test_ichorcna_createpon - command: nextflow run ./tests/modules/nf-core/ichorcna/createpon -entry test_ichorcna_createpon -c ./tests/config/nextflow.config - tags: - - ichorcna/createpon - - ichorcna - files: - - path: output/ichorcna/PoN_median.txt - contains: ["seqnames"] - - path: output/ichorcna/versions.yml - md5sum: 59a2121301113cc013bfae65935e07f1 - -- name: ichorcna createpon test_ichorcna_createpon2 - command: nextflow run ./tests/modules/nf-core/ichorcna/createpon -entry test_ichorcna_createpon2 -c ./tests/config/nextflow.config - tags: - - ichorcna/createpon - - ichorcna - files: - - path: output/ichorcna/PoN_median.txt - contains: ["seqnames"] - - path: output/ichorcna/versions.yml - md5sum: 31a5fcc0075dbe747f7736efbdb99644 diff --git a/tests/modules/nf-core/ichorcna/run/main.nf b/tests/modules/nf-core/ichorcna/run/main.nf deleted file mode 100644 index ed57cccc46c..00000000000 --- a/tests/modules/nf-core/ichorcna/run/main.nf +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { ICHORCNA_RUN } from '../../../../../modules/nf-core/ichorcna/run/main.nf' -include { HMMCOPY_READCOUNTER } from '../../../../../modules/nf-core/hmmcopy/readcounter/main.nf' -include { HMMCOPY_GCCOUNTER } from '../../../../../modules/nf-core/hmmcopy/gccounter/main.nf' -include { HMMCOPY_MAPCOUNTER } from '../../../../../modules/nf-core/hmmcopy/mapcounter/main.nf' -include { HMMCOPY_GENERATEMAP } from '../../../../../modules/nf-core/hmmcopy/generatemap/main.nf' - -workflow test_ichorcna_run_no_panel { - - input = [ [ id:'test'], // meta map - file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/MBC_315.ctDNA.reads.wig", checkIfExists: true) - ] - - gcwig = file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/gc_hg19_1000kb.wig", checkIfExists: true) - mapwig = file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/map_hg19_1000kb.wig", checkIfExists: true) - - panel_of_normals = [] - centromere = [] - - ICHORCNA_RUN ( input, gcwig, mapwig, panel_of_normals, centromere) -} - -workflow test_ichorcna_run_inc_panel { - - input = [ [ id:'test'], // meta map - file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/MBC_315.ctDNA.reads.wig", checkIfExists: true) - ] - - gcwig = file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/gc_hg19_1000kb.wig", checkIfExists: true) - mapwig = file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/map_hg19_1000kb.wig", checkIfExists: true) - - panel_of_normals = file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/HD_ULP_PoN_1Mb_median_normAutosome_mapScoreFiltered_median.rds", checkIfExists: true) - - centromere = file("https://raw.githubusercontent.com/broadinstitute/ichorCNA/master/inst/extdata/GRCh37.p13_centromere_UCSC-gapTable.txt", checkIfExists: true) - - ICHORCNA_RUN ( input, gcwig, mapwig, panel_of_normals, centromere) -} diff --git a/tests/modules/nf-core/ichorcna/run/nextflow.config b/tests/modules/nf-core/ichorcna/run/nextflow.config deleted file mode 100644 index 50f50a7a357..00000000000 --- a/tests/modules/nf-core/ichorcna/run/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} \ No newline at end of file diff --git a/tests/modules/nf-core/ichorcna/run/test.yml b/tests/modules/nf-core/ichorcna/run/test.yml deleted file mode 100644 index 963cae64906..00000000000 --- a/tests/modules/nf-core/ichorcna/run/test.yml +++ /dev/null @@ -1,25 +0,0 @@ -- name: ichorcna run test_ichorcna_run_no_panel - command: nextflow run ./tests/modules/nf-core/ichorcna/run -entry test_ichorcna_run_no_panel -c ./tests/config/nextflow.config - tags: - - ichorcna - - ichorcna/run - files: - - path: output/ichorcna/test.cna.seg - contains: ["Corrected_Copy_Number"] - - path: output/ichorcna/test.params.txt - md5sum: e39a579cdcc9576679f06dc5c22605a7 - - path: output/ichorcna/versions.yml - md5sum: effb37e19bec3609417aaccad4b6a294 - -- name: ichorcna run test_ichorcna_run_inc_panel - command: nextflow run ./tests/modules/nf-core/ichorcna/run -entry test_ichorcna_run_inc_panel -c ./tests/config/nextflow.config - tags: - - ichorcna - - ichorcna/run - files: - - path: output/ichorcna/test.cna.seg - contains: ["Corrected_Copy_Number"] - - path: output/ichorcna/test.params.txt - md5sum: 0b97e0269cd0b571f5a85890f6ddb181 - - path: output/ichorcna/versions.yml - md5sum: fc9d96de0a1c15cea59208305b14e535