diff --git a/modules/nf-core/glimpse/chunk/meta.yml b/modules/nf-core/glimpse/chunk/meta.yml index 65fa6218a4a..e500d9e9715 100644 --- a/modules/nf-core/glimpse/chunk/meta.yml +++ b/modules/nf-core/glimpse/chunk/meta.yml @@ -11,7 +11,7 @@ tools: documentation: "https://odelaneau.github.io/GLIMPSE/commands.html" tool_dev_url: "https://github.com/odelaneau/GLIMPSE" doi: "10.1038/s41588-020-00756-0" - licence: "['MIT']" + licence: ["MIT"] input: - meta: type: map diff --git a/modules/nf-core/glimpse/concordance/meta.yml b/modules/nf-core/glimpse/concordance/meta.yml index c73948f4914..2b2d7195df8 100644 --- a/modules/nf-core/glimpse/concordance/meta.yml +++ b/modules/nf-core/glimpse/concordance/meta.yml @@ -12,7 +12,7 @@ tools: documentation: "https://odelaneau.github.io/GLIMPSE/commands.html" tool_dev_url: "https://github.com/odelaneau/GLIMPSE" doi: "10.1038/s41588-020-00756-0" - licence: "['MIT']" + licence: ["MIT"] input: - meta: type: map diff --git a/modules/nf-core/glimpse/concordance/tests/main.nf.test b/modules/nf-core/glimpse/concordance/tests/main.nf.test index d6236d35557..7e8505352c6 100644 --- a/modules/nf-core/glimpse/concordance/tests/main.nf.test +++ b/modules/nf-core/glimpse/concordance/tests/main.nf.test @@ -3,10 +3,13 @@ nextflow_process { name "Test Process GLIMPSE_CONCORDANCE" script "../main.nf" process "GLIMPSE_CONCORDANCE" - tag "glimpse" - tag "glimpse/concordance" + tag "modules" tag "modules_nfcore" + tag "glimpse" + tag "glimpse/concordance" + tag "glimpse/phase" + tag "bcftools/index" test("test_glimpse_concordance") { setup { @@ -20,15 +23,15 @@ nextflow_process { ]) input_vcf = Channel.of([ [ id:'input'], // meta map - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz", checkIfExists: true), - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", checkIfExists: true) + file(params.modules_testdata_base_path + "delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz", checkIfExists: true), + file(params.modules_testdata_base_path + "delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", checkIfExists: true) ]) ref_panel = Channel.of([ - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true), - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true) + file(params.modules_testdata_base_path + "delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true), + file(params.modules_testdata_base_path + "delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true) ]) ch_map = Channel.of([ - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/chr21.b38.gmap.gz", checkIfExists: true), + file(params.modules_testdata_base_path + "delete_me/glimpse/chr21.b38.gmap.gz", checkIfExists: true), ]) input[0] = input_vcf @@ -43,7 +46,7 @@ nextflow_process { script "../../../bcftools/index/main.nf" process { """ - input[0] = GLIMPSE_PHASE.out.phased_variant + input[0] = GLIMPSE_PHASE.out.phased_variants """ } } @@ -52,14 +55,14 @@ nextflow_process { process { """ allele_freq = Channel.fromList([ - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.sites.vcf.gz",checkIfExists:true), - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.sites.vcf.gz.csi",checkIfExists:true) + file(params.modules_testdata_base_path + "delete_me/glimpse/1000GP.chr21.noNA12878.s.sites.vcf.gz",checkIfExists:true), + file(params.modules_testdata_base_path + "delete_me/glimpse/1000GP.chr21.noNA12878.s.sites.vcf.gz.csi",checkIfExists:true) ]).collect() truth = Channel.fromList([ - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.bcf",checkIfExists:true), - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.bcf.csi",checkIfExists:true) + file(params.modules_testdata_base_path + "delete_me/glimpse/NA12878.chr21.s.bcf",checkIfExists:true), + file(params.modules_testdata_base_path + "delete_me/glimpse/NA12878.chr21.s.bcf.csi",checkIfExists:true) ]).collect() - estimate = GLIMPSE_PHASE.out.phased_variant + estimate = GLIMPSE_PHASE.out.phased_variants | join (BCFTOOLS_INDEX.out.csi) input[0] = estimate | combine (allele_freq) diff --git a/modules/nf-core/glimpse/concordance/tests/main.nf.test.snap b/modules/nf-core/glimpse/concordance/tests/main.nf.test.snap index 239db1e48de..c0838446b5e 100644 --- a/modules/nf-core/glimpse/concordance/tests/main.nf.test.snap +++ b/modules/nf-core/glimpse/concordance/tests/main.nf.test.snap @@ -7,7 +7,7 @@ { "id": "input" }, - "input.error.cal.txt.gz:md5,3259370d3a6b16dc6518eb96e64afc8a" + "input.error.cal.txt.gz:md5,15c6a120d9fd3ac8c0ff6a6aedc76571" ] ], "1": [ @@ -15,7 +15,7 @@ { "id": "input" }, - "input.error.grp.txt.gz:md5,c40e24a68ad099285d3d0f84cefd721e" + "input.error.grp.txt.gz:md5,532bec52c03f16dcd6cc6d2b7c26673b" ] ], "2": [ @@ -23,7 +23,7 @@ { "id": "input" }, - "input.error.spl.txt.gz:md5,a5c4a09ab52790b33c839ecbbf3ff7ce" + "input.error.spl.txt.gz:md5,35cb463e8db41e2180f21941ab0324e0" ] ], "3": [ @@ -31,7 +31,7 @@ { "id": "input" }, - "input.rsquare.grp.txt.gz:md5,2139f7d680487379ef38e185d7e6f43d" + "input.rsquare.grp.txt.gz:md5,15bc7bf7980fd63e0f09bd267e548b57" ] ], "4": [ @@ -39,7 +39,7 @@ { "id": "input" }, - "input.rsquare.spl.txt.gz:md5,ea2beba9d4d0f68061176daa767bef95" + "input.rsquare.spl.txt.gz:md5,55659f466775d828ee1ba723464bb460" ] ], "5": [ @@ -50,7 +50,7 @@ { "id": "input" }, - "input.error.cal.txt.gz:md5,3259370d3a6b16dc6518eb96e64afc8a" + "input.error.cal.txt.gz:md5,15c6a120d9fd3ac8c0ff6a6aedc76571" ] ], "errors_grp": [ @@ -58,7 +58,7 @@ { "id": "input" }, - "input.error.grp.txt.gz:md5,c40e24a68ad099285d3d0f84cefd721e" + "input.error.grp.txt.gz:md5,532bec52c03f16dcd6cc6d2b7c26673b" ] ], "errors_spl": [ @@ -66,7 +66,7 @@ { "id": "input" }, - "input.error.spl.txt.gz:md5,a5c4a09ab52790b33c839ecbbf3ff7ce" + "input.error.spl.txt.gz:md5,35cb463e8db41e2180f21941ab0324e0" ] ], "rsquare_grp": [ @@ -74,7 +74,7 @@ { "id": "input" }, - "input.rsquare.grp.txt.gz:md5,2139f7d680487379ef38e185d7e6f43d" + "input.rsquare.grp.txt.gz:md5,15bc7bf7980fd63e0f09bd267e548b57" ] ], "rsquare_spl": [ @@ -82,7 +82,7 @@ { "id": "input" }, - "input.rsquare.spl.txt.gz:md5,ea2beba9d4d0f68061176daa767bef95" + "input.rsquare.spl.txt.gz:md5,55659f466775d828ee1ba723464bb460" ] ], "versions": [ @@ -90,6 +90,10 @@ ] } ], - "timestamp": "2023-10-17T17:05:45.177807376" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-18T23:37:00.537398654" } } \ No newline at end of file diff --git a/modules/nf-core/glimpse/ligate/meta.yml b/modules/nf-core/glimpse/ligate/meta.yml index da6066add2b..c3b1485c436 100644 --- a/modules/nf-core/glimpse/ligate/meta.yml +++ b/modules/nf-core/glimpse/ligate/meta.yml @@ -12,7 +12,7 @@ tools: documentation: "https://odelaneau.github.io/GLIMPSE/commands.html" tool_dev_url: "https://github.com/odelaneau/GLIMPSE" doi: "10.1038/s41588-020-00756-0" - licence: "['MIT']" + licence: ["MIT"] input: - meta: type: map diff --git a/modules/nf-core/glimpse/ligate/tests/main.nf.test b/modules/nf-core/glimpse/ligate/tests/main.nf.test index e86ff2317a0..7289fc91acc 100644 --- a/modules/nf-core/glimpse/ligate/tests/main.nf.test +++ b/modules/nf-core/glimpse/ligate/tests/main.nf.test @@ -3,10 +3,13 @@ nextflow_process { name "Test Process GLIMPSE_LIGATE" script "../main.nf" process "GLIMPSE_LIGATE" - tag "glimpse" - tag "glimpse/ligate" + tag "modules_nfcore" tag "modules" + tag "glimpse" + tag "glimpse/ligate" + tag "glimpse/phase" + tag "bcftools/index" test("test_glimpse_ligate") { setup { @@ -21,15 +24,15 @@ nextflow_process { ]) input_vcf = Channel.of([ [ id:'input'], // meta map - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz", checkIfExists: true), - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", checkIfExists: true) + file(params.modules_testdata_base_path + "delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz", checkIfExists: true), + file(params.modules_testdata_base_path + "delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", checkIfExists: true) ]) ref_panel = Channel.of([ - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true), - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true) + file(params.modules_testdata_base_path + "delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true), + file(params.modules_testdata_base_path + "delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true) ]) ch_map = Channel.of([ - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/chr21.b38.gmap.gz", checkIfExists: true), + file(params.modules_testdata_base_path + "delete_me/glimpse/chr21.b38.gmap.gz", checkIfExists: true), ]) input[0] = input_vcf @@ -44,7 +47,7 @@ nextflow_process { script "../../../bcftools/index/main.nf" process { """ - input[0] = GLIMPSE_PHASE.out.phased_variant + input[0] = GLIMPSE_PHASE.out.phased_variants """ } } @@ -53,7 +56,7 @@ nextflow_process { when { process { """ - input[0] = GLIMPSE_PHASE.out.phased_variant + input[0] = GLIMPSE_PHASE.out.phased_variants | groupTuple() | join (BCFTOOLS_INDEX.out.csi.groupTuple()) """ diff --git a/modules/nf-core/glimpse/phase/main.nf b/modules/nf-core/glimpse/phase/main.nf index a6f39d15866..41004e60789 100644 --- a/modules/nf-core/glimpse/phase/main.nf +++ b/modules/nf-core/glimpse/phase/main.nf @@ -4,14 +4,14 @@ process GLIMPSE_PHASE { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/glimpse-bio:1.1.1--h2ce4488_2': + 'https://depot.galaxyproject.org/singularity/glimpse-bio:1.1.1--hce55b13_1': 'biocontainers/glimpse-bio:1.1.1--hce55b13_1' }" input: tuple val(meta) , path(input), path(input_index), path(samples_file), val(input_region), val(output_region), path(reference), path(reference_index), path(map) output: - tuple val(meta), path("*.{vcf,bcf,vcf.gz,bcf.gz}"), emit: phased_variant + tuple val(meta), path("*.{vcf,bcf,vcf.gz,bcf.gz}"), emit: phased_variants path "versions.yml" , emit: versions when: diff --git a/modules/nf-core/glimpse/phase/meta.yml b/modules/nf-core/glimpse/phase/meta.yml index 696616d37b1..862033b7f83 100644 --- a/modules/nf-core/glimpse/phase/meta.yml +++ b/modules/nf-core/glimpse/phase/meta.yml @@ -12,7 +12,7 @@ tools: documentation: "https://odelaneau.github.io/GLIMPSE/commands.html" tool_dev_url: "https://github.com/odelaneau/GLIMPSE" doi: "10.1038/s41588-020-00756-0" - licence: "['MIT']" + licence: ["MIT"] input: - meta: type: map diff --git a/modules/nf-core/glimpse/phase/tests/main.nf.test b/modules/nf-core/glimpse/phase/tests/main.nf.test index 0009387f5a2..5c92cb1fc64 100644 --- a/modules/nf-core/glimpse/phase/tests/main.nf.test +++ b/modules/nf-core/glimpse/phase/tests/main.nf.test @@ -22,15 +22,15 @@ nextflow_process { ]) input_vcf = Channel.of([ [ id:'input'], // meta map - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz", checkIfExists: true), - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", checkIfExists: true) + file(params.modules_testdata_base_path + "delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz", checkIfExists: true), + file(params.modules_testdata_base_path + "delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", checkIfExists: true) ]) ref_panel = Channel.of([ - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true), - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true) + file(params.modules_testdata_base_path + "delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true), + file(params.modules_testdata_base_path + "delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true) ]) ch_map = Channel.of([ - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/chr21.b38.gmap.gz", checkIfExists: true), + file(params.modules_testdata_base_path + "delete_me/glimpse/chr21.b38.gmap.gz", checkIfExists: true), ]) input[0] = input_vcf @@ -47,7 +47,7 @@ nextflow_process { then { String targetFileName = "input_present_chr21_16650000-16800000.vcf.gz" - File selectedFile = process.out.phased_variant.stream() + File selectedFile = process.out.phased_variants.stream() .filter(vector -> vector.size() > 1) .map(vector -> new File(vector.get(1).toString())) .filter(file -> file.getName().equals(targetFileName)) @@ -58,7 +58,7 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot(process.out.versions).match("versions") }, - { assert process.out.phased_variant.size() == 4}, + { assert process.out.phased_variants.size() == 4}, { assert snapshot(lines).match("imputed") } ) } diff --git a/modules/nf-core/glimpse/sample/meta.yml b/modules/nf-core/glimpse/sample/meta.yml index 08e27b60c95..36937ec0c26 100644 --- a/modules/nf-core/glimpse/sample/meta.yml +++ b/modules/nf-core/glimpse/sample/meta.yml @@ -11,7 +11,7 @@ tools: documentation: "https://odelaneau.github.io/GLIMPSE/commands.html" tool_dev_url: "https://github.com/odelaneau/GLIMPSE" doi: "10.1038/s41588-020-00756-0" - licence: "['MIT']" + licence: ["MIT"] input: - meta: type: map @@ -22,12 +22,6 @@ input: type: file description: VCF/BCF file generated using GLIMPSE ligate pattern: "*.{vcf,bcf,vcf.gz,bcf.gz}" - - sample: - type: parameter - description: Samples a likely haplotype pair for each sample, use it in combination with --seed. Option not recommended for general usage, use --solve instead - - solve: - type: parameter - description: Get the most likely haplotype pair for each sample (the random number generator is not used) output: - meta: type: map diff --git a/modules/nf-core/glimpse/sample/tests/main.nf.test b/modules/nf-core/glimpse/sample/tests/main.nf.test index 9e6139d44bd..494c35296fe 100644 --- a/modules/nf-core/glimpse/sample/tests/main.nf.test +++ b/modules/nf-core/glimpse/sample/tests/main.nf.test @@ -3,10 +3,12 @@ nextflow_process { name "Test Process GLIMPSE_SAMPLE" script "../main.nf" process "GLIMPSE_SAMPLE" - tag "glimpse" - tag "glimpse/sample" + tag "modules" tag "modules_nfcore" + tag "glimpse" + tag "glimpse/sample" + tag "glimpse/phase" test("test_glimpse_sample") { config "./nextflow.config" @@ -21,15 +23,15 @@ nextflow_process { ]) input_vcf = Channel.of([ [ id:'input'], // meta map - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz", checkIfExists: true), - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", checkIfExists: true) + file(params.modules_testdata_base_path + "delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz", checkIfExists: true), + file(params.modules_testdata_base_path + "delete_me/glimpse/NA12878.chr21.s.1x.vcf.gz.csi", checkIfExists: true) ]) ref_panel = Channel.of([ - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true), - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true) + file(params.modules_testdata_base_path + "delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true), + file(params.modules_testdata_base_path + "delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true) ]) ch_map = Channel.of([ - file("https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/glimpse/chr21.b38.gmap.gz", checkIfExists: true), + file(params.modules_testdata_base_path + "delete_me/glimpse/chr21.b38.gmap.gz", checkIfExists: true), ]) input[0] = input_vcf @@ -44,7 +46,7 @@ nextflow_process { when { process { """ - input[0] = GLIMPSE_PHASE.out.phased_variant + input[0] = GLIMPSE_PHASE.out.phased_variants """ } } diff --git a/subworkflows/nf-core/vcf_impute_glimpse/main.nf b/subworkflows/nf-core/vcf_impute_glimpse/main.nf index 5fe265519c8..94262e34ae1 100644 --- a/subworkflows/nf-core/vcf_impute_glimpse/main.nf +++ b/subworkflows/nf-core/vcf_impute_glimpse/main.nf @@ -33,11 +33,11 @@ workflow VCF_IMPUTE_GLIMPSE { GLIMPSE_PHASE ( phase_input ) // [meta, vcf, index, sample_infos, regionin, regionout, ref, ref_index, map] ch_versions = ch_versions.mix(GLIMPSE_PHASE.out.versions ) - INDEX_PHASE ( GLIMPSE_PHASE.out.phased_variant ) + INDEX_PHASE ( GLIMPSE_PHASE.out.phased_variants ) ch_versions = ch_versions.mix( INDEX_PHASE.out.versions ) // Ligate all phased files in one and index it - ligate_input = GLIMPSE_PHASE.out.phased_variant + ligate_input = GLIMPSE_PHASE.out.phased_variants .groupTuple( by: 0 ) .combine( INDEX_PHASE.out.csi .groupTuple( by: 0 ), diff --git a/subworkflows/nf-core/vcf_impute_glimpse/meta.yml b/subworkflows/nf-core/vcf_impute_glimpse/meta.yml index 6c9fe2235ee..81b3b4d5814 100644 --- a/subworkflows/nf-core/vcf_impute_glimpse/meta.yml +++ b/subworkflows/nf-core/vcf_impute_glimpse/meta.yml @@ -30,19 +30,17 @@ output: description: | Tab delimited output txt file containing buffer and imputation regions. Structure: [meta, txt] - - phased_variants: - type: file - description: | - Output VCF/BCF file containing genotype probabilities (GP field), - imputed dosages (DS field), best guess genotypes (GT field), - sampled haplotypes in the last (max 16) main iterations (HS field) and info-score. - Structure: [ val(meta), bcf ] - merged_variants: type: file description: | - Output VCF/BCF file for the merged regions. + Output phased VCF/BCF file for the merged regions. Phased information (HS field) is updated accordingly for the full region. Structure: [ val(meta), bcf ] + - merged_variants_index: + type: file + description: | + Index output of phased VCF/BCF file for the merged regions. + Structure: [ val(meta), csi ] - versions: type: file description: File containing software versions diff --git a/subworkflows/nf-core/vcf_impute_glimpse/tests/main.nf.test b/subworkflows/nf-core/vcf_impute_glimpse/tests/main.nf.test index 7931f706670..46db4244271 100644 --- a/subworkflows/nf-core/vcf_impute_glimpse/tests/main.nf.test +++ b/subworkflows/nf-core/vcf_impute_glimpse/tests/main.nf.test @@ -3,13 +3,14 @@ nextflow_workflow { name "Test Workflow VCF_IMPUTE_GLIMPSE" script "../main.nf" workflow "VCF_IMPUTE_GLIMPSE" - tag "glimpse" - tag "glimpse/chunk" - tag "glimpse/phase" - tag "glimpse/ligate" + tag "subworkflows" + tag "bcftools/index" tag "subworkflows_nfcore" - tag "vcf_impute_glimpse" + tag "subworkflows/vcf_impute_glimpse" + tag "glimpse/phase" + tag "glimpse/ligate" + tag "glimpse/chunk" test("Should run without failures") { config "./nextflow.config" @@ -24,14 +25,14 @@ nextflow_workflow { ch_panel = Channel.fromList([ [[ ref:'ref_panel'], - file("https://github.com/nf-core/test-datasets/raw/imputation/data/panel/both/1000GP.chr21_22.noNA12878.s.bcf", + file("https://raw.githubusercontent.com/nf-core/test-datasets/phaseimpute/data/panel/21_22/1000GP.chr21_22.s.norel.bcf", checkIfExists: true), - file("https://github.com/nf-core/test-datasets/raw/imputation/data/panel/both/1000GP.chr21_22.noNA12878.s.bcf.csi", + file("https://raw.githubusercontent.com/nf-core/test-datasets/phaseimpute/data/panel/21_22/1000GP.chr21_22.s.norel.bcf.csi", checkIfExists: true)], [[ ref:'ref_panel2'], - file("https://github.com/nf-core/test-datasets/raw/imputation/data/panel/both/1000GP.chr21_22.noNA12878.s.bcf", + file("https://raw.githubusercontent.com/nf-core/test-datasets/phaseimpute/data/panel/21_22/1000GP.chr21_22.s.norel.bcf", checkIfExists: true), - file("https://github.com/nf-core/test-datasets/raw/imputation/data/panel/both/1000GP.chr21_22.noNA12878.s.bcf.csi", + file("https://raw.githubusercontent.com/nf-core/test-datasets/phaseimpute/data/panel/21_22/1000GP.chr21_22.s.norel.bcf.csi", checkIfExists: true)] ]) region = Channel.fromList([ @@ -40,13 +41,13 @@ nextflow_workflow { ]) input_vcf = Channel.fromList([ - [[ id:'input'], // meta map - file("https://github.com/nf-core/test-datasets/raw/imputation/data/NA12878/both/NA12878.chr21_22.s.1x.vcf.gz", checkIfExists: true), - file("https://github.com/nf-core/test-datasets/raw/imputation/data/NA12878/both/NA12878.chr21_22.s.1x.vcf.gz.csi", checkIfExists: true), + [[ id:'NA12878'], // meta map + file("https://raw.githubusercontent.com/nf-core/test-datasets/phaseimpute/data/individuals/NA12878/NA12878.s.1x.bcf", checkIfExists: true), + file("https://raw.githubusercontent.com/nf-core/test-datasets/phaseimpute/data/individuals/NA12878/NA12878.s.1x.bcf.csi", checkIfExists: true), ], - [[ id:'input2'], // meta map - file("https://github.com/nf-core/test-datasets/raw/imputation/data/NA12878/both/NA12878.chr21_22.s.1x.vcf.gz", checkIfExists: true), - file("https://github.com/nf-core/test-datasets/raw/imputation/data/NA12878/both/NA12878.chr21_22.s.1x.vcf.gz.csi", checkIfExists: true), + [[ id:'NA19401'], // meta map + file("https://raw.githubusercontent.com/nf-core/test-datasets/phaseimpute/data/individuals/NA19401/NA19401.s.1x.bcf", checkIfExists: true), + file("https://raw.githubusercontent.com/nf-core/test-datasets/phaseimpute/data/individuals/NA19401/NA19401.s.1x.bcf.csi", checkIfExists: true), ] ]) input_vcf_multiple = input_vcf @@ -58,10 +59,10 @@ nextflow_workflow { ch_map = Channel.fromList([ [[ chr: "chr21"], - file("https://github.com/nf-core/test-datasets/raw/imputation/data/genetic_maps.b38/chr21.b38.gmap.gz", checkIfExists: true) + file("https://raw.githubusercontent.com/nf-core/test-datasets/phaseimpute/data/reference_genome/GRCh38.chr21.s.map", checkIfExists: true) ], [[ chr: "chr22"], - file("https://github.com/nf-core/test-datasets/raw/imputation/data/genetic_maps.b38/chr22.b38.gmap.gz", checkIfExists: true) + file("https://raw.githubusercontent.com/nf-core/test-datasets/phaseimpute/data/reference_genome/GRCh38.chr22.s.map", checkIfExists: true) ] ]) @@ -85,17 +86,7 @@ nextflow_workflow { } then { - println(workflow.out.merged_variants) - String targetFileName = "input_chr21_ref_panel2_ligate.vcf.gz" - File selectedFile = workflow.out.merged_variants.stream() - .filter(vector -> vector.size() > 1) - .map(vector -> new File(vector.get(1).toString())) - .filter(file -> file.getName().equals(targetFileName)) - .findFirst() - .orElse(null) - String selectedFilename = selectedFile != null ? selectedFile.getPath() : null - def lines = path(selectedFilename).linesGzip.last() - print(lines) + def lines = path(workflow.out.merged_variants.get(0).get(1)).linesGzip.last() assertAll( { assert workflow.success }, { assert snapshot(workflow.out.versions).match("versions") }, diff --git a/subworkflows/nf-core/vcf_impute_glimpse/tests/main.nf.test.snap b/subworkflows/nf-core/vcf_impute_glimpse/tests/main.nf.test.snap index 9265c429f2a..287930cdf35 100644 --- a/subworkflows/nf-core/vcf_impute_glimpse/tests/main.nf.test.snap +++ b/subworkflows/nf-core/vcf_impute_glimpse/tests/main.nf.test.snap @@ -4,79 +4,83 @@ [ [ { - "id": "input", + "id": "NA12878", "chr": "chr21", "region": "chr21:16600000-16800000", "ref": "ref_panel2" }, - "input_chr21:16600000-16800000_chunk.txt:md5,426f0f75efed96818656876116f73b06" + "NA12878_chr21:16600000-16800000_chunk.txt:md5,775240b195e782b3b83adf52e0d17089" ], [ { - "id": "input", + "id": "NA12878", "chr": "chr21", "region": "chr21:16600000-16800000", "ref": "ref_panel" }, - "input_chr21:16600000-16800000_chunk.txt:md5,426f0f75efed96818656876116f73b06" + "NA12878_chr21:16600000-16800000_chunk.txt:md5,775240b195e782b3b83adf52e0d17089" ], [ { - "id": "input", + "id": "NA12878", "chr": "chr22", "region": "chr22:16600000-16800000", "ref": "ref_panel2" }, - "input_chr22:16600000-16800000_chunk.txt:md5,4f48d33fd9c1e235ccfd25827a92ddd1" + "NA12878_chr22:16600000-16800000_chunk.txt:md5,f5270ed0faa4f9697618444b267442ce" ], [ { - "id": "input", + "id": "NA12878", "chr": "chr22", "region": "chr22:16600000-16800000", "ref": "ref_panel" }, - "input_chr22:16600000-16800000_chunk.txt:md5,4f48d33fd9c1e235ccfd25827a92ddd1" + "NA12878_chr22:16600000-16800000_chunk.txt:md5,f5270ed0faa4f9697618444b267442ce" ], [ { - "id": "input2", + "id": "NA19401", "chr": "chr21", "region": "chr21:16600000-16800000", "ref": "ref_panel2" }, - "input2_chr21:16600000-16800000_chunk.txt:md5,426f0f75efed96818656876116f73b06" + "NA19401_chr21:16600000-16800000_chunk.txt:md5,775240b195e782b3b83adf52e0d17089" ], [ { - "id": "input2", + "id": "NA19401", "chr": "chr21", "region": "chr21:16600000-16800000", "ref": "ref_panel" }, - "input2_chr21:16600000-16800000_chunk.txt:md5,426f0f75efed96818656876116f73b06" + "NA19401_chr21:16600000-16800000_chunk.txt:md5,775240b195e782b3b83adf52e0d17089" ], [ { - "id": "input2", + "id": "NA19401", "chr": "chr22", "region": "chr22:16600000-16800000", "ref": "ref_panel2" }, - "input2_chr22:16600000-16800000_chunk.txt:md5,4f48d33fd9c1e235ccfd25827a92ddd1" + "NA19401_chr22:16600000-16800000_chunk.txt:md5,f5270ed0faa4f9697618444b267442ce" ], [ { - "id": "input2", + "id": "NA19401", "chr": "chr22", "region": "chr22:16600000-16800000", "ref": "ref_panel" }, - "input2_chr22:16600000-16800000_chunk.txt:md5,4f48d33fd9c1e235ccfd25827a92ddd1" + "NA19401_chr22:16600000-16800000_chunk.txt:md5,f5270ed0faa4f9697618444b267442ce" ] ] ], - "timestamp": "2023-10-17T18:20:13.045340135" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-18T23:16:59.014613786" }, "versions": { "content": [ @@ -105,54 +109,38 @@ "versions.yml:md5,7ae4d2b0252f9382dd08d783b7a234d2", "versions.yml:md5,7ae4d2b0252f9382dd08d783b7a234d2", "versions.yml:md5,7ae4d2b0252f9382dd08d783b7a234d2", - "versions.yml:md5,7ae4d2b0252f9382dd08d783b7a234d2", - "versions.yml:md5,7ae4d2b0252f9382dd08d783b7a234d2", - "versions.yml:md5,7ae4d2b0252f9382dd08d783b7a234d2", - "versions.yml:md5,7ae4d2b0252f9382dd08d783b7a234d2", - "versions.yml:md5,7ae4d2b0252f9382dd08d783b7a234d2", - "versions.yml:md5,7ae4d2b0252f9382dd08d783b7a234d2", - "versions.yml:md5,7ae4d2b0252f9382dd08d783b7a234d2", - "versions.yml:md5,7ae4d2b0252f9382dd08d783b7a234d2", - "versions.yml:md5,7ae4d2b0252f9382dd08d783b7a234d2", - "versions.yml:md5,7ae4d2b0252f9382dd08d783b7a234d2", - "versions.yml:md5,7ae4d2b0252f9382dd08d783b7a234d2", - "versions.yml:md5,7ae4d2b0252f9382dd08d783b7a234d2", - "versions.yml:md5,86d1ec939ded96a4ed3fb73ff83c240b", - "versions.yml:md5,86d1ec939ded96a4ed3fb73ff83c240b", - "versions.yml:md5,86d1ec939ded96a4ed3fb73ff83c240b", - "versions.yml:md5,86d1ec939ded96a4ed3fb73ff83c240b", - "versions.yml:md5,86d1ec939ded96a4ed3fb73ff83c240b", - "versions.yml:md5,86d1ec939ded96a4ed3fb73ff83c240b", - "versions.yml:md5,86d1ec939ded96a4ed3fb73ff83c240b", - "versions.yml:md5,86d1ec939ded96a4ed3fb73ff83c240b", - "versions.yml:md5,a17a10f6eb5e140e388b92d5f19680ae", - "versions.yml:md5,a17a10f6eb5e140e388b92d5f19680ae", - "versions.yml:md5,a17a10f6eb5e140e388b92d5f19680ae", - "versions.yml:md5,a17a10f6eb5e140e388b92d5f19680ae", - "versions.yml:md5,a17a10f6eb5e140e388b92d5f19680ae", - "versions.yml:md5,a17a10f6eb5e140e388b92d5f19680ae", - "versions.yml:md5,a17a10f6eb5e140e388b92d5f19680ae", - "versions.yml:md5,a17a10f6eb5e140e388b92d5f19680ae", - "versions.yml:md5,a17a10f6eb5e140e388b92d5f19680ae", - "versions.yml:md5,a17a10f6eb5e140e388b92d5f19680ae", - "versions.yml:md5,a17a10f6eb5e140e388b92d5f19680ae", - "versions.yml:md5,a17a10f6eb5e140e388b92d5f19680ae", - "versions.yml:md5,a17a10f6eb5e140e388b92d5f19680ae", - "versions.yml:md5,a17a10f6eb5e140e388b92d5f19680ae", - "versions.yml:md5,a17a10f6eb5e140e388b92d5f19680ae", - "versions.yml:md5,a17a10f6eb5e140e388b92d5f19680ae", - "versions.yml:md5,a17a10f6eb5e140e388b92d5f19680ae", - "versions.yml:md5,a17a10f6eb5e140e388b92d5f19680ae", - "versions.yml:md5,a17a10f6eb5e140e388b92d5f19680ae", - "versions.yml:md5,a17a10f6eb5e140e388b92d5f19680ae" + "versions.yml:md5,a802158fea97c36620863658efb7ae68", + "versions.yml:md5,a802158fea97c36620863658efb7ae68", + "versions.yml:md5,a802158fea97c36620863658efb7ae68", + "versions.yml:md5,a802158fea97c36620863658efb7ae68", + "versions.yml:md5,a802158fea97c36620863658efb7ae68", + "versions.yml:md5,a802158fea97c36620863658efb7ae68", + "versions.yml:md5,a802158fea97c36620863658efb7ae68", + "versions.yml:md5,a802158fea97c36620863658efb7ae68", + "versions.yml:md5,e37bdea2d40f36ce8546f87c3e572c96", + "versions.yml:md5,e37bdea2d40f36ce8546f87c3e572c96", + "versions.yml:md5,e37bdea2d40f36ce8546f87c3e572c96", + "versions.yml:md5,e37bdea2d40f36ce8546f87c3e572c96", + "versions.yml:md5,e37bdea2d40f36ce8546f87c3e572c96", + "versions.yml:md5,e37bdea2d40f36ce8546f87c3e572c96", + "versions.yml:md5,e37bdea2d40f36ce8546f87c3e572c96", + "versions.yml:md5,e37bdea2d40f36ce8546f87c3e572c96" ] ], - "timestamp": "2023-10-17T18:20:06.846882518" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-18T23:16:58.336134471" }, "merged": { "content": [ - "chr21\t16799989\t21:16799989:T:C\tT\tC\t.\t.\tRAF=0.000468897;AF=0;INFO=1\tGT:DS:GP:HS\t0/0:0:1,0,0:0" + "chr21\t16609998\t21:16609998:A:G\tA\tG\t.\t.\tRAF=0.00125156;AF=0;INFO=1\tGT:DS:GP:HS\t0/0:0:1,0,0:0" ], - "timestamp": "2023-10-17T18:20:19.789038503" + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-18T23:16:59.786459305" } } \ No newline at end of file diff --git a/subworkflows/nf-core/vcf_impute_glimpse/tests/tags.yml b/subworkflows/nf-core/vcf_impute_glimpse/tests/tags.yml index 34d277258cb..24003ec0293 100644 --- a/subworkflows/nf-core/vcf_impute_glimpse/tests/tags.yml +++ b/subworkflows/nf-core/vcf_impute_glimpse/tests/tags.yml @@ -1,2 +1,2 @@ -vcf_impute_glimpse: +subworkflows/vcf_impute_glimpse: - subworkflows/nf-core/vcf_impute_glimpse/**