From 0252f5122e109a187aad19cb01f35f1aa1448af2 Mon Sep 17 00:00:00 2001 From: wxicu Date: Wed, 24 Apr 2024 11:16:32 +0200 Subject: [PATCH 1/8] add freemuxlet --- .../popscle/freemuxlet/environment.yml | 9 ++ modules/nf-core/popscle/freemuxlet/main.nf | 58 +++++++++++ modules/nf-core/popscle/freemuxlet/meta.yml | 78 +++++++++++++++ .../popscle/freemuxlet/tests/main.nf.test | 95 +++++++++++++++++++ .../nf-core/popscle/freemuxlet/tests/tags.yml | 2 + 5 files changed, 242 insertions(+) create mode 100644 modules/nf-core/popscle/freemuxlet/environment.yml create mode 100644 modules/nf-core/popscle/freemuxlet/main.nf create mode 100644 modules/nf-core/popscle/freemuxlet/meta.yml create mode 100644 modules/nf-core/popscle/freemuxlet/tests/main.nf.test create mode 100644 modules/nf-core/popscle/freemuxlet/tests/tags.yml diff --git a/modules/nf-core/popscle/freemuxlet/environment.yml b/modules/nf-core/popscle/freemuxlet/environment.yml new file mode 100644 index 00000000000..c6747a0ae1e --- /dev/null +++ b/modules/nf-core/popscle/freemuxlet/environment.yml @@ -0,0 +1,9 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +name: "popscle_freemuxlet" +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - "bioconda::popscle=0.1" diff --git a/modules/nf-core/popscle/freemuxlet/main.nf b/modules/nf-core/popscle/freemuxlet/main.nf new file mode 100644 index 00000000000..5cf3817eb35 --- /dev/null +++ b/modules/nf-core/popscle/freemuxlet/main.nf @@ -0,0 +1,58 @@ +process POPSCLE_FREEMUXLET { + tag "$meta.id" + label 'process_high' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/popscle:0.1beta--h2c78cec_0' : + 'biocontainers/popscle:0.1beta--h2c78cec_0' }" + + input: + tuple val(meta), val(plp_prefix), val(n_sample) + + output: + tuple val(meta), path('*.clust1.samples.gz') , emit: result + tuple val(meta), path('*.clust1.vcf.gz') , emit: vcf + tuple val(meta), path('*.lmix') , emit: lmix + tuple val(meta), path('*.clust0.samples.gz') , emit: singlet_result , optional: true + tuple val(meta), path('*.clust0.vcf.gz') , emit: singlet_vcf , optional: true + tuple val(meta), path('*.ldist.gz') , emit: ldist , optional: true + 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 VERSION = '0.1' // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. + + """ + popscle freemuxlet \\ + --plp $plp_prefix \\ + --out $prefix \\ + --nsample $n_sample \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + popscle freemuxlet: $VERSION + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION = '0.1' // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. + + """ + touch ${prefix}.clust1.samples.gz + touch ${prefix}.clust1.vcf.gz + touch ${prefix}.lmix + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + popscle freemuxlet: $VERSION + END_VERSIONS + """ +} diff --git a/modules/nf-core/popscle/freemuxlet/meta.yml b/modules/nf-core/popscle/freemuxlet/meta.yml new file mode 100644 index 00000000000..16380777b11 --- /dev/null +++ b/modules/nf-core/popscle/freemuxlet/meta.yml @@ -0,0 +1,78 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json +name: "popscle_freemuxlet" +description: Software to deconvolute sample identity and identify multiplets when multiple samples are pooled by barcoded single cell sequencing and external genotyping data for each sample is not available. +keywords: + - popscle + - demultiplexing + - genotype-based deconvoltion + - single cell +tools: + - "popscle": + description: "A suite of population scale analysis tools for single-cell genomics data including implementation of Demuxlet / Freemuxlet methods and auxilary tools" + homepage: "https://github.com/statgen/popscle" + documentation: "https://github.com/statgen/popscle" + tool_dev_url: "https://github.com/statgen/popscle" + doi: "10.1038/nbt.4042" + licence: ["Apache-2.0"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1']` + + - plp_prefix: + type: string + description: Prefix of pileup files (CEL,VAR and PLP) produced by popscle/dsc_pileup. + - n_sample: + type: integer + description: Number of samples multiplexed together. + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:false ]` + + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + + - result: + type: file + description: Output file contains the best guess of the sample identity, with detailed statistics to reach to the best guess. + pattern: "*.clust1.samples.gz" + + - vcf: + type: file + description: Output vcf file for each sample inferred and clustered from freemuxlet. + pattern: "*.clust1.vcf.gz" + + - lmix: + type: file + description: Output file contains basic statistics for each barcode. + pattern: "*.lmix" + + - singlet_result: + type: file + description: Output file contains the best sample identity assuming all droplets are singlets. + pattern: "*.clust0.samples.gz" + + - singlet_vcf: + type: file + description: Output vcf file for each sample inferred and clustered from freemuxlet assuming all droplets are singlets. + pattern: "*.clust0.vcf.gz" + + - ldist: + type: file + description: Output ontains the pairwise Bayes factor for each possible pair of droplets. + pattern: "*.ldist.gz" + +authors: + - "@wxicu" +maintainers: + - "@wxicu" diff --git a/modules/nf-core/popscle/freemuxlet/tests/main.nf.test b/modules/nf-core/popscle/freemuxlet/tests/main.nf.test new file mode 100644 index 00000000000..f52f6285391 --- /dev/null +++ b/modules/nf-core/popscle/freemuxlet/tests/main.nf.test @@ -0,0 +1,95 @@ +nextflow_process { + + name "Test Process POPSCLE_FREEMUXLET" + script "../main.nf" + process "POPSCLE_FREEMUXLET" + + tag "modules" + tag "modules_nfcore" + tag "popscle" + tag "popscle/dscpileup" + tag "popscle/freemuxlet" + + test("demultiplexing") { + setup { + run("POPSCLE_DSCPILEUP") { + script "../../dscpileup/main.nf" + process { + """ + input[0] = [ + [ id:'sample1' ], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/demultiplexing/chr21.bam', checkIfExists: true), + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/demultiplexing/donor_genotype_chr21.vcf', checkIfExists: true), + ] + """ + } + } + } + + when { + process { + """ + input[0] = POPSCLE_DSCPILEUP.out.plp.collect{ meta, plp -> plp }.map{ + plp -> [[ id: 'sample1'], + plp[0].toString() - '.plp.gz', + 2 ]} + """ + } + } + + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.versions).match("versions") }, + { assert path(process.out.result.get(0).get(1)).exists() }, + { assert path(process.out.vcf.get(0).get(1)).exists() }, + { assert path(process.out.lmix.get(0).get(1)).exists() } + ) + } + + } + + test("demultiplexing - stub") { + + options "-stub" + + setup { + run("POPSCLE_DSCPILEUP") { + script "../../dscpileup/main.nf" + process { + """ + input[0] = [ + [ id:'sample1' ], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/demultiplexing/chr21.bam', checkIfExists: true), + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/demultiplexing/donor_genotype_chr21.vcf', checkIfExists: true), + ] + """ + } + } + } + + when { + process { + """ + input[0] = POPSCLE_DSCPILEUP.out.plp.collect{ meta, plp -> plp }.map{ + plp -> [[ id: 'sample1'], + plp[0].toString() - '.plp.gz', + 2 ]} + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.versions).match("versions-stub") }, + { assert path(process.out.result.get(0).get(1)).exists() }, + { assert path(process.out.vcf.get(0).get(1)).exists() }, + { assert path(process.out.lmix.get(0).get(1)).exists() } + ) + } + + } + +} diff --git a/modules/nf-core/popscle/freemuxlet/tests/tags.yml b/modules/nf-core/popscle/freemuxlet/tests/tags.yml new file mode 100644 index 00000000000..8eca91f7a48 --- /dev/null +++ b/modules/nf-core/popscle/freemuxlet/tests/tags.yml @@ -0,0 +1,2 @@ +popscle/freemuxlet: + - "modules/nf-core/popscle/freemuxlet/**" From 92c7417b88874580f3db5c178191d1efe11a08eb Mon Sep 17 00:00:00 2001 From: Xichen Wu Date: Wed, 24 Apr 2024 12:23:06 +0200 Subject: [PATCH 2/8] add snapshot --- .../freemuxlet/tests/main.nf.test.snap | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 modules/nf-core/popscle/freemuxlet/tests/main.nf.test.snap diff --git a/modules/nf-core/popscle/freemuxlet/tests/main.nf.test.snap b/modules/nf-core/popscle/freemuxlet/tests/main.nf.test.snap new file mode 100644 index 00000000000..74067f12dc8 --- /dev/null +++ b/modules/nf-core/popscle/freemuxlet/tests/main.nf.test.snap @@ -0,0 +1,26 @@ +{ + "versions": { + "content": [ + [ + "versions.yml:md5,cd783dfa34b208fe9aeab8623fa4ca4e" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-24T12:10:06.190574964" + }, + "versions-stub": { + "content": [ + [ + "versions.yml:md5,cd783dfa34b208fe9aeab8623fa4ca4e" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-24T12:12:32.056298221" + } +} \ No newline at end of file From 67247aa4c7adda59590a759e57d84b7f68df8786 Mon Sep 17 00:00:00 2001 From: wxicu Date: Wed, 24 Apr 2024 22:12:35 +0200 Subject: [PATCH 3/8] pass container test --- modules/nf-core/popscle/freemuxlet/main.nf | 8 ++++---- modules/nf-core/popscle/freemuxlet/meta.yml | 6 +++--- modules/nf-core/popscle/freemuxlet/tests/main.nf.test | 2 +- .../nf-core/popscle/freemuxlet/tests/main.nf.test.snap | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/nf-core/popscle/freemuxlet/main.nf b/modules/nf-core/popscle/freemuxlet/main.nf index 5cf3817eb35..5a37deccbbd 100644 --- a/modules/nf-core/popscle/freemuxlet/main.nf +++ b/modules/nf-core/popscle/freemuxlet/main.nf @@ -8,7 +8,7 @@ process POPSCLE_FREEMUXLET { 'biocontainers/popscle:0.1beta--h2c78cec_0' }" input: - tuple val(meta), val(plp_prefix), val(n_sample) + tuple val(meta), path(plp), val(n_sample) output: tuple val(meta), path('*.clust1.samples.gz') , emit: result @@ -26,10 +26,10 @@ process POPSCLE_FREEMUXLET { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def VERSION = '0.1' // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. - - """ + + """ popscle freemuxlet \\ - --plp $plp_prefix \\ + --plp ${plp}/$prefix \\ --out $prefix \\ --nsample $n_sample \\ $args diff --git a/modules/nf-core/popscle/freemuxlet/meta.yml b/modules/nf-core/popscle/freemuxlet/meta.yml index 16380777b11..831f3633b99 100644 --- a/modules/nf-core/popscle/freemuxlet/meta.yml +++ b/modules/nf-core/popscle/freemuxlet/meta.yml @@ -23,9 +23,9 @@ input: Groovy Map containing sample information e.g. `[ id:'sample1']` - - plp_prefix: - type: string - description: Prefix of pileup files (CEL,VAR and PLP) produced by popscle/dsc_pileup. + - plp: + type: directory + description: Directory contains pileup files (CEL,VAR and PLP) produced by popscle/dsc_pileup. - n_sample: type: integer description: Number of samples multiplexed together. diff --git a/modules/nf-core/popscle/freemuxlet/tests/main.nf.test b/modules/nf-core/popscle/freemuxlet/tests/main.nf.test index f52f6285391..4d9d5536e35 100644 --- a/modules/nf-core/popscle/freemuxlet/tests/main.nf.test +++ b/modules/nf-core/popscle/freemuxlet/tests/main.nf.test @@ -31,7 +31,7 @@ nextflow_process { """ input[0] = POPSCLE_DSCPILEUP.out.plp.collect{ meta, plp -> plp }.map{ plp -> [[ id: 'sample1'], - plp[0].toString() - '.plp.gz', + plp[0].getParent(), 2 ]} """ } diff --git a/modules/nf-core/popscle/freemuxlet/tests/main.nf.test.snap b/modules/nf-core/popscle/freemuxlet/tests/main.nf.test.snap index 74067f12dc8..84bd34bef44 100644 --- a/modules/nf-core/popscle/freemuxlet/tests/main.nf.test.snap +++ b/modules/nf-core/popscle/freemuxlet/tests/main.nf.test.snap @@ -9,7 +9,7 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-04-24T12:10:06.190574964" + "timestamp": "2024-04-24T22:00:38.402346645" }, "versions-stub": { "content": [ @@ -21,6 +21,6 @@ "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-04-24T12:12:32.056298221" + "timestamp": "2024-04-24T22:00:48.216325466" } } \ No newline at end of file From c3421b28ed4afae35a7ad60d365487110cf5b4f5 Mon Sep 17 00:00:00 2001 From: wxicu Date: Wed, 24 Apr 2024 22:15:00 +0200 Subject: [PATCH 4/8] remove trailing whitespace --- modules/nf-core/popscle/freemuxlet/main.nf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/nf-core/popscle/freemuxlet/main.nf b/modules/nf-core/popscle/freemuxlet/main.nf index 5a37deccbbd..fa2baae16fa 100644 --- a/modules/nf-core/popscle/freemuxlet/main.nf +++ b/modules/nf-core/popscle/freemuxlet/main.nf @@ -26,8 +26,7 @@ process POPSCLE_FREEMUXLET { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def VERSION = '0.1' // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. - - """ + """ popscle freemuxlet \\ --plp ${plp}/$prefix \\ --out $prefix \\ From 4ca6194380c555c94e8f4451896690d0708e9391 Mon Sep 17 00:00:00 2001 From: wxicu Date: Thu, 25 Apr 2024 11:29:09 +0200 Subject: [PATCH 5/8] add optional output files creation --- modules/nf-core/popscle/freemuxlet/main.nf | 10 ++- modules/nf-core/popscle/freemuxlet/meta.yml | 6 +- .../popscle/freemuxlet/tests/main.nf.test | 90 +++++++++++++++++++ .../popscle/freemuxlet/tests/nextflow.config | 5 ++ 4 files changed, 106 insertions(+), 5 deletions(-) create mode 100644 modules/nf-core/popscle/freemuxlet/tests/nextflow.config diff --git a/modules/nf-core/popscle/freemuxlet/main.nf b/modules/nf-core/popscle/freemuxlet/main.nf index fa2baae16fa..75ca07b0778 100644 --- a/modules/nf-core/popscle/freemuxlet/main.nf +++ b/modules/nf-core/popscle/freemuxlet/main.nf @@ -35,7 +35,7 @@ process POPSCLE_FREEMUXLET { cat <<-END_VERSIONS > versions.yml "${task.process}": - popscle freemuxlet: $VERSION + popscle: $VERSION END_VERSIONS """ @@ -49,9 +49,15 @@ process POPSCLE_FREEMUXLET { touch ${prefix}.clust1.vcf.gz touch ${prefix}.lmix + if [[ "$args" == *"--aux-files"* ]]; then + touch ${prefix}.clust0.samples.gz + touch ${prefix}.clust0.vcf.gz + touch ${prefix}.ldist.gz + fi + cat <<-END_VERSIONS > versions.yml "${task.process}": - popscle freemuxlet: $VERSION + popscle: $VERSION END_VERSIONS """ } diff --git a/modules/nf-core/popscle/freemuxlet/meta.yml b/modules/nf-core/popscle/freemuxlet/meta.yml index 831f3633b99..e7df92a2393 100644 --- a/modules/nf-core/popscle/freemuxlet/meta.yml +++ b/modules/nf-core/popscle/freemuxlet/meta.yml @@ -59,17 +59,17 @@ output: - singlet_result: type: file - description: Output file contains the best sample identity assuming all droplets are singlets. + description: Optional output file contains the best sample identity assuming all droplets are singlets when writing auxiliary output files is turned on. pattern: "*.clust0.samples.gz" - singlet_vcf: type: file - description: Output vcf file for each sample inferred and clustered from freemuxlet assuming all droplets are singlets. + description: Optional output vcf file for each sample inferred and clustered from freemuxlet assuming all droplets are singlets when writing auxiliary output files is turned on. pattern: "*.clust0.vcf.gz" - ldist: type: file - description: Output ontains the pairwise Bayes factor for each possible pair of droplets. + description: Optional output ontains the pairwise Bayes factor for each possible pair of droplets when writing auxiliary output files is turned on. pattern: "*.ldist.gz" authors: diff --git a/modules/nf-core/popscle/freemuxlet/tests/main.nf.test b/modules/nf-core/popscle/freemuxlet/tests/main.nf.test index 4d9d5536e35..d87f078f25a 100644 --- a/modules/nf-core/popscle/freemuxlet/tests/main.nf.test +++ b/modules/nf-core/popscle/freemuxlet/tests/main.nf.test @@ -50,9 +50,96 @@ nextflow_process { } + test("demultiplexing - auxilary - files") { + config "./nextflow.config" + setup { + run("POPSCLE_DSCPILEUP") { + script "../../dscpileup/main.nf" + process { + """ + input[0] = [ + [ id:'sample1' ], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/demultiplexing/chr21.bam', checkIfExists: true), + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/demultiplexing/donor_genotype_chr21.vcf', checkIfExists: true), + ] + """ + } + } + } + + when { + process { + """ + input[0] = POPSCLE_DSCPILEUP.out.plp.collect{ meta, plp -> plp }.map{ + plp -> [[ id: 'sample1'], + plp[0].getParent(), + 2 ]} + """ + } + } + + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.versions).match("versions") }, + { assert path(process.out.result.get(0).get(1)).exists() }, + { assert path(process.out.vcf.get(0).get(1)).exists() }, + { assert path(process.out.lmix.get(0).get(1)).exists() } + { assert path(process.out.singlet_result.get(0).get(1)).exists() }, + { assert path(process.out.singlet_vcf.get(0).get(1)).exists() }, + { assert path(process.out.ldist.get(0).get(1)).exists() } + ) + } + + } + test("demultiplexing - stub") { options "-stub" + + setup { + run("POPSCLE_DSCPILEUP") { + script "../../dscpileup/main.nf" + process { + """ + input[0] = [ + [ id:'sample1' ], + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/demultiplexing/chr21.bam', checkIfExists: true), + file(params.modules_testdata_base_path + '/genomics/homo_sapiens/demultiplexing/donor_genotype_chr21.vcf', checkIfExists: true), + ] + """ + } + } + } + + when { + process { + """ + input[0] = POPSCLE_DSCPILEUP.out.plp.collect{ meta, plp -> plp }.map{ + plp -> [[ id: 'sample1'], + plp[0].toString() - '.plp.gz', + 2 ]} + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.versions).match("versions-stub") }, + { assert path(process.out.result.get(0).get(1)).exists() }, + { assert path(process.out.vcf.get(0).get(1)).exists() }, + { assert path(process.out.lmix.get(0).get(1)).exists() } + ) + } + + } + + test("demultiplexing - auxilary - files - stub") { + + options "-stub" + config "./nextflow.config" setup { run("POPSCLE_DSCPILEUP") { @@ -87,6 +174,9 @@ nextflow_process { { assert path(process.out.result.get(0).get(1)).exists() }, { assert path(process.out.vcf.get(0).get(1)).exists() }, { assert path(process.out.lmix.get(0).get(1)).exists() } + { assert path(process.out.singlet_result.get(0).get(1)).exists() }, + { assert path(process.out.singlet_vcf.get(0).get(1)).exists() }, + { assert path(process.out.ldist.get(0).get(1)).exists() } ) } diff --git a/modules/nf-core/popscle/freemuxlet/tests/nextflow.config b/modules/nf-core/popscle/freemuxlet/tests/nextflow.config new file mode 100644 index 00000000000..55d2a6d11bf --- /dev/null +++ b/modules/nf-core/popscle/freemuxlet/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: POPSCLE_FREEMUXLET { + ext.args = '--aux-files' + } +} From a7b4f591474520a5e2bf17c83f749c23a42dac61 Mon Sep 17 00:00:00 2001 From: wxicu Date: Thu, 25 Apr 2024 12:06:08 +0200 Subject: [PATCH 6/8] remove ldist --- modules/nf-core/popscle/freemuxlet/main.nf | 2 -- modules/nf-core/popscle/freemuxlet/meta.yml | 5 ----- modules/nf-core/popscle/freemuxlet/tests/main.nf.test | 5 ++--- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/modules/nf-core/popscle/freemuxlet/main.nf b/modules/nf-core/popscle/freemuxlet/main.nf index 75ca07b0778..d94d36a126f 100644 --- a/modules/nf-core/popscle/freemuxlet/main.nf +++ b/modules/nf-core/popscle/freemuxlet/main.nf @@ -16,7 +16,6 @@ process POPSCLE_FREEMUXLET { tuple val(meta), path('*.lmix') , emit: lmix tuple val(meta), path('*.clust0.samples.gz') , emit: singlet_result , optional: true tuple val(meta), path('*.clust0.vcf.gz') , emit: singlet_vcf , optional: true - tuple val(meta), path('*.ldist.gz') , emit: ldist , optional: true path 'versions.yml' , emit: versions when: @@ -52,7 +51,6 @@ process POPSCLE_FREEMUXLET { if [[ "$args" == *"--aux-files"* ]]; then touch ${prefix}.clust0.samples.gz touch ${prefix}.clust0.vcf.gz - touch ${prefix}.ldist.gz fi cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/popscle/freemuxlet/meta.yml b/modules/nf-core/popscle/freemuxlet/meta.yml index e7df92a2393..34eaaa59dc9 100644 --- a/modules/nf-core/popscle/freemuxlet/meta.yml +++ b/modules/nf-core/popscle/freemuxlet/meta.yml @@ -67,11 +67,6 @@ output: description: Optional output vcf file for each sample inferred and clustered from freemuxlet assuming all droplets are singlets when writing auxiliary output files is turned on. pattern: "*.clust0.vcf.gz" - - ldist: - type: file - description: Optional output ontains the pairwise Bayes factor for each possible pair of droplets when writing auxiliary output files is turned on. - pattern: "*.ldist.gz" - authors: - "@wxicu" maintainers: diff --git a/modules/nf-core/popscle/freemuxlet/tests/main.nf.test b/modules/nf-core/popscle/freemuxlet/tests/main.nf.test index d87f078f25a..dc495111ed3 100644 --- a/modules/nf-core/popscle/freemuxlet/tests/main.nf.test +++ b/modules/nf-core/popscle/freemuxlet/tests/main.nf.test @@ -82,7 +82,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.versions).match("versions") }, + { assert snapshot(process.out.versions).match("versions-aux-files") }, { assert path(process.out.result.get(0).get(1)).exists() }, { assert path(process.out.vcf.get(0).get(1)).exists() }, { assert path(process.out.lmix.get(0).get(1)).exists() } @@ -170,13 +170,12 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.versions).match("versions-stub") }, + { assert snapshot(process.out.versions).match("versions-aux-files-stub") }, { assert path(process.out.result.get(0).get(1)).exists() }, { assert path(process.out.vcf.get(0).get(1)).exists() }, { assert path(process.out.lmix.get(0).get(1)).exists() } { assert path(process.out.singlet_result.get(0).get(1)).exists() }, { assert path(process.out.singlet_vcf.get(0).get(1)).exists() }, - { assert path(process.out.ldist.get(0).get(1)).exists() } ) } From 3ccfb00f471533947dcd92ea89eac8630f34f911 Mon Sep 17 00:00:00 2001 From: wxicu Date: Thu, 25 Apr 2024 12:32:59 +0200 Subject: [PATCH 7/8] fix test --- modules/nf-core/popscle/freemuxlet/tests/main.nf.test | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/nf-core/popscle/freemuxlet/tests/main.nf.test b/modules/nf-core/popscle/freemuxlet/tests/main.nf.test index dc495111ed3..e8c2225c6e7 100644 --- a/modules/nf-core/popscle/freemuxlet/tests/main.nf.test +++ b/modules/nf-core/popscle/freemuxlet/tests/main.nf.test @@ -85,10 +85,9 @@ nextflow_process { { assert snapshot(process.out.versions).match("versions-aux-files") }, { assert path(process.out.result.get(0).get(1)).exists() }, { assert path(process.out.vcf.get(0).get(1)).exists() }, - { assert path(process.out.lmix.get(0).get(1)).exists() } + { assert path(process.out.lmix.get(0).get(1)).exists() }, { assert path(process.out.singlet_result.get(0).get(1)).exists() }, - { assert path(process.out.singlet_vcf.get(0).get(1)).exists() }, - { assert path(process.out.ldist.get(0).get(1)).exists() } + { assert path(process.out.singlet_vcf.get(0).get(1)).exists() } ) } @@ -173,9 +172,9 @@ nextflow_process { { assert snapshot(process.out.versions).match("versions-aux-files-stub") }, { assert path(process.out.result.get(0).get(1)).exists() }, { assert path(process.out.vcf.get(0).get(1)).exists() }, - { assert path(process.out.lmix.get(0).get(1)).exists() } + { assert path(process.out.lmix.get(0).get(1)).exists() }, { assert path(process.out.singlet_result.get(0).get(1)).exists() }, - { assert path(process.out.singlet_vcf.get(0).get(1)).exists() }, + { assert path(process.out.singlet_vcf.get(0).get(1)).exists() } ) } From acfe9628fae1edc21ee540d518183b01b956da36 Mon Sep 17 00:00:00 2001 From: wxicu Date: Thu, 25 Apr 2024 12:53:15 +0200 Subject: [PATCH 8/8] add snapshot --- .../freemuxlet/tests/main.nf.test.snap | 32 ++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/modules/nf-core/popscle/freemuxlet/tests/main.nf.test.snap b/modules/nf-core/popscle/freemuxlet/tests/main.nf.test.snap index 84bd34bef44..b2502c9194d 100644 --- a/modules/nf-core/popscle/freemuxlet/tests/main.nf.test.snap +++ b/modules/nf-core/popscle/freemuxlet/tests/main.nf.test.snap @@ -2,25 +2,49 @@ "versions": { "content": [ [ - "versions.yml:md5,cd783dfa34b208fe9aeab8623fa4ca4e" + "versions.yml:md5,8d90ac14cd657f4c831007418a55910d" ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-04-24T22:00:38.402346645" + "timestamp": "2024-04-25T12:49:23.684387488" + }, + "versions-aux-files": { + "content": [ + [ + "versions.yml:md5,8d90ac14cd657f4c831007418a55910d" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-25T12:49:35.355844696" + }, + "versions-aux-files-stub": { + "content": [ + [ + "versions.yml:md5,8d90ac14cd657f4c831007418a55910d" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-25T12:49:56.179166814" }, "versions-stub": { "content": [ [ - "versions.yml:md5,cd783dfa34b208fe9aeab8623fa4ca4e" + "versions.yml:md5,8d90ac14cd657f4c831007418a55910d" ] ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-04-24T22:00:48.216325466" + "timestamp": "2024-04-25T12:49:45.801327201" } } \ No newline at end of file