diff --git a/modules.json b/modules.json index e0a92fa6..0f435238 100644 --- a/modules.json +++ b/modules.json @@ -449,9 +449,8 @@ }, "tiddit/cov": { "branch": "master", - "git_sha": "1c90a501d102b800c27697f5ef39a6e217ab1915", - "installed_by": ["modules"], - "patch": "modules/nf-core/tiddit/cov/tiddit-cov.diff" + "git_sha": "ae07bd3d3e229ca82bd94531648736d44367a391", + "installed_by": ["modules"] }, "tiddit/sv": { "branch": "master", @@ -475,9 +474,8 @@ }, "vcf2cytosure": { "branch": "master", - "git_sha": "2dba354d7c0a43a1e6d6ce26f408b4936d4ed619", - "installed_by": ["modules"], - "patch": "modules/nf-core/vcf2cytosure/vcf2cytosure.diff" + "git_sha": "8694793954175ddd3001ddfbc0e36782a674d8a7", + "installed_by": ["modules"] }, "vcfanno": { "branch": "master", diff --git a/modules/nf-core/tiddit/cov/environment.yml b/modules/nf-core/tiddit/cov/environment.yml new file mode 100644 index 00000000..6b024492 --- /dev/null +++ b/modules/nf-core/tiddit/cov/environment.yml @@ -0,0 +1,7 @@ +name: tiddit_cov +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::tiddit=3.6.1 diff --git a/modules/nf-core/tiddit/cov/main.nf b/modules/nf-core/tiddit/cov/main.nf index e8cafaa5..20d4720e 100644 --- a/modules/nf-core/tiddit/cov/main.nf +++ b/modules/nf-core/tiddit/cov/main.nf @@ -2,7 +2,7 @@ process TIDDIT_COV { tag "$meta.id" label 'process_low' - conda "bioconda::tiddit=3.6.1" + conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/tiddit:3.6.1--py38h24c8ff8_0' : 'biocontainers/tiddit:3.6.1--py38h24c8ff8_0' }" diff --git a/modules/nf-core/tiddit/cov/meta.yml b/modules/nf-core/tiddit/cov/meta.yml index 9cc586a9..c28546cc 100644 --- a/modules/nf-core/tiddit/cov/meta.yml +++ b/modules/nf-core/tiddit/cov/meta.yml @@ -12,7 +12,6 @@ tools: documentation: https://github.com/SciLifeLab/TIDDIT/blob/master/README.md doi: "10.12688/f1000research.11168.1" licence: ["GPL v3"] - input: - meta: type: map @@ -34,7 +33,6 @@ input: Reference genome file. Only needed when passing in CRAM instead of BAM. If not using CRAM, please pass an empty file instead. pattern: "*.fasta" - output: - meta: type: map @@ -43,7 +41,7 @@ output: e.g. [ id:'test', single_end:false ] - cov: type: file - description: The coverage of different regions. Optional. + description: The coverage of different regions in bed format. Optional. pattern: "*.bed" - wig: type: file @@ -56,3 +54,6 @@ output: authors: - "@projectoriented" - "@ramprasadn" +maintainers: + - "@projectoriented" + - "@ramprasadn" diff --git a/modules/nf-core/tiddit/cov/tests/main.nf.test b/modules/nf-core/tiddit/cov/tests/main.nf.test new file mode 100644 index 00000000..72746648 --- /dev/null +++ b/modules/nf-core/tiddit/cov/tests/main.nf.test @@ -0,0 +1,160 @@ +nextflow_process { + + name "Test Process TIDDIT_COV" + script "../main.nf" + process "TIDDIT_COV" + + tag "modules" + tag "modules_nfcore" + tag "tiddit" + tag "tiddit/cov" + + test("homo_sapiens - cram - bed") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true) + ] + + input[1] = [ + [:], // meta map + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.cov).match("cov") }, + { assert process.out.cov[0][1] ==~ ".*/test.bed" }, + { assert snapshot(process.out.versions).match("versions") } + ) + } + + } + + test("homo_sapiens - bam - bed") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] + input[1] = [ [:], [] ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.cov).match("cov") }, + { assert process.out.cov[0][1] ==~ ".*/test.bed" }, + { assert snapshot(process.out.versions).match("versions") } + ) + } + + } + + test("homo_sapiens - cram - wig") { + + config "./nextflow.config" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true) + ] + + input[1] = [ + [:], // meta map + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.wig).match("wig") }, + { assert process.out.wig[0][1] ==~ ".*/test.wig" }, + { assert snapshot(process.out.versions).match("versions") } + ) + } + + } + + test("homo_sapiens - bam - wig") { + + config "./nextflow.config" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] + + input[1] = [ [:], [] ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.wig).match("wig") }, + { assert process.out.wig[0][1] ==~ ".*/test.wig" }, + { assert snapshot(process.out.versions).match("versions") } + ) + } + + } + + + test("homo_sapiens - stub") { + + options "-stub" + + when { + process { + """ + + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true) + ] + + input[1] = [ + [:], // meta map + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.cov).match("cov - stub") }, + { assert process.out.cov[0][1] ==~ ".*/test.bed" }, + { assert snapshot(process.out.wig).match("wig - stub") }, + { assert process.out.wig[0][1] ==~ ".*/test.wig" }, + { assert snapshot(process.out.versions).match("versions - stub") } + ) + } + + } + +} diff --git a/modules/nf-core/tiddit/cov/tests/main.nf.test.snap b/modules/nf-core/tiddit/cov/tests/main.nf.test.snap new file mode 100644 index 00000000..dcd24edc --- /dev/null +++ b/modules/nf-core/tiddit/cov/tests/main.nf.test.snap @@ -0,0 +1,74 @@ +{ + "wig": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.wig:md5,7c46b6ef30574acdce0ad854f40126ae" + ] + ] + ], + "timestamp": "2023-12-22T11:24:06.649602" + }, + "wig - stub": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.wig:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "timestamp": "2023-12-22T11:30:00.831686" + }, + "versions": { + "content": [ + [ + "versions.yml:md5,49dfdb5a33d1c11db488fb02d1c95c5a" + ] + ], + "timestamp": "2023-12-22T11:23:58.227251" + }, + "cov": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.bed:md5,caf0742f2d4a6f713ceb85268dd48c14" + ] + ] + ], + "timestamp": "2023-12-22T11:23:58.220115" + }, + "versions - stub": { + "content": [ + [ + "versions.yml:md5,49dfdb5a33d1c11db488fb02d1c95c5a" + ] + ], + "timestamp": "2023-12-22T11:30:00.834854" + }, + "cov - stub": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.bed:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "timestamp": "2023-12-22T11:30:00.826974" + } +} \ No newline at end of file diff --git a/modules/nf-core/tiddit/cov/tests/nextflow.config b/modules/nf-core/tiddit/cov/tests/nextflow.config new file mode 100644 index 00000000..f83bd699 --- /dev/null +++ b/modules/nf-core/tiddit/cov/tests/nextflow.config @@ -0,0 +1,8 @@ +process { + + + withName: TIDDIT_COV { + ext.args = '-w' + } + +} diff --git a/modules/nf-core/tiddit/cov/tests/tags.yml b/modules/nf-core/tiddit/cov/tests/tags.yml new file mode 100644 index 00000000..d5831f1d --- /dev/null +++ b/modules/nf-core/tiddit/cov/tests/tags.yml @@ -0,0 +1,2 @@ +tiddit/cov: + - "modules/nf-core/tiddit/cov/**" diff --git a/modules/nf-core/tiddit/cov/tiddit-cov.diff b/modules/nf-core/tiddit/cov/tiddit-cov.diff deleted file mode 100644 index acf8216f..00000000 --- a/modules/nf-core/tiddit/cov/tiddit-cov.diff +++ /dev/null @@ -1,26 +0,0 @@ -Changes in module 'nf-core/tiddit/cov' ---- modules/nf-core/tiddit/cov/meta.yml -+++ modules/nf-core/tiddit/cov/meta.yml -@@ -44,7 +44,7 @@ - - cov: - type: file - description: The coverage of different regions. Optional. -- pattern: "*.tab" -+ pattern: "*.bed" - - wig: - type: file - description: The coverage of different regions in WIG format. Optional. - ---- modules/nf-core/tiddit/cov/main.nf -+++ modules/nf-core/tiddit/cov/main.nf -@@ -41,7 +41,7 @@ - def prefix = task.ext.prefix ?: "${meta.id}" - """ - touch ${prefix}.wig -- touch ${prefix}.tab -+ touch ${prefix}.bed - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - -************************************************************ diff --git a/modules/nf-core/vcf2cytosure/environment.yml b/modules/nf-core/vcf2cytosure/environment.yml index 30e0542f..d4bf9959 100644 --- a/modules/nf-core/vcf2cytosure/environment.yml +++ b/modules/nf-core/vcf2cytosure/environment.yml @@ -1,3 +1,4 @@ +name: vcf2cytosure channels: - conda-forge - bioconda diff --git a/modules/nf-core/vcf2cytosure/meta.yml b/modules/nf-core/vcf2cytosure/meta.yml index 39badd4c..2430f1ae 100644 --- a/modules/nf-core/vcf2cytosure/meta.yml +++ b/modules/nf-core/vcf2cytosure/meta.yml @@ -13,7 +13,7 @@ tools: homepage: "https://github.com/NBISweden/vcf2cytosure" documentation: "https://github.com/NBISweden/vcf2cytosure" tool_dev_url: "https://github.com/NBISweden/vcf2cytosure" - licence: "['MIT']" + licence: ["MIT"] input: - meta: @@ -53,7 +53,7 @@ input: VCF file with SNVs to calculate probe coverage, not compatible with coverage_bed pattern: "*.{vcf,vcf.gz}" - - blacklilst_bed: + - blacklist_bed: type: file description: Bed file with regions to exclude pattern: "*.bed" diff --git a/modules/nf-core/vcf2cytosure/tests/main.nf.test b/modules/nf-core/vcf2cytosure/tests/main.nf.test new file mode 100644 index 00000000..d017cb0e --- /dev/null +++ b/modules/nf-core/vcf2cytosure/tests/main.nf.test @@ -0,0 +1,73 @@ +nextflow_process { + + name "Test Process VCF2CYTOSURE" + script "../main.nf" + process "VCF2CYTOSURE" + + tag "modules" + tag "modules_nfcore" + tag "vcf2cytosure" + + test("homo sapiens - vcf - bed") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ file(params.test_data['homo_sapiens']['illumina']['na24385_chr22_sv_vcf'], checkIfExists: true) ] + ] + input[1] = [ + [ id:'test' ], // meta map + [ file(params.test_data['homo_sapiens']['illumina']['na24385_chr22_coverage'], checkIfExists: true) ] + ] + input[2] = [ [:], [] ] + input[3] = [ [:], [] ] + input[4] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.cgh).match("cgh") }, + { assert snapshot(process.out.versions).match("versions") } + ) + } + + } + + test("homo sapiens - vcf - bed - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + [ file(params.test_data['homo_sapiens']['illumina']['na24385_chr22_sv_vcf'], checkIfExists: true) ] + ] + input[1] = [ + [ id:'test' ], // meta map + [ file(params.test_data['homo_sapiens']['illumina']['na24385_chr22_coverage'], checkIfExists: true) ] + ] + input[2] = [ [:], [] ] + input[3] = [ [:], [] ] + input[4] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.cgh).match("cgh - stub") }, + { assert snapshot(process.out.versions).match("versions - stub") } + ) + } + + } + +} diff --git a/modules/nf-core/vcf2cytosure/tests/main.nf.test.snap b/modules/nf-core/vcf2cytosure/tests/main.nf.test.snap new file mode 100644 index 00000000..0a0fae29 --- /dev/null +++ b/modules/nf-core/vcf2cytosure/tests/main.nf.test.snap @@ -0,0 +1,44 @@ +{ + "cgh": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.cgh:md5,fc3f1ffac5b797881d992994d5d56550" + ] + ] + ], + "timestamp": "2023-12-21T18:33:25.202806" + }, + "versions": { + "content": [ + [ + "versions.yml:md5,a1850e66d57cee0b98adb056c1dc3ebb" + ] + ], + "timestamp": "2023-12-21T18:33:25.205826" + }, + "cgh - stub": { + "content": [ + [ + [ + { + "id": "test" + }, + "test.cgh:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "timestamp": "2023-12-21T18:38:06.660655" + }, + "versions - stub": { + "content": [ + [ + "versions.yml:md5,a1850e66d57cee0b98adb056c1dc3ebb" + ] + ], + "timestamp": "2023-12-21T18:38:06.663571" + } +} \ No newline at end of file diff --git a/modules/nf-core/vcf2cytosure/tests/tags.yml b/modules/nf-core/vcf2cytosure/tests/tags.yml new file mode 100644 index 00000000..88ff6038 --- /dev/null +++ b/modules/nf-core/vcf2cytosure/tests/tags.yml @@ -0,0 +1,2 @@ +vcf2cytosure: + - "modules/nf-core/vcf2cytosure/**" diff --git a/modules/nf-core/vcf2cytosure/vcf2cytosure.diff b/modules/nf-core/vcf2cytosure/vcf2cytosure.diff deleted file mode 100644 index f80980da..00000000 --- a/modules/nf-core/vcf2cytosure/vcf2cytosure.diff +++ /dev/null @@ -1,23 +0,0 @@ -Changes in module 'nf-core/vcf2cytosure' ---- modules/nf-core/vcf2cytosure/main.nf -+++ modules/nf-core/vcf2cytosure/main.nf -@@ -12,7 +12,7 @@ - tuple val(meta2), path(coverage_bed) - tuple val(meta3), path(cns) - tuple val(meta4), path(snv_vcf) -- path blacklist_bed -+ path(blacklist_bed) - - output: - tuple val(meta), path("*.cgh"), emit: cgh -@@ -56,7 +56,7 @@ - def prefix = task.ext.prefix ?: "${meta.id}" - - """ -- touch ${prefix}.xml -+ touch ${prefix}.cgh - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - -************************************************************