From 0eff9c2aba19abbae3e017fc27d258bd88ec0ee1 Mon Sep 17 00:00:00 2001 From: Louis Le Nezet Date: Wed, 30 Oct 2024 10:36:40 +0100 Subject: [PATCH 01/32] Remove map --- conf/test_full.config | 1 - 1 file changed, 1 deletion(-) diff --git a/conf/test_full.config b/conf/test_full.config index f4b57042..fa1e3475 100644 --- a/conf/test_full.config +++ b/conf/test_full.config @@ -29,7 +29,6 @@ params { // Input data input = "${projectDir}/tests/csv/sample_sim_full.csv" panel = "${projectDir}/tests/csv/panel_full.csv" - map = "${projectDir}/tests/csv/map.csv" // Pipeline steps steps = "all" From 610993e72797a60e19ec3b3b9806e78b3b1fd4e0 Mon Sep 17 00:00:00 2001 From: Louis Le Nezet Date: Wed, 30 Oct 2024 11:25:28 +0100 Subject: [PATCH 02/32] Fix gstring error --- .../local/utils_nfcore_phaseimpute_pipeline/main.nf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf index b382aa3b..54fc07d1 100644 --- a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf @@ -502,8 +502,8 @@ def getFileExtension(file) { error "Type not supported: ${file} = ${file.getClass()}" } } - if (file instanceof String) { - return file.replace(".gz","").split("\\.").last() + if (file instanceof CharSequence) { + return file.toString().replace(".gz", "").split("\\.").last() } else { error "Type not supported: ${file.getClass()}" } @@ -617,8 +617,8 @@ def toolCitationText() { params.tools ? params.tools.split(',').contains("glimpse2") ? "GLIMPSE2 (Rubinacci et al. 2023)," : "": "", params.tools ? params.tools.split(',').contains("quilt") ? "QUILT (Davies et al. 2021)," : "": "", "SAMtools (Li et al. 2009),", - params.tools ? params.phased ? "SHAPEIT5 (Hofmeister et al. 2023)," : "": "", - params.tools ? params.phased ? "BEDtools (Quinlan and Hall 2010)," : "": "", + params.tools ? params.phase ? "SHAPEIT5 (Hofmeister et al. 2023)," : "": "", + params.tools ? params.phase ? "BEDtools (Quinlan and Hall 2010)," : "": "", params.tools ? params.tools.split(',').contains("stitch") ? "STITCH (Davies et al. 2016)," : "": "", "Tabix (Li et al. 2011),", params.tools ? params.compute_freq ? "VCFlib (Garrison et al. 2022)," : "": "", @@ -632,13 +632,13 @@ def toolBibliographyText() { // Can use ternary operators to dynamically construct based conditions, e.g. params["run_xyz"] ? "
  • Author (2023) Pub name, Journal, DOI
  • " : "", // Uncomment function in methodsDescriptionText to render in MultiQC report def reference_text = [ - params.phased ? "
  • Quinlan AR, Hall IM (2010). BEDTools: a flexible suite of utilities for comparing genomic features. Bioinformatics. 2010 Mar 15;26(6):841-2. doi:10.1093/bioinformatics/btq033.
  • ": "", + params.phase ? "
  • Quinlan AR, Hall IM (2010). BEDTools: a flexible suite of utilities for comparing genomic features. Bioinformatics. 2010 Mar 15;26(6):841-2. doi:10.1093/bioinformatics/btq033.
  • ": "", "
  • Li H, Handsaker B, Wysoker A, Fennell T, Ruan J, Homer N, Marth G, Abecasis G, Durbin R; 1000 Genome Project Data Processing Subgroup. (2009). The Sequence Alignment/Map format and SAMtools. Bioinformatics. 2009 Aug 15;25(16):2078-9. doi:10.1093/bioinformatics/btp352.
  • ", "
  • Li H. (2011). Tabix: fast retrieval of sequence features from generic TAB-delimited files. Bioinformatics. 2011 Mar 1;27(5):718-9. doi:10.1093/bioinformatics/btq671.
  • ", params.tools ? params.tools.split(',').contains("quilt") ? "
  • Davies RW, Kucka M, Su D, Shi S, Flanagan M, Cunniff CM, Chan YF, & Myers S. (2021). Rapid genotype imputation from sequence with reference panels. Nature Genetics. doi:10.1038/s41588-021-00877-0.
  • " : "": "", params.tools ? params.tools.split(',').contains("glimpse") ? "
  • Rubinacci S, Ribeiro DM, Hofmeister RJ, & Delaneau O. (2021). Efficient phasing and imputation of low-coverage sequencing data using large reference panels. Nature Genetics. doi:10.1038/s41588-020-00756-0.
  • " : "": "", params.tools ? params.tools.split(',').contains("glimpse2") ? "
  • Rubinacci S, Hofmeister RJ, Sousa da Mota B, & Delaneau O. (2023). Imputation of low-coverage sequencing data from 150,119 UK Biobank genomes. Nature Genetics. doi:10.1038/s41588-023-01438-3.
  • " : "": "", - params.phased ? "
  • Hofmeister RJ, Ribeiro DM, Rubinacci S, Delaneau O. (2023). Accurate rare variant phasing of whole-genome and whole-exome sequencing data in the UK Biobank. Nat Genet. 2023 Jul;55(7):1243-1249. doi:10.1038/s41588-023-01415-w.
  • " : "", + params.phase ? "
  • Hofmeister RJ, Ribeiro DM, Rubinacci S, Delaneau O. (2023). Accurate rare variant phasing of whole-genome and whole-exome sequencing data in the UK Biobank. Nat Genet. 2023 Jul;55(7):1243-1249. doi:10.1038/s41588-023-01415-w.
  • " : "", params.tools ? params.tools.split(',').contains("stitch") ? "
  • Davies RW, Flint J, Myers S, & Mott R. (2016). Rapid genotype imputation from sequence without reference panels. Nature Genetics.
  • " : "": "", params.compute_freq ? "
  • Garrison E, Kronenberg ZN, Dawson ET, Pedersen BS, Prins P. (2022). A spectrum of free software tools for processing the VCF variant call format: vcflib, bio-vcf, cyvcf2, hts-nim and slivar. PLoS Comput Biol 18(5).
  • " : "", ].join(' ').trim() From d7ce7bd6550264b478f7fa91ca5e2fd66a180dc9 Mon Sep 17 00:00:00 2001 From: Louis Le Nezet Date: Wed, 30 Oct 2024 11:35:53 +0100 Subject: [PATCH 03/32] Update Changelog --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57bc2391..64992896 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,14 +61,16 @@ Initial release of nf-core/phaseimpute, created with the [nf-core](https://nf-co - [#139](https://github.com/nf-core/phaseimpute/pull/139) - Update all nf-core modules - [#146](https://github.com/nf-core/phaseimpute/pull/146) - Remove conda CI check for PR due to nextflow error - [#144](https://github.com/nf-core/phaseimpute/pull/144) - Documentation updates +- [#149](https://github.com/nf-core/phaseimpute/pull/149) - Remove the map file from the awsfulltest ### `Fixed` - [#15](https://github.com/nf-core/phaseimpute/pull/15) - Changed test csv files to point to nf-core repository - [#16](https://github.com/nf-core/phaseimpute/pull/16) - Removed outdir from test config files - [#65](https://github.com/nf-core/phaseimpute/pull/65) - Separate stitch output by individuals -- [#75](https://github.com/nf-core/phaseimpute/pull/75) - Set frequency computation with VCFFIXUP process as optional with --compute_freq. Use Glimpse_chunk on panel vcf to compute the chunk and not makewindows on fasta. +- [#75](https://github.com/nf-core/phaseimpute/pull/75) - Set frequency computation with VCFFIXUP process as optional with `--compute_freq`. Use Glimpse_chunk on panel vcf to compute the chunk and not makewindows on fasta. - [#117](https://github.com/nf-core/phaseimpute/pull/117) - Fix directories in CSV. +- [#151](https://github.com/nf-core/phaseimpute/pull/151) - Fix `Type not supported: class org.codehaus.groovy.runtime.GStringImpl` error due to `String` test in `getFileExtension()`. ### `Dependencies` From 8ae71794c340c3b3218cc12ff37cbf4cdff07ec8 Mon Sep 17 00:00:00 2001 From: Louis Le Nezet Date: Wed, 30 Oct 2024 11:37:28 +0100 Subject: [PATCH 04/32] Update Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64992896..f8491e5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,7 @@ Initial release of nf-core/phaseimpute, created with the [nf-core](https://nf-co - [#139](https://github.com/nf-core/phaseimpute/pull/139) - Update all nf-core modules - [#146](https://github.com/nf-core/phaseimpute/pull/146) - Remove conda CI check for PR due to nextflow error - [#144](https://github.com/nf-core/phaseimpute/pull/144) - Documentation updates +- [#148](https://github.com/nf-core/phaseimpute/pull/148) - Fix awsfulltest github action for manual dispatch - [#149](https://github.com/nf-core/phaseimpute/pull/149) - Remove the map file from the awsfulltest ### `Fixed` From 22559e7c8d14907fae836da2754cf11e344e73b3 Mon Sep 17 00:00:00 2001 From: Louis Le Nezet Date: Thu, 31 Oct 2024 09:36:19 +0100 Subject: [PATCH 05/32] Simplify getFileExtension --- .../utils_nfcore_phaseimpute_pipeline/main.nf | 25 +++--- .../tests/function.nf.test | 57 +++++++++++- .../tests/function.nf.test.snap | 86 +++++++++++++++---- test.nf | 15 ++++ 4 files changed, 155 insertions(+), 28 deletions(-) create mode 100644 test.nf diff --git a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf index 54fc07d1..677b3984 100644 --- a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf @@ -492,21 +492,24 @@ def checkMetaChr(chr_a, chr_b, name){ // // Get file extension // +import nextflow.file.http.XPath +import java.nio.file.Path + def getFileExtension(file) { - if (file instanceof Path) { - file = file.getName() - } else if (file instanceof ArrayList) { - if (file.size() == 0) { - return null - } else { - error "Type not supported: ${file} = ${file.getClass()}" - } - } - if (file instanceof CharSequence) { - return file.toString().replace(".gz", "").split("\\.").last() + def file_name = "" + + if (file instanceof Path || file instanceof XPath) { + file_name = file.name + } else if (file instanceof CharSequence) { + file_name = file.toString() + } else if (file instanceof List) { + return file.collect { getFileExtension(it) } } else { error "Type not supported: ${file.getClass()}" } + + // Remove .gz if present and get the last part after splitting by "." + return file_name.replace(".gz", "").split("\\.").last() } // diff --git a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test index d1d04cb1..b70edbe4 100644 --- a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test +++ b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test @@ -15,10 +15,52 @@ nextflow_function { } } then { - assert function.success - assert snapshot(function.result).match() + assertAll( + { assert function.success }, + { assert function.result == "vcf" } + ) + } + } + + test ("Test getFileExtension non empty list") { + function "getFileExtension" + tag "getFileExtension" + when { + function { + """ + input[0] = [ + file(params.pipelines_testdata_base_path + "hum_data/panel/chr21/1000GP.chr21.s.norel.vcf.gz", checkIfExists: true), + "test.myfile.txt.gz" + ] + """ + } + } + then { + assertAll( + { assert function.success }, + { assert function.result == ['vcf', 'txt'] } + ) } } + + test ("Test getFileExtension empty list") { + function "getFileExtension" + tag "getFileExtension" + when { + function { + """ + input[0] = [] + """ + } + } + then { + assertAll( + { assert function.success }, + { assert function.result == [] } + ) + } + } + test("Test checkFileIndex no error with empty channel") { function "checkFileIndex" tag "checkFileIndex" @@ -46,6 +88,7 @@ nextflow_function { assert snapshot(function.result).match() } } + test("Test checkFileIndex no error") { function "checkFileIndex" tag "checkFileIndex" @@ -71,6 +114,7 @@ nextflow_function { assert function.success } } + test("Test checkFileIndex bam bai") { function "checkFileIndex" tag "checkFileIndex" @@ -90,6 +134,7 @@ nextflow_function { assert function.stdout.contains("[id:input7]: Index file for .bam must have the extension .bai") } } + test("Test checkFileIndex cram crai") { function "checkFileIndex" tag "checkFileIndex" @@ -109,6 +154,7 @@ nextflow_function { assert function.stdout.contains("[id:input7]: Index file for .cram must have the extension .crai") } } + test("Test checkFileIndex bcf csi") { function "checkFileIndex" tag "checkFileIndex" @@ -128,6 +174,7 @@ nextflow_function { assert function.stdout.contains("[id:input7]: Index file for [.vcf, .vcf.gz, bcf] must have the extension [.tbi, .csi]") } } + test("Test checkFileIndex vcf csi") { function "checkFileIndex" tag "checkFileIndex" @@ -147,6 +194,7 @@ nextflow_function { assert function.stdout.contains("[id:input7]: Index file for [.vcf, .vcf.gz, bcf] must have the extension [.tbi, .csi]") } } + test("Test checkFileIndex vcf.gz csi") { function "checkFileIndex" tag "checkFileIndex" @@ -166,6 +214,7 @@ nextflow_function { assert function.stdout.contains("[id:input7]: Index file for [.vcf, .vcf.gz, bcf] must have the extension [.tbi, .csi]") } } + test("Test checkFileIndex fa fai") { function "checkFileIndex" tag "checkFileIndex" @@ -185,6 +234,7 @@ nextflow_function { assert function.stdout.contains("[id:input7]: Index file for [fa, fasta] must have the extension .fai") } } + test("Test checkFileIndex fasta fai") { function "checkFileIndex" tag "checkFileIndex" @@ -204,6 +254,7 @@ nextflow_function { assert function.stdout.contains("[id:input7]: Index file for [fa, fasta] must have the extension .fai") } } + test("Test Function exportCsv") { function "exportCsv" tag "exportCsv" @@ -230,6 +281,7 @@ nextflow_function { ) } } + test ("Test checkMetaChr") { function "checkMetaChr" tag "checkMetaChr" @@ -246,6 +298,7 @@ nextflow_function { assert function.success } } + test ("Test checkMetaChr warning") { function "checkMetaChr" tag "checkMetaChr" diff --git a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test.snap b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test.snap index 3af29bdc..e3783b01 100644 --- a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test.snap +++ b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test.snap @@ -23,14 +23,36 @@ }, "timestamp": "2024-07-12T17:12:47.079086374" }, - "Test checkFileIndex no error with empty channel": { - "content": null, - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-16T15:21:39.094768315" - }, + "Test checkFileIndex no error with empty channel": [ + [ + "execution_report_2024-10-30_19-25-14.html:md5,0408afe271d24e31dd2f938ceb002775", + "execution_report_2024-10-30_19-38-19.html:md5,996966d40531bca5f4174e67b2aded46", + "execution_report_2024-10-30_19-39-22.html:md5,89af7dc337cbf20552d6530628b674a1", + "execution_report_2024-10-30_19-39-54.html:md5,6642ccdf221c8708d0920556ac1aeaa8", + "execution_report_2024-10-30_19-55-01.html:md5,faa7e82970e070a11794eedf0750a8b5", + "execution_timeline_2024-10-30_19-25-14.html:md5,a88f63f076c61f10190f79f19f61a9a7", + "execution_timeline_2024-10-30_19-38-19.html:md5,2d8d5c4eea6aabe44cab6dca418bed13", + "execution_timeline_2024-10-30_19-39-22.html:md5,3b5b6a61710e2f3bd48447fbc34523d9", + "execution_timeline_2024-10-30_19-39-54.html:md5,9b6c81942a9cee82f4dc4e3c7e27f2a4", + "execution_timeline_2024-10-30_19-55-01.html:md5,af07d7da37af25a494643c349b7b6fe6", + "execution_trace_2024-10-30_19-25-14.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", + "execution_trace_2024-10-30_19-26-48.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", + "execution_trace_2024-10-30_19-27-31.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", + "execution_trace_2024-10-30_19-30-06.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", + "execution_trace_2024-10-30_19-30-29.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", + "execution_trace_2024-10-30_19-31-50.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", + "execution_trace_2024-10-30_19-34-57.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", + "execution_trace_2024-10-30_19-38-19.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", + "execution_trace_2024-10-30_19-39-22.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", + "execution_trace_2024-10-30_19-39-54.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", + "execution_trace_2024-10-30_19-55-01.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", + "pipeline_dag_2024-10-30_19-25-14.html:md5,21fd28764a0974f8d3d912e6ca1c494d", + "pipeline_dag_2024-10-30_19-38-19.html:md5,21fd28764a0974f8d3d912e6ca1c494d", + "pipeline_dag_2024-10-30_19-39-22.html:md5,21fd28764a0974f8d3d912e6ca1c494d", + "pipeline_dag_2024-10-30_19-39-54.html:md5,21fd28764a0974f8d3d912e6ca1c494d", + "pipeline_dag_2024-10-30_19-55-01.html:md5,21fd28764a0974f8d3d912e6ca1c494d" + ] + ], "Test validateInputBatchTools only one vcf": { "content": [ [ @@ -43,25 +65,59 @@ }, "timestamp": "2024-10-16T20:08:33.571723823" }, - "Test Function exportCsv": { - "content": null, + "Test Function exportCsv": [ + [ + "execution_report_2024-10-30_19-25-14.html:md5,0408afe271d24e31dd2f938ceb002775", + "execution_report_2024-10-30_19-38-19.html:md5,996966d40531bca5f4174e67b2aded46", + "execution_report_2024-10-30_19-39-22.html:md5,89af7dc337cbf20552d6530628b674a1", + "execution_report_2024-10-30_19-39-54.html:md5,6642ccdf221c8708d0920556ac1aeaa8", + "execution_report_2024-10-30_19-55-01.html:md5,faa7e82970e070a11794eedf0750a8b5", + "execution_timeline_2024-10-30_19-25-14.html:md5,a88f63f076c61f10190f79f19f61a9a7", + "execution_timeline_2024-10-30_19-38-19.html:md5,2d8d5c4eea6aabe44cab6dca418bed13", + "execution_timeline_2024-10-30_19-39-22.html:md5,3b5b6a61710e2f3bd48447fbc34523d9", + "execution_timeline_2024-10-30_19-39-54.html:md5,9b6c81942a9cee82f4dc4e3c7e27f2a4", + "execution_timeline_2024-10-30_19-55-01.html:md5,af07d7da37af25a494643c349b7b6fe6", + "execution_trace_2024-10-30_19-25-14.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", + "execution_trace_2024-10-30_19-26-48.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", + "execution_trace_2024-10-30_19-27-31.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", + "execution_trace_2024-10-30_19-30-06.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", + "execution_trace_2024-10-30_19-30-29.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", + "execution_trace_2024-10-30_19-31-50.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", + "execution_trace_2024-10-30_19-34-57.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", + "execution_trace_2024-10-30_19-38-19.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", + "execution_trace_2024-10-30_19-39-22.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", + "execution_trace_2024-10-30_19-39-54.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", + "execution_trace_2024-10-30_19-55-01.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", + "pipeline_dag_2024-10-30_19-25-14.html:md5,21fd28764a0974f8d3d912e6ca1c494d", + "pipeline_dag_2024-10-30_19-38-19.html:md5,21fd28764a0974f8d3d912e6ca1c494d", + "pipeline_dag_2024-10-30_19-39-22.html:md5,21fd28764a0974f8d3d912e6ca1c494d", + "pipeline_dag_2024-10-30_19-39-54.html:md5,21fd28764a0974f8d3d912e6ca1c494d", + "pipeline_dag_2024-10-30_19-55-01.html:md5,21fd28764a0974f8d3d912e6ca1c494d" + ] + ], + "Test validateInputBatchTools vcf only for glimpse": { + "content": [ + [ + "Stitch or Quilt software cannot run with VCF or BCF files. Please provide alignment files (i.e. BAM or CRAM)." + ] + ], "meta": { "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nextflow": "24.04.4" }, - "timestamp": "2024-07-10T16:27:29.128695884" + "timestamp": "2024-10-16T20:20:28.177195568" }, - "Test validateInputBatchTools vcf only for glimpse": { + "Test getFileExtension empty list": { "content": [ [ - "Stitch or Quilt software cannot run with VCF or BCF files. Please provide alignment files (i.e. BAM or CRAM)." + ] ], "meta": { "nf-test": "0.8.4", "nextflow": "24.04.4" }, - "timestamp": "2024-10-16T20:20:28.177195568" + "timestamp": "2024-10-30T20:00:55.32420517" }, "Test validateInputBatchTools error batch": { "content": [ diff --git a/test.nf b/test.nf new file mode 100644 index 00000000..e84c3ed7 --- /dev/null +++ b/test.nf @@ -0,0 +1,15 @@ +include { getFileExtension } from './subworkflows/local/utils_nfcore_phaseimpute_pipeline' + +workflow { + ext_array = getFileExtension([ file(params.pipelines_testdata_base_path + "hum_data/panel/chr21/1000GP.chr21.s.norel.vcf.gz", checkIfExists: true)]) + ext_file = getFileExtension(file(params.pipelines_testdata_base_path + "hum_data/panel/chr21/1000GP.chr21.s.norel.vcf.gz", checkIfExists: true)) + ext_empty = getFileExtension([ ]) + ext_string = getFileExtension(params.pipelines_testdata_base_path + "hum_data/panel/chr21/1000GP.chr21.s.norel.vcf.gz") + ext_array2 = getFileExtension([params.pipelines_testdata_base_path + "hum_data/panel/chr21/1000GP.chr21.s.norel.vcf.gz", params.pipelines_testdata_base_path + "hum_data/panel/chr21/1000GP.chr21.s.norel.vcf.gz"]) + + println ext_array + println ext_file + println ext_empty + println ext_string + println ext_array2 +} From 94befe0183be7d88b86ebad5c593000b6f3a0221 Mon Sep 17 00:00:00 2001 From: Louis Le Nezet Date: Thu, 31 Oct 2024 09:40:09 +0100 Subject: [PATCH 06/32] Deactivate features in fulltest --- conf/test_full.config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/test_full.config b/conf/test_full.config index fa1e3475..2a911813 100644 --- a/conf/test_full.config +++ b/conf/test_full.config @@ -35,10 +35,10 @@ params { // Panelprep optional args remove_samples = "NA12878,NA12891,NA12892" - normalize = true - compute_freq = true - phase = true + normalize = false + compute_freq = false + phase = false // Impute tools - tools = "glimpse1" + tools = "glimpse2" } From 33375b39502c18fefaac65eddb4e00b76e27eca1 Mon Sep 17 00:00:00 2001 From: Louis Le Nezet Date: Thu, 31 Oct 2024 10:36:32 +0100 Subject: [PATCH 07/32] Fix nf-test of stitch sbwf --- .../bam_impute_stitch/tests/main.nf.test | 50 +++++++++---------- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/subworkflows/local/bam_impute_stitch/tests/main.nf.test b/subworkflows/local/bam_impute_stitch/tests/main.nf.test index 676ce00b..b4438641 100644 --- a/subworkflows/local/bam_impute_stitch/tests/main.nf.test +++ b/subworkflows/local/bam_impute_stitch/tests/main.nf.test @@ -16,12 +16,14 @@ nextflow_workflow { tag "bcftools_index" test("Prepare input stitch") { - setup { - run("PREPARE_INPUT_STITCH") { - script "../../prepare_input_stitch/main.nf" - process { - """ - input[0] = Channel.fromList([ + when { + params { + max_cpus = 2 + max_memory = '2.GB' + } + workflow { + """ + ch_samples = Channel.fromList([ [ [id: "NA12878"], file(params.pipelines_testdata_base_path + "hum_data/individuals/NA12878/NA12878.s.bam", checkIfExist:true), @@ -33,27 +35,21 @@ nextflow_workflow { file(params.pipelines_testdata_base_path + "hum_data/individuals/NA19401/NA19401.s.bam.bai", checkIfExist:true), ], ]) - input[1] = Channel.of([ - [id: "1000GP", chr: "chr22"], - file(params.pipelines_testdata_base_path + "hum_data/panel/chr22/1000GP.chr22.legend.gz", checkIfExist:true) - ]).collect() - input[2] = Channel.of([ - [chr: "chr22", region: "chr22:16570000-16610000"], "chr22:16570000-16610000" - ]).collect() - """ - } - } - } - when { - params { - max_cpus = 2 - max_memory = '2.GB' - } - workflow { - """ - input[0] = PREPARE_INPUT_STITCH.out.stitch_samples - input[1] = PREPARE_INPUT_STITCH.out.stitch_parameters - input[2] = Channel.of([ + bamlist = Channel.of("NA12878.s.bam", "NA19401.s.bam").collectFile(name: "bamlist") + + ch_posfile = Channel.of([ + [id: "1000GP", chr: "chr22"], + file(params.pipelines_testdata_base_path + "hum_data/panel/chr22/1000GP.chr22.legend.gz", checkIfExist:true) + ]) + + ch_region = Channel.of([ + [chr: "chr22", region: "chr22:16570000-16610000"], "chr22:16570000-16610000" + ]) + + input[0] = ch_samples.combine(bamlist) + input[1] = ch_posfile + input[2] = ch_region + input[3] = Channel.of([ [id: "GRCh38"], file(params.pipelines_testdata_base_path + "hum_data/reference_genome/GRCh38.s.fa.gz", checkIfExist:true), file(params.pipelines_testdata_base_path + "hum_data/reference_genome/GRCh38.s.fa.gz.fai", checkIfExist:true), From 92dc6fd43790781246202f9b0642739789dfc259 Mon Sep 17 00:00:00 2001 From: Louis Le Nezet Date: Thu, 31 Oct 2024 10:38:21 +0100 Subject: [PATCH 08/32] Change nf-test --- .../tests/function.nf.test | 12 +++++++----- test.nf | 15 --------------- 2 files changed, 7 insertions(+), 20 deletions(-) delete mode 100644 test.nf diff --git a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test index b70edbe4..afc4d27a 100644 --- a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test +++ b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test @@ -38,7 +38,8 @@ nextflow_function { then { assertAll( { assert function.success }, - { assert function.result == ['vcf', 'txt'] } + { assert function.result == ['vcf', 'txt'] }, + { assert snapshot(function.result).match() } ) } } @@ -275,10 +276,11 @@ nextflow_function { } then { - assertAll( - { assert function.success }, - { assert snapshot(function.result).match() } - ) + with(function) { + println result + assert success + assert snapshot(result).match() + } } } diff --git a/test.nf b/test.nf deleted file mode 100644 index e84c3ed7..00000000 --- a/test.nf +++ /dev/null @@ -1,15 +0,0 @@ -include { getFileExtension } from './subworkflows/local/utils_nfcore_phaseimpute_pipeline' - -workflow { - ext_array = getFileExtension([ file(params.pipelines_testdata_base_path + "hum_data/panel/chr21/1000GP.chr21.s.norel.vcf.gz", checkIfExists: true)]) - ext_file = getFileExtension(file(params.pipelines_testdata_base_path + "hum_data/panel/chr21/1000GP.chr21.s.norel.vcf.gz", checkIfExists: true)) - ext_empty = getFileExtension([ ]) - ext_string = getFileExtension(params.pipelines_testdata_base_path + "hum_data/panel/chr21/1000GP.chr21.s.norel.vcf.gz") - ext_array2 = getFileExtension([params.pipelines_testdata_base_path + "hum_data/panel/chr21/1000GP.chr21.s.norel.vcf.gz", params.pipelines_testdata_base_path + "hum_data/panel/chr21/1000GP.chr21.s.norel.vcf.gz"]) - - println ext_array - println ext_file - println ext_empty - println ext_string - println ext_array2 -} From 640d11a9827a73f1689836d5a96d5ee735ac629d Mon Sep 17 00:00:00 2001 From: Louis Le Nezet Date: Thu, 31 Oct 2024 13:21:41 +0100 Subject: [PATCH 09/32] Fix snapshot --- .../tests/function.nf.test.snap | 73 ++++--------------- 1 file changed, 13 insertions(+), 60 deletions(-) diff --git a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test.snap b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test.snap index e3783b01..2e183c6c 100644 --- a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test.snap +++ b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test.snap @@ -23,36 +23,6 @@ }, "timestamp": "2024-07-12T17:12:47.079086374" }, - "Test checkFileIndex no error with empty channel": [ - [ - "execution_report_2024-10-30_19-25-14.html:md5,0408afe271d24e31dd2f938ceb002775", - "execution_report_2024-10-30_19-38-19.html:md5,996966d40531bca5f4174e67b2aded46", - "execution_report_2024-10-30_19-39-22.html:md5,89af7dc337cbf20552d6530628b674a1", - "execution_report_2024-10-30_19-39-54.html:md5,6642ccdf221c8708d0920556ac1aeaa8", - "execution_report_2024-10-30_19-55-01.html:md5,faa7e82970e070a11794eedf0750a8b5", - "execution_timeline_2024-10-30_19-25-14.html:md5,a88f63f076c61f10190f79f19f61a9a7", - "execution_timeline_2024-10-30_19-38-19.html:md5,2d8d5c4eea6aabe44cab6dca418bed13", - "execution_timeline_2024-10-30_19-39-22.html:md5,3b5b6a61710e2f3bd48447fbc34523d9", - "execution_timeline_2024-10-30_19-39-54.html:md5,9b6c81942a9cee82f4dc4e3c7e27f2a4", - "execution_timeline_2024-10-30_19-55-01.html:md5,af07d7da37af25a494643c349b7b6fe6", - "execution_trace_2024-10-30_19-25-14.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", - "execution_trace_2024-10-30_19-26-48.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", - "execution_trace_2024-10-30_19-27-31.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", - "execution_trace_2024-10-30_19-30-06.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", - "execution_trace_2024-10-30_19-30-29.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", - "execution_trace_2024-10-30_19-31-50.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", - "execution_trace_2024-10-30_19-34-57.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", - "execution_trace_2024-10-30_19-38-19.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", - "execution_trace_2024-10-30_19-39-22.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", - "execution_trace_2024-10-30_19-39-54.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", - "execution_trace_2024-10-30_19-55-01.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", - "pipeline_dag_2024-10-30_19-25-14.html:md5,21fd28764a0974f8d3d912e6ca1c494d", - "pipeline_dag_2024-10-30_19-38-19.html:md5,21fd28764a0974f8d3d912e6ca1c494d", - "pipeline_dag_2024-10-30_19-39-22.html:md5,21fd28764a0974f8d3d912e6ca1c494d", - "pipeline_dag_2024-10-30_19-39-54.html:md5,21fd28764a0974f8d3d912e6ca1c494d", - "pipeline_dag_2024-10-30_19-55-01.html:md5,21fd28764a0974f8d3d912e6ca1c494d" - ] - ], "Test validateInputBatchTools only one vcf": { "content": [ [ @@ -65,36 +35,6 @@ }, "timestamp": "2024-10-16T20:08:33.571723823" }, - "Test Function exportCsv": [ - [ - "execution_report_2024-10-30_19-25-14.html:md5,0408afe271d24e31dd2f938ceb002775", - "execution_report_2024-10-30_19-38-19.html:md5,996966d40531bca5f4174e67b2aded46", - "execution_report_2024-10-30_19-39-22.html:md5,89af7dc337cbf20552d6530628b674a1", - "execution_report_2024-10-30_19-39-54.html:md5,6642ccdf221c8708d0920556ac1aeaa8", - "execution_report_2024-10-30_19-55-01.html:md5,faa7e82970e070a11794eedf0750a8b5", - "execution_timeline_2024-10-30_19-25-14.html:md5,a88f63f076c61f10190f79f19f61a9a7", - "execution_timeline_2024-10-30_19-38-19.html:md5,2d8d5c4eea6aabe44cab6dca418bed13", - "execution_timeline_2024-10-30_19-39-22.html:md5,3b5b6a61710e2f3bd48447fbc34523d9", - "execution_timeline_2024-10-30_19-39-54.html:md5,9b6c81942a9cee82f4dc4e3c7e27f2a4", - "execution_timeline_2024-10-30_19-55-01.html:md5,af07d7da37af25a494643c349b7b6fe6", - "execution_trace_2024-10-30_19-25-14.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", - "execution_trace_2024-10-30_19-26-48.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", - "execution_trace_2024-10-30_19-27-31.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", - "execution_trace_2024-10-30_19-30-06.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", - "execution_trace_2024-10-30_19-30-29.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", - "execution_trace_2024-10-30_19-31-50.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", - "execution_trace_2024-10-30_19-34-57.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", - "execution_trace_2024-10-30_19-38-19.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", - "execution_trace_2024-10-30_19-39-22.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", - "execution_trace_2024-10-30_19-39-54.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", - "execution_trace_2024-10-30_19-55-01.txt:md5,8ad4a81ac400f067841cbfb3f18e6889", - "pipeline_dag_2024-10-30_19-25-14.html:md5,21fd28764a0974f8d3d912e6ca1c494d", - "pipeline_dag_2024-10-30_19-38-19.html:md5,21fd28764a0974f8d3d912e6ca1c494d", - "pipeline_dag_2024-10-30_19-39-22.html:md5,21fd28764a0974f8d3d912e6ca1c494d", - "pipeline_dag_2024-10-30_19-39-54.html:md5,21fd28764a0974f8d3d912e6ca1c494d", - "pipeline_dag_2024-10-30_19-55-01.html:md5,21fd28764a0974f8d3d912e6ca1c494d" - ] - ], "Test validateInputBatchTools vcf only for glimpse": { "content": [ [ @@ -107,6 +47,19 @@ }, "timestamp": "2024-10-16T20:20:28.177195568" }, + "Test getFileExtension non empty list": { + "content": [ + [ + "vcf", + "txt" + ] + ], + "meta": { + "nf-test": "0.9.1", + "nextflow": "24.10.0" + }, + "timestamp": "2024-10-31T13:15:08.856706046" + }, "Test getFileExtension empty list": { "content": [ [ From b45b139f1d16bb827f32b53750d738abca8e1ac7 Mon Sep 17 00:00:00 2001 From: Louis Le Nezet Date: Thu, 31 Oct 2024 20:04:12 +0100 Subject: [PATCH 10/32] Fix linting --- modules/local/bam_chr_extract/main.nf | 1 - modules/local/vcf_chr_extract/main.nf | 1 - .../local/bam_chr_rename_samtools/main.nf | 1 + subworkflows/local/bam_impute_quilt/main.nf | 6 +++--- subworkflows/local/bam_impute_stitch/main.nf | 6 +++--- .../utils_nfcore_chrcheck_pipeline/main.nf | 20 +++++++++---------- .../utils_nfcore_phaseimpute_pipeline/main.nf | 18 ++++++++--------- workflows/chrcheck/main.nf | 4 ++-- 8 files changed, 28 insertions(+), 29 deletions(-) diff --git a/modules/local/bam_chr_extract/main.nf b/modules/local/bam_chr_extract/main.nf index 4a83b579..b82f59b8 100644 --- a/modules/local/bam_chr_extract/main.nf +++ b/modules/local/bam_chr_extract/main.nf @@ -35,7 +35,6 @@ process BAM_CHR_EXTRACT { """ stub: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ touch ${prefix}.txt diff --git a/modules/local/vcf_chr_extract/main.nf b/modules/local/vcf_chr_extract/main.nf index 0c50cb25..56d796d1 100644 --- a/modules/local/vcf_chr_extract/main.nf +++ b/modules/local/vcf_chr_extract/main.nf @@ -36,7 +36,6 @@ process VCF_CHR_EXTRACT { """ stub: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ touch ${prefix}.txt diff --git a/subworkflows/local/bam_chr_rename_samtools/main.nf b/subworkflows/local/bam_chr_rename_samtools/main.nf index 45435904..dbf1d6a3 100644 --- a/subworkflows/local/bam_chr_rename_samtools/main.nf +++ b/subworkflows/local/bam_chr_rename_samtools/main.nf @@ -13,6 +13,7 @@ workflow BAM_CHR_RENAME_SAMTOOLS { SAMTOOLS_REHEADER( ch_bam.map{ meta, bam, index, prefix -> + def cmd = "" if (prefix == "nochr") { cmd = 'sed -E "s/^(@SQ.*\\tSN:)chr/\\1/"' } else if (prefix == "chr") { diff --git a/subworkflows/local/bam_impute_quilt/main.nf b/subworkflows/local/bam_impute_quilt/main.nf index c15555a9..94c891aa 100644 --- a/subworkflows/local/bam_impute_quilt/main.nf +++ b/subworkflows/local/bam_impute_quilt/main.nf @@ -18,12 +18,12 @@ workflow BAM_IMPUTE_QUILT { posfile_phasefile = [[id: null], posfile, phasefile] genetic_map_file = [] - ngen = params.ngen - buffer = params.buffer + ngen_params = params.ngen + buffer_params = params.buffer ch_hap_chunks = ch_hap_legend .combine(ch_chunks, by:0) - .map { it + ngen + buffer + [[]] } + .map { it + ngen_params + buffer_params + [[]] } if (!genetic_map_file.isEmpty()) { // Add genetic map file (untested) diff --git a/subworkflows/local/bam_impute_stitch/main.nf b/subworkflows/local/bam_impute_stitch/main.nf index 7e67d652..5a099a64 100644 --- a/subworkflows/local/bam_impute_stitch/main.nf +++ b/subworkflows/local/bam_impute_stitch/main.nf @@ -19,8 +19,8 @@ workflow BAM_IMPUTE_STITCH { // Value channels def input_empty = [[]] def rdata_empty = [[]] - k_val = params.k_val - ngen = params.ngen + k_val_params = params.k_val + ngen_params = params.ngen // Transform posfile to TSV with ',' GAWK(ch_posfile, []) @@ -38,7 +38,7 @@ workflow BAM_IMPUTE_STITCH { ch_parameters = ch_posfile .map { it + input_empty + rdata_empty} .join(ch_chromosomes) - .map { it + k_val + ngen} + .map { it + k_val_params + ngen_params} .map { metaC, metaPC, posfile, input, rdata, chr, k_val, ngen -> [metaPC, posfile, input, rdata, chr, k_val, ngen] } diff --git a/subworkflows/local/utils_nfcore_chrcheck_pipeline/main.nf b/subworkflows/local/utils_nfcore_chrcheck_pipeline/main.nf index 1850b518..0c1c7c67 100644 --- a/subworkflows/local/utils_nfcore_chrcheck_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_chrcheck_pipeline/main.nf @@ -2,7 +2,7 @@ // Check if the contig names in the input files match the reference contig names. // def checkChr(ch_chr, ch_input){ - chr_checked = ch_chr + def chr_checked = ch_chr .combine(ch_input, by:0) .map{meta, chr, file, index, lst -> [ @@ -12,9 +12,9 @@ def checkChr(ch_chr, ch_input){ ] } .branch{ meta, file, index, chr, lst -> - lst_diff = diffChr(chr, lst, file) - diff = lst_diff[0] - prefix = lst_diff[1] + def lst_diff = diffChr(chr, lst, file) + def diff = lst_diff[0] + def prefix = lst_diff[1] no_rename: diff.size() == 0 return [meta, file, index] to_rename: true @@ -27,12 +27,12 @@ def checkChr(ch_chr, ch_input){ // Check if the contig names can be solved by adding/removing the `chr` prefix. // def diffChr(chr_target, chr_ref, file) { - diff = chr_ref - chr_target - prefix = (chr_ref - chr_target) =~ "chr" ? "chr" : "nochr" + def diff = chr_ref - chr_target + def prefix = (chr_ref - chr_target) =~ "chr" ? "chr" : "nochr" if (diff.size() != 0) { // Ensure that by adding/removing the prefix we can solve the problem - new_chr = [] - to_rename = [] + def new_chr = [] + def to_rename = [] if (prefix == "chr") { chr_target.each{ new_chr += "chr${it}" } diff.each{ to_rename += it.replace('chr', '') } @@ -40,9 +40,9 @@ def diffChr(chr_target, chr_ref, file) { chr_target.each{ new_chr += it.replace('chr', '') } diff.each{ to_rename += "chr${it}" } } - new_diff = diff - new_chr + def new_diff = diff - new_chr if (new_diff.size() != 0) { - chr_names = new_diff.size() > params.max_chr_names ? new_diff[0..params.max_chr_names - 1] + ['...'] : new_diff + def chr_names = new_diff.size() > params.max_chr_names ? new_diff[0..params.max_chr_names - 1] + ['...'] : new_diff error "Contig names: ${chr_names} absent from file: ${file} and cannot be solved by adding or removing the `chr` prefix." } diff = to_rename diff --git a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf index 677b3984..a51df898 100644 --- a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf @@ -351,40 +351,40 @@ workflow PIPELINE_COMPLETION { def validateInputParameters() { genomeExistsError() // Check that only genome or fasta is provided - assert params.genome == null || params.fasta == null, "Either --genome or --fasta must be provided" - assert !(params.genome == null && params.fasta == null), "Only one of --genome or --fasta must be provided" + assert (params.genome == null || params.fasta == null) : "Either --genome or --fasta must be provided" + assert !(params.genome == null && params.fasta == null) : "Only one of --genome or --fasta must be provided" // Check that a steps is provided - assert params.steps, "A step must be provided" + assert params.steps : "A step must be provided" // Check that at least one tool is provided if (params.steps.split(',').contains("impute")) { - assert params.tools, "No tools provided" + assert params.tools : "No tools provided" } // Check that input is provided for all steps, except panelprep if (params.steps.split(',').contains("all") || params.steps.split(',').contains("impute") || params.steps.split(',').contains("simulate") || params.steps.split(',').contains("validate")) { - assert params.input, "No input provided" + assert params.input : "No input provided" } // Check that posfile and chunks are provided when running impute only. Steps with panelprep generate those files. if (params.steps.split(',').contains("impute") && !params.steps.split(',').find { it in ["all", "panelprep"] }) { // Required by all tools except glimpse2 if (!params.tools.split(',').find { it in ["glimpse2"] }) { - assert params.posfile, "No --posfile provided for --steps impute" + assert params.posfile : "No --posfile provided for --steps impute" } // Required by all tools except STITCH if (params.tools != "stitch") { - assert params.chunks, "No --chunks provided for --steps impute" + assert params.chunks : "No --chunks provided for --steps impute" } // Required by GLIMPSE1 and GLIMPSE2 only if (params.tools.split(',').contains("glimpse")) { - assert params.panel, "No --panel provided for imputation with GLIMPSE" + assert params.panel : "No --panel provided for imputation with GLIMPSE" } // Check that input_truth is provided when running validate if (params.steps.split(',').find { it in ["all", "validate"] } ) { - assert params.input_truth, "No --input_truth was provided for --steps validate" + assert params.input_truth : "No --input_truth was provided for --steps validate" } } diff --git a/workflows/chrcheck/main.nf b/workflows/chrcheck/main.nf index f193e91c..1f375c6a 100644 --- a/workflows/chrcheck/main.nf +++ b/workflows/chrcheck/main.nf @@ -58,11 +58,11 @@ workflow CHRCHECK { ch_vcf_renamed = VCF_CHR_RENAME_BCFTOOLS.out.vcf_renamed } else { chr_vcf_disjoint.to_rename.map { - chr_names = it[3].size() > params.max_chr_names ? it[3][0..params.max_chr_names - 1] + ['...'] : it[3] + def chr_names = it[3].size() > params.max_chr_names ? it[3][0..params.max_chr_names - 1] + ['...'] : it[3] error "Contig names: ${chr_names} in VCF: ${it[1]} are not present in reference genome with same writing. Please set `rename_chr` to `true` to rename the contigs." } chr_bam_disjoint.to_rename.map { - chr_names = it[3].size() > params.max_chr_names ? it[3][0..params.max_chr_names - 1] + ['...'] : it[3] + def chr_names = it[3].size() > params.max_chr_names ? it[3][0..params.max_chr_names - 1] + ['...'] : it[3] error "Contig names: ${chr_names} in BAM: ${it[1]} are not present in reference genome with same writing. Please set `rename_chr` to `true` to rename the contigs." } ch_vcf_renamed = Channel.empty() From f28ccb2686c60cdc5746fd826f0ed444032a2c8e Mon Sep 17 00:00:00 2001 From: Louis Le Nezet Date: Tue, 5 Nov 2024 21:11:49 +0100 Subject: [PATCH 11/32] Fix link in usage.md --- docs/usage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage.md b/docs/usage.md index 0b756876..9a5dbd26 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -278,7 +278,7 @@ For starting from the imputation steps, the required flags are: Here is a representation on how the input files will be processed depending on the input files type and the selected imputation tool. -[![InputSoftwareCompatibility](images/InputSoftware_compatibility.png)](images/InputSoftware_compatibility.png) +![InputSoftwareCompatibility](images/InputSoftware_compatibility.png) #### Argument `--batch_size` From d3844b3fd13c0b9bf501c6191aaefcd5ba633a1a Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Wed, 6 Nov 2024 13:12:34 +0100 Subject: [PATCH 12/32] Update language server --- CHANGELOG.md | 1 + .../local/bam_downsample_samtools/main.nf | 2 +- subworkflows/local/bam_gl_bcftools/main.nf | 2 +- subworkflows/local/bam_impute_stitch/main.nf | 4 +- .../utils_nfcore_phaseimpute_pipeline/main.nf | 45 +++++++++---------- .../local/vcf_chr_rename_bcftools/main.nf | 6 +-- subworkflows/local/vcf_chunk_glimpse/main.nf | 2 +- .../local/vcf_concordance_glimpse2/main.nf | 16 +++---- .../local/vcf_impute_glimpse1/main.nf | 3 +- .../local/vcf_normalize_bcftools/main.nf | 2 +- subworkflows/local/vcf_phase_shapeit5/main.nf | 9 ++-- .../local/vcf_sites_extract_bcftools/main.nf | 2 +- workflows/chrcheck/main.nf | 6 +-- workflows/phaseimpute/main.nf | 7 ++- 14 files changed, 50 insertions(+), 57 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 042b1474..dfd8e9eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,6 +64,7 @@ Initial release of nf-core/phaseimpute, created with the [nf-core](https://nf-co - [#148](https://github.com/nf-core/phaseimpute/pull/148) - Fix awsfulltest github action for manual dispatch - [#149](https://github.com/nf-core/phaseimpute/pull/149) - Remove the map file from the awsfulltest - [#152](https://github.com/nf-core/phaseimpute/pull/152) - Fix URLs in the documentation and remove tools citation in the README, use a white background for all images in the documentation. +- [#153](https://github.com/nf-core/phaseimpute/pull/153) - Remove normalisation, frequency commputation and phasing from full test to reduce cost and computational time. Fix image in `usage.md`. Fix small warnings and errors with updated language server. `def` has been added when necesary, `:` use instead of `,` in assertions, `_` added to variables not used in closures, `for` loop replaced by `.each{}`, remove unused code / input ### `Fixed` diff --git a/subworkflows/local/bam_downsample_samtools/main.nf b/subworkflows/local/bam_downsample_samtools/main.nf index 9aaa0f65..304a5a92 100644 --- a/subworkflows/local/bam_downsample_samtools/main.nf +++ b/subworkflows/local/bam_downsample_samtools/main.nf @@ -35,7 +35,7 @@ workflow BAM_DOWNSAMPLE_SAMTOOLS { // Add all necessary channel for downsampling ch_input_downsample = ch_bam .combine(ch_depth_factor, by : 0) - .map{ metaICR, bam, index, metaICRD, depth -> + .map{ _metaICR, bam, index, metaICRD, depth -> [ metaICRD, bam, index, [], depth ] } diff --git a/subworkflows/local/bam_gl_bcftools/main.nf b/subworkflows/local/bam_gl_bcftools/main.nf index 4fd140bb..5b0d9b0d 100644 --- a/subworkflows/local/bam_gl_bcftools/main.nf +++ b/subworkflows/local/bam_gl_bcftools/main.nf @@ -26,7 +26,7 @@ workflow BAM_GL_BCFTOOLS { ch_mpileup = ch_bam .combine(TABIX_BGZIP.out.output) - .map{metaI, bam, bai, metaPC, tsv -> + .map{metaI, bam, _bai, metaPC, tsv -> [metaI + ["panel": metaPC.id, "chr": metaPC.chr], bam, tsv] } diff --git a/subworkflows/local/bam_impute_stitch/main.nf b/subworkflows/local/bam_impute_stitch/main.nf index 5a099a64..b5cc4162 100644 --- a/subworkflows/local/bam_impute_stitch/main.nf +++ b/subworkflows/local/bam_impute_stitch/main.nf @@ -32,14 +32,14 @@ workflow BAM_IMPUTE_STITCH { // Get chromosomes of fasta ch_chromosomes = ch_region - .map{metaCR, region -> [[chr: metaCR.chr], metaCR.chr]} + .map{metaCR, _region -> [[chr: metaCR.chr], metaCR.chr]} // Make final channel with parameters ch_parameters = ch_posfile .map { it + input_empty + rdata_empty} .join(ch_chromosomes) .map { it + k_val_params + ngen_params} - .map { metaC, metaPC, posfile, input, rdata, chr, k_val, ngen -> + .map { _metaC, metaPC, posfile, input, rdata, chr, k_val, ngen -> [metaPC, posfile, input, rdata, chr, k_val, ngen] } diff --git a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf index a51df898..97cb7f2c 100644 --- a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf @@ -30,10 +30,10 @@ workflow PIPELINE_INITIALISATION { take: version // boolean: Display version and exit validate_params // boolean: Boolean whether to validate parameters against the schema at runtime - monochrome_logs // boolean: Do not use coloured log outputs + _monochrome_logs // boolean: Do not use coloured log outputs nextflow_cli_args // array: List of positional nextflow CLI args outdir // string: The output directory where the results will be saved - input // string: Path to input samplesheet + _input // string: Path to input samplesheet main: @@ -191,7 +191,7 @@ workflow PIPELINE_INITIALISATION { } } else { ch_map = ch_regions - .map{ metaCR, regions -> [metaCR.subMap("chr"), []] } + .map{ metaCR, _regions -> [metaCR.subMap("chr"), []] } } // @@ -244,7 +244,7 @@ workflow PIPELINE_INITIALISATION { // Check contigs name in different meta map // // Collect all chromosomes names in all different inputs - chr_ref = ch_ref_gen.map { meta, fasta, fai -> [fai.readLines()*.split('\t').collect{it[0]}] } + chr_ref = ch_ref_gen.map { _meta, _fasta, fai_file -> [fai_file.readLines()*.split('\t').collect{it[0]}] } chr_regions = extractChr(ch_regions) // Check that the chromosomes names that will be used are all present in different inputs @@ -260,15 +260,15 @@ workflow PIPELINE_INITIALISATION { .toList() .subscribe{ chr -> if (chr.size() > 0) { - chr_names = chr.size() > params.max_chr_names ? chr[0..params.max_chr_names - 1] + ['...'] : chr + def chr_names = chr.size() > params.max_chr_names ? chr[0..params.max_chr_names - 1] + ['...'] : chr log.warn "The following contigs are absent from at least one file : ${chr_names} and therefore won't be used" } } ch_regions = ch_regions .combine(chr_all_mis.toList()) - .filter { meta, regions, chr_mis -> + .filter { meta, _regions, chr_mis -> !(meta.chr in chr_mis) } - .map { meta, regions, chr_mis -> [meta, regions] } + .map { meta, regions, _chr_mis -> [meta, regions] } .ifEmpty { error "No regions left to process" } ch_regions @@ -427,7 +427,7 @@ def validateInputBatchTools(ch_input, batch_size, extension, tools) { if (nb_input > batch_size) { if (tools.contains("glimpse2") || tools.contains("quilt")) { - log.warn("Glimpse2 or Quilt software is selected and the number of input files (${nb_input}) is less than the batch size (${batch_size}). The input files will be processed in ${(int) Math.ceil(nb_input / batch_size)} batches.") + log.warn("Glimpse2 or Quilt software is selected and the number of input files (${nb_input}) is less than the batch size (${batch_size}). The input files will be processed in ${Math.ceil(nb_input / batch_size) as int} batches.") } if (tools.contains("stitch") || tools.contains("glimpse1")) { error "Stitch or Glimpse1 software is selected and the number of input files (${nb_input}) is less than the batch size (${batch_size}). Splitting the input files in batches would induce batch effect." @@ -441,20 +441,20 @@ def validateInputBatchTools(ch_input, batch_size, extension, tools) { // def validatePosfileTools(ch_posfile, tools, steps){ ch_posfile - .map{ meta, vcf, index, hap, legend -> + .map{ _meta, vcf, index, hap, legend -> if (tools.contains("glimpse1")) { - assert legend, "Glimpse1 tool needs a legend file provided in the posfile. This file can be created through the panelprep step." + assert legend : "Glimpse1 tool needs a legend file provided in the posfile. This file can be created through the panelprep step." } if (tools.contains("stitch")) { - assert legend, "Stitch tool needs a legend file provided in the posfile. This file can be created through the panelprep step." + assert legend : "Stitch tool needs a legend file provided in the posfile. This file can be created through the panelprep step." } if (tools.contains("quilt")) { - assert legend, "Quilt tool needs a legend file provided in the posfile. This file can be created through the panelprep step." - assert hap, "Quilt tool needs a hap file provided in the posfile. This file can be created through the panelprep step." + assert legend : "Quilt tool needs a legend file provided in the posfile. This file can be created through the panelprep step." + assert hap : "Quilt tool needs a hap file provided in the posfile. This file can be created through the panelprep step." } if (steps.contains("validate")) { - assert vcf, "Validation step needs a vcf file provided in the posfile for the allele frequency. This file can be created through the panelprep step." - assert index, "Validation step needs an index file provided in the posfile for the allele frequency. This file can be created through the panelprep step." + assert vcf : "Validation step needs a vcf file provided in the posfile for the allele frequency. This file can be created through the panelprep step." + assert index : "Validation step needs an index file provided in the posfile for the allele frequency. This file can be created through the panelprep step." } } } @@ -473,13 +473,13 @@ def extractChr(ch_input) { // Give back the intersection of a and b // def checkMetaChr(chr_a, chr_b, name){ - intersect = chr_a + def intersect = chr_a .combine(chr_b) .map{ a, b -> if (b != [[]] && !(a - b).isEmpty()) { - chr_names = (a - b).size() > params.max_chr_names ? (a - b)[0..params.max_chr_names - 1] + ['...'] : (a - b) - verb = (a - b).size() == 1 ? "is" : "are" + def chr_names = (a - b).size() > params.max_chr_names ? (a - b)[0..params.max_chr_names - 1] + ['...'] : (a - b) + def verb = (a - b).size() == 1 ? "is" : "are" log.warn "Chr : ${chr_names} ${verb} missing from ${name}" return (a-b) } @@ -492,13 +492,10 @@ def checkMetaChr(chr_a, chr_b, name){ // // Get file extension // -import nextflow.file.http.XPath -import java.nio.file.Path - def getFileExtension(file) { def file_name = "" - if (file instanceof Path || file instanceof XPath) { + if (file instanceof Path || file instanceof nextflow.file.http.XPath) { file_name = file.name } else if (file instanceof CharSequence) { file_name = file.toString() @@ -559,10 +556,10 @@ def exportCsv(ch_files, metas, header, name, outdir) { ch_files.collectFile(keepHeader: true, skip: 1, sort: true, storeDir: "${params.outdir}/${outdir}") { it -> def meta = "" def file = "" - for (i in metas) { + metas.each { i -> meta += "${it[0][i]}," } - for (i in it[1]) { + it[1].each { i -> file += "${params.outdir}/${i.value}/${it[i.key].fileName}," } file = file.substring(0, file.length() - 1) // remove last comma diff --git a/subworkflows/local/vcf_chr_rename_bcftools/main.nf b/subworkflows/local/vcf_chr_rename_bcftools/main.nf index 1cab311d..e10351c6 100644 --- a/subworkflows/local/vcf_chr_rename_bcftools/main.nf +++ b/subworkflows/local/vcf_chr_rename_bcftools/main.nf @@ -19,7 +19,7 @@ workflow VCF_CHR_RENAME_BCFTOOLS { // Generate the chromosome renaming file ch_rename_file = ch_vcf - .collectFile{ meta, vcf, index, diff, prefix -> + .collectFile{ meta, _vcf, _index, diff, prefix -> def chr = diff.collect { i -> prefix == "chr" ? "${i} chr${i}" : "${i} ${i.replace('chr', '')}" @@ -30,12 +30,12 @@ workflow VCF_CHR_RENAME_BCFTOOLS { // Add the chromosome renaming file to the input channel ch_annotate_input = ch_vcf.map { - meta, vcf, index, diff, prefix -> + meta, vcf, index, _diff, _prefix -> [[id: meta.id], meta, vcf, index] } // channel: [ [id], vcf, index ] .combine(ch_rename_file, by:0) .map { - metaI, meta, vcf, index, rename_file -> + _metaI, meta, vcf, index, rename_file -> [meta, vcf, index, [], [], [], rename_file] } diff --git a/subworkflows/local/vcf_chunk_glimpse/main.nf b/subworkflows/local/vcf_chunk_glimpse/main.nf index 457b0b1b..64ab8692 100644 --- a/subworkflows/local/vcf_chunk_glimpse/main.nf +++ b/subworkflows/local/vcf_chunk_glimpse/main.nf @@ -45,7 +45,7 @@ workflow VCF_CHUNK_GLIMPSE { } .join(ch_map) .map{ - metaC, metaPC, vcf, csi, chr, gmap -> [metaPC, vcf, csi, chr, gmap] + _metaC, metaPC, vcf, csi, chr, gmap -> [metaPC, vcf, csi, chr, gmap] } GLIMPSE2_CHUNK ( ch_input_glimpse2, chunk_model ) ch_versions = ch_versions.mix( GLIMPSE2_CHUNK.out.versions.first() ) diff --git a/subworkflows/local/vcf_concordance_glimpse2/main.nf b/subworkflows/local/vcf_concordance_glimpse2/main.nf index de861551..65ec81bf 100644 --- a/subworkflows/local/vcf_concordance_glimpse2/main.nf +++ b/subworkflows/local/vcf_concordance_glimpse2/main.nf @@ -24,7 +24,7 @@ workflow VCF_CONCORDANCE_GLIMPSE2 { ) .combine(ch_vcf_freq) .combine(ch_region.map{[it[1]]}.collect().toList()) - .map{metaI, metaIPTC, emul, e_csi, truth, t_csi, metaP, freq, f_csi, regions -> + .map{ _metaI, metaIPTC, emul, e_csi, truth, t_csi, _metaP, freq, f_csi, regions -> [metaIPTC, emul, e_csi, truth, t_csi, freq, f_csi, [], regions] } @@ -35,12 +35,12 @@ workflow VCF_CONCORDANCE_GLIMPSE2 { ) ch_versions = ch_versions.mix(GLIMPSE2_CONCORDANCE.out.versions.first()) - ch_multiqc_files = ch_multiqc_files.mix(GLIMPSE2_CONCORDANCE.out.errors_cal.map{meta, txt -> [txt]}) - ch_multiqc_files = ch_multiqc_files.mix(GLIMPSE2_CONCORDANCE.out.errors_grp.map{meta, txt -> [txt]}) - ch_multiqc_files = ch_multiqc_files.mix(GLIMPSE2_CONCORDANCE.out.errors_spl.map{meta, txt -> [txt]}) - ch_multiqc_files = ch_multiqc_files.mix(GLIMPSE2_CONCORDANCE.out.rsquare_grp.map{meta, txt -> [txt]}) - ch_multiqc_files = ch_multiqc_files.mix(GLIMPSE2_CONCORDANCE.out.rsquare_spl.map{meta, txt -> [txt]}) - ch_multiqc_files = ch_multiqc_files.mix(GLIMPSE2_CONCORDANCE.out.rsquare_per_site.map{meta, txt -> [txt]}) + ch_multiqc_files = ch_multiqc_files.mix(GLIMPSE2_CONCORDANCE.out.errors_cal.map{ _meta, txt -> [txt]}) + ch_multiqc_files = ch_multiqc_files.mix(GLIMPSE2_CONCORDANCE.out.errors_grp.map{ _meta, txt -> [txt]}) + ch_multiqc_files = ch_multiqc_files.mix(GLIMPSE2_CONCORDANCE.out.errors_spl.map{ _meta, txt -> [txt]}) + ch_multiqc_files = ch_multiqc_files.mix(GLIMPSE2_CONCORDANCE.out.rsquare_grp.map{ _meta, txt -> [txt]}) + ch_multiqc_files = ch_multiqc_files.mix(GLIMPSE2_CONCORDANCE.out.rsquare_spl.map{ _meta, txt -> [txt]}) + ch_multiqc_files = ch_multiqc_files.mix(GLIMPSE2_CONCORDANCE.out.rsquare_per_site.map{ _meta, txt -> [txt]}) GUNZIP(GLIMPSE2_CONCORDANCE.out.errors_grp) ch_versions = ch_versions.mix(GUNZIP.out.versions.first()) @@ -50,7 +50,7 @@ workflow VCF_CONCORDANCE_GLIMPSE2 { GAWK( ADD_COLUMNS.out.txt - .map{meta, txt -> [["id":"TestQuality"], txt]} + .map{ _meta, txt -> [["id":"TestQuality"], txt]} .groupTuple(), [] ) diff --git a/subworkflows/local/vcf_impute_glimpse1/main.nf b/subworkflows/local/vcf_impute_glimpse1/main.nf index 4a5c352f..a0b36617 100644 --- a/subworkflows/local/vcf_impute_glimpse1/main.nf +++ b/subworkflows/local/vcf_impute_glimpse1/main.nf @@ -10,7 +10,6 @@ workflow VCF_IMPUTE_GLIMPSE1 { ch_input // channel (mandatory): [ [id], bam, bai ] ch_panel // channel (mandatory): [ [panel, chr], vcf, tbi ] ch_chunks // channel (optional): [ [panel, chr], region1, region2 ] - ch_fasta // channel (mandatory): [ [genome], fa, fai ] main: @@ -33,7 +32,7 @@ workflow VCF_IMPUTE_GLIMPSE1 { .combine(samples_file) .combine(ch_chunks_panel, by: 0) .combine(gmap_file) - .map{ metaPC, metaIPC, bam, bai, samples, regionin, regionout, panel, panel_index, gmap -> + .map{ _metaPC, metaIPC, bam, bai, samples, regionin, regionout, panel, panel_index, gmap -> [metaIPC + ["chunk": regionout], bam, bai, samples, regionin, regionout, panel, panel_index, gmap] } diff --git a/subworkflows/local/vcf_normalize_bcftools/main.nf b/subworkflows/local/vcf_normalize_bcftools/main.nf index 5129af8b..b90cb6aa 100644 --- a/subworkflows/local/vcf_normalize_bcftools/main.nf +++ b/subworkflows/local/vcf_normalize_bcftools/main.nf @@ -12,7 +12,7 @@ workflow VCF_NORMALIZE_BCFTOOLS { main: ch_versions = Channel.empty() - ch_fasta = ch_fasta.map { meta, fasta, fai -> [meta, fasta] } + ch_fasta = ch_fasta.map { meta, fasta, _fai -> [meta, fasta] } // Join duplicated biallelic sites into multiallelic records if (params.normalize) { diff --git a/subworkflows/local/vcf_phase_shapeit5/main.nf b/subworkflows/local/vcf_phase_shapeit5/main.nf index af643b14..eef71b0c 100644 --- a/subworkflows/local/vcf_phase_shapeit5/main.nf +++ b/subworkflows/local/vcf_phase_shapeit5/main.nf @@ -23,12 +23,12 @@ workflow VCF_PHASE_SHAPEIT5 { // Chunk with Glimpse2 ch_input_glimpse2 = ch_vcf .map{ - metaIC, vcf, csi, pedigree -> [metaIC.subMap("chr"), metaIC, vcf, csi] + metaIC, vcf, csi, _pedigree -> [metaIC.subMap("chr"), metaIC, vcf, csi] } .combine(ch_region.map{ metaCR, region -> [metaCR.subMap("chr"), region]}, by:0) .join(ch_map) .map{ - metaC, metaIC, vcf, csi, region, gmap -> [metaIC, vcf, csi, region, gmap] + _metaC, metaIC, vcf, csi, region, gmap -> [metaIC, vcf, csi, region, gmap] } GLIMPSE2_CHUNK ( ch_input_glimpse2, chunk_model ) ch_versions = ch_versions.mix( GLIMPSE2_CHUNK.out.versions.first() ) @@ -43,16 +43,13 @@ workflow VCF_PHASE_SHAPEIT5 { ) .map { metaIC, it -> [metaIC, it["RegionBuf"], it["RegionCnk"]]} - ch_chunks_number = GLIMPSE2_CHUNK.out.chunk_chr - .map { meta, chunk -> [meta.subMap("chr"), chunk.countLines().intValue()]} - ch_phase_input = ch_vcf .combine(ch_chunks_glimpse2, by:0) .map{ metaIC, vcf, csi, pedigree, regionbuf, regioncnk -> [metaIC.subMap("chr"), metaIC, vcf, csi, pedigree, regionbuf, regioncnk] } .combine(ch_map, by:0) - .map { metaC, metaIC, vcf, index, pedigree, regionbuf, regioncnk, gmap -> + .map { _metaC, metaIC, vcf, index, pedigree, regionbuf, regioncnk, gmap -> [metaIC + [chunk: regioncnk], vcf, index, pedigree, regionbuf, gmap] } diff --git a/subworkflows/local/vcf_sites_extract_bcftools/main.nf b/subworkflows/local/vcf_sites_extract_bcftools/main.nf index d82736b4..c94dd95e 100644 --- a/subworkflows/local/vcf_sites_extract_bcftools/main.nf +++ b/subworkflows/local/vcf_sites_extract_bcftools/main.nf @@ -9,7 +9,7 @@ workflow VCF_SITES_EXTRACT_BCFTOOLS { main: ch_versions = Channel.empty() - ch_fasta = ch_fasta.map { meta, fasta, fai -> [meta, fasta] } + ch_fasta = ch_fasta.map { meta, fasta, _fai -> [meta, fasta] } // Convert VCF to Hap and Legend files BCFTOOLS_CONVERT(ch_vcf, ch_fasta, []) diff --git a/workflows/chrcheck/main.nf b/workflows/chrcheck/main.nf index 1f375c6a..b8e1e912 100644 --- a/workflows/chrcheck/main.nf +++ b/workflows/chrcheck/main.nf @@ -32,13 +32,13 @@ workflow CHRCHECK { // Check if channel is empty chr_vcf_disjoint = Channel.empty() // Extract the contig names from the VCF files - VCF_CHR_EXTRACT(ch_input.vcf.map{ meta, file, index, chr -> [meta, file] }) + VCF_CHR_EXTRACT(ch_input.vcf.map{ meta, file, _index, _chr -> [meta, file] }) ch_versions = ch_versions.mix(VCF_CHR_EXTRACT.out.versions) chr_vcf_disjoint = checkChr(VCF_CHR_EXTRACT.out.chr, ch_input.vcf) chr_bam_disjoint = Channel.empty() // Extract the contig names from the BAM files - BAM_CHR_EXTRACT(ch_input.bam.map{ meta, file, index, chr -> [meta, file] }) + BAM_CHR_EXTRACT(ch_input.bam.map{ meta, file, _index, _chr -> [meta, file] }) ch_versions = ch_versions.mix(BAM_CHR_EXTRACT.out.versions) chr_bam_disjoint = checkChr(BAM_CHR_EXTRACT.out.chr, ch_input.bam) @@ -46,7 +46,7 @@ workflow CHRCHECK { ch_bam_renamed = Channel.empty() // Rename the contigs in the BAM files BAM_CHR_RENAME_SAMTOOLS( - chr_bam_disjoint.to_rename.map{meta, bam, csi, diff, prefix -> [meta, bam, csi, prefix]} + chr_bam_disjoint.to_rename.map{meta, bam, csi, _diff, prefix -> [meta, bam, csi, prefix]} ) ch_versions = ch_versions.mix(BAM_CHR_RENAME_SAMTOOLS.out.versions) ch_bam_renamed = BAM_CHR_RENAME_SAMTOOLS.out.bam_renamed diff --git a/workflows/phaseimpute/main.nf b/workflows/phaseimpute/main.nf index 5ae079dc..486846da 100644 --- a/workflows/phaseimpute/main.nf +++ b/workflows/phaseimpute/main.nf @@ -234,7 +234,7 @@ workflow PHASEIMPUTE { ch_input_bams = ch_input_type.bam .toSortedList { it1, it2 -> it1[0]["id"] <=> it2[0]["id"] } .map { list -> list.collate(params.batch_size) - .collect{ [[id: "all", batch: nb_batch++], it] } } + .collect{ nb_batch += 1; [[id: "all", batch: nb_batch], it] } } .map { list -> [list.collect{ it[0] }, list.collect{ it[1] }] } .transpose() .map { metaI, filestuples-> [ @@ -243,7 +243,7 @@ workflow PHASEIMPUTE { ] } LIST_TO_FILE( - ch_input_bams.map{ meta, file, index -> [ + ch_input_bams.map{ meta, file, _index -> [ meta, file, meta.metas.collect { it.id } ] } ) @@ -283,8 +283,7 @@ workflow PHASEIMPUTE { VCF_IMPUTE_GLIMPSE1( ch_input_glimpse1, ch_panel_phased, - ch_chunks_glimpse1, - ch_fasta + ch_chunks_glimpse1 ) ch_versions = ch_versions.mix(VCF_IMPUTE_GLIMPSE1.out.versions) From d8ee2b7eb166d42dc35a3deed6daa4e0b97da3c8 Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Wed, 6 Nov 2024 13:16:18 +0100 Subject: [PATCH 13/32] Remove input from input initialisation --- main.nf | 3 +-- subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/main.nf b/main.nf index a5e3fa05..f1c51c14 100644 --- a/main.nf +++ b/main.nf @@ -124,8 +124,7 @@ workflow { params.validate_params, params.monochrome_logs, args, - params.outdir, - params.input + params.outdir ) // diff --git a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf index 97cb7f2c..3d07de32 100644 --- a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf @@ -33,7 +33,6 @@ workflow PIPELINE_INITIALISATION { _monochrome_logs // boolean: Do not use coloured log outputs nextflow_cli_args // array: List of positional nextflow CLI args outdir // string: The output directory where the results will be saved - _input // string: Path to input samplesheet main: From eb5ef673264b52c59bc5393323c43a72e822f352 Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Wed, 6 Nov 2024 13:20:15 +0100 Subject: [PATCH 14/32] Update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dfd8e9eb..9d44c730 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,7 +64,7 @@ Initial release of nf-core/phaseimpute, created with the [nf-core](https://nf-co - [#148](https://github.com/nf-core/phaseimpute/pull/148) - Fix awsfulltest github action for manual dispatch - [#149](https://github.com/nf-core/phaseimpute/pull/149) - Remove the map file from the awsfulltest - [#152](https://github.com/nf-core/phaseimpute/pull/152) - Fix URLs in the documentation and remove tools citation in the README, use a white background for all images in the documentation. -- [#153](https://github.com/nf-core/phaseimpute/pull/153) - Remove normalisation, frequency commputation and phasing from full test to reduce cost and computational time. Fix image in `usage.md`. Fix small warnings and errors with updated language server. `def` has been added when necesary, `:` use instead of `,` in assertions, `_` added to variables not used in closures, `for` loop replaced by `.each{}`, remove unused code / input +- [#153](https://github.com/nf-core/phaseimpute/pull/153) - Remove normalisation, frequency commputation and phasing from full test to reduce cost and computational time. Fix image in `usage.md`. Fix small warnings and errors with updated language server. `def` has been added when necesary, `:` use instead of `,` in assertions, `_` added to variables not used in closures, `for` loop replaced by `.each{}`, remove unused code / input. Fix getFileExtension function. ### `Fixed` From 98dba2a0f01629683759923f839a91af1d0781c0 Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Wed, 6 Nov 2024 13:40:18 +0100 Subject: [PATCH 15/32] Fix numbering batch --- workflows/phaseimpute/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/phaseimpute/main.nf b/workflows/phaseimpute/main.nf index 486846da..55fd4805 100644 --- a/workflows/phaseimpute/main.nf +++ b/workflows/phaseimpute/main.nf @@ -230,7 +230,7 @@ workflow PHASEIMPUTE { .map{ error "Input files must be either BAM/CRAM or VCF/BCF" } // Group BAMs by batch size - def nb_batch = 0 + def nb_batch = -1 ch_input_bams = ch_input_type.bam .toSortedList { it1, it2 -> it1[0]["id"] <=> it2[0]["id"] } .map { list -> list.collate(params.batch_size) From 1dd253a02783b5f8f7051535b29b0409e70bea82 Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Wed, 6 Nov 2024 15:23:14 +0100 Subject: [PATCH 16/32] Update nf-test modules --- modules/local/add_columns/tests/main.nf.test.snap | 12 ++++++------ modules/local/bam_chr_extract/tests/main.nf.test | 6 +++--- modules/local/list_to_file/tests/main.nf.test.snap | 12 ++++++------ modules/local/vcf_chr_extract/tests/main.nf.test | 6 +++--- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/modules/local/add_columns/tests/main.nf.test.snap b/modules/local/add_columns/tests/main.nf.test.snap index aff8a268..5cf5457e 100644 --- a/modules/local/add_columns/tests/main.nf.test.snap +++ b/modules/local/add_columns/tests/main.nf.test.snap @@ -43,7 +43,7 @@ ] ], "1": [ - "versions.yml:md5,b25787d2ba80184a94de82cf5cfe8e7a" + "versions.yml:md5,ab0afe509bddeef28fcf8d00db1cec81" ], "txt": [ [ @@ -58,7 +58,7 @@ ] ], "versions": [ - "versions.yml:md5,b25787d2ba80184a94de82cf5cfe8e7a" + "versions.yml:md5,ab0afe509bddeef28fcf8d00db1cec81" ] } ], @@ -66,7 +66,7 @@ "nf-test": "0.8.4", "nextflow": "24.04.3" }, - "timestamp": "2024-07-17T14:43:39.390342082" + "timestamp": "2024-11-06T13:32:32.608346737" }, "Add columns to txt file with missing fields": { "content": [ @@ -81,7 +81,7 @@ ] ], "1": [ - "versions.yml:md5,b25787d2ba80184a94de82cf5cfe8e7a" + "versions.yml:md5,ab0afe509bddeef28fcf8d00db1cec81" ], "txt": [ [ @@ -93,7 +93,7 @@ ] ], "versions": [ - "versions.yml:md5,b25787d2ba80184a94de82cf5cfe8e7a" + "versions.yml:md5,ab0afe509bddeef28fcf8d00db1cec81" ] } ], @@ -101,6 +101,6 @@ "nf-test": "0.8.4", "nextflow": "24.04.3" }, - "timestamp": "2024-07-17T14:44:39.317216249" + "timestamp": "2024-11-06T13:32:39.650698807" } } \ No newline at end of file diff --git a/modules/local/bam_chr_extract/tests/main.nf.test b/modules/local/bam_chr_extract/tests/main.nf.test index c8f13223..9c182d15 100644 --- a/modules/local/bam_chr_extract/tests/main.nf.test +++ b/modules/local/bam_chr_extract/tests/main.nf.test @@ -15,15 +15,15 @@ nextflow_process { input[0] = Channel.fromList([ [ [ id:'test_single_end_bam' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.single_end.bam', checkIfExists: true) ], [ [id: 'test2_paired_end_sorted_bam'], // meta map - file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test2.paired_end.sorted.bam', checkIfExists: true) ], [ [id: 'test_paired_end_sorted_cram'], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_cram'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true) ] ]) """ diff --git a/modules/local/list_to_file/tests/main.nf.test.snap b/modules/local/list_to_file/tests/main.nf.test.snap index 1906937d..5e8195f9 100644 --- a/modules/local/list_to_file/tests/main.nf.test.snap +++ b/modules/local/list_to_file/tests/main.nf.test.snap @@ -7,8 +7,8 @@ { "id": "all" }, - "all_id.txt:md5,6ffc4e703a69bb652dc666a8dcae1863", - "all_noid.txt:md5,045a6e673d95a6e8152a1d06959db93a" + "all.id.txt:md5,6ffc4e703a69bb652dc666a8dcae1863", + "all.noid.txt:md5,045a6e673d95a6e8152a1d06959db93a" ] ], "1": [ @@ -19,8 +19,8 @@ { "id": "all" }, - "all_id.txt:md5,6ffc4e703a69bb652dc666a8dcae1863", - "all_noid.txt:md5,045a6e673d95a6e8152a1d06959db93a" + "all.id.txt:md5,6ffc4e703a69bb652dc666a8dcae1863", + "all.noid.txt:md5,045a6e673d95a6e8152a1d06959db93a" ] ], "versions": [ @@ -30,9 +30,9 @@ ], "meta": { "nf-test": "0.8.4", - "nextflow": "24.04.4" + "nextflow": "24.04.3" }, - "timestamp": "2024-10-16T16:15:18.4568228" + "timestamp": "2024-11-06T13:55:57.105169612" }, "Content_withid": { "content": [ diff --git a/modules/local/vcf_chr_extract/tests/main.nf.test b/modules/local/vcf_chr_extract/tests/main.nf.test index 8306d3a6..f8a61005 100644 --- a/modules/local/vcf_chr_extract/tests/main.nf.test +++ b/modules/local/vcf_chr_extract/tests/main.nf.test @@ -15,15 +15,15 @@ nextflow_process { input[0] = Channel.fromList([ [ [id:'test_bcf'], // meta map - file(params.test_data['sarscov2']['illumina']['test_bcf'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.bcf', checkIfExists: true) ], [ [id: 'test2_vcf'], // meta map - file(params.test_data['sarscov2']['illumina']['test2_vcf'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test2.vcf', checkIfExists: true) ], [ [id: 'test2_haplotc_vcf_gz'], // meta map - file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_vcf_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.vcf.gz', checkIfExists: true) ] ]) """ From d12bca6f61701d9e9143d6f44d63b863fe90406a Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Wed, 6 Nov 2024 17:32:45 +0100 Subject: [PATCH 17/32] Fix fulltest --- conf/test_full.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/test_full.config b/conf/test_full.config index 2a911813..c59b6791 100644 --- a/conf/test_full.config +++ b/conf/test_full.config @@ -35,7 +35,7 @@ params { // Panelprep optional args remove_samples = "NA12878,NA12891,NA12892" - normalize = false + normalize = true compute_freq = false phase = false From 85f3753bc3f451d9f598dbd0db234ce00210193d Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Wed, 6 Nov 2024 17:35:13 +0100 Subject: [PATCH 18/32] Update nf-test --- .../tests/main.nf.test | 16 +- .../tests/main.nf.test.snap | 72 ++++---- .../tests/main.nf.test.snap | 48 ++--- .../bam_gl_bcftools/tests/main.nf.test.snap | 32 ++-- .../local/bam_impute_glimpse2/main.nf | 2 +- .../bam_impute_glimpse2/tests/main.nf.test | 54 ++++-- .../tests/main.nf.test.snap | 159 ++++++----------- .../local/bam_impute_quilt/tests/main.nf.test | 40 +++-- .../bam_impute_quilt/tests/main.nf.test.snap | 168 ++++++------------ subworkflows/local/bam_impute_stitch/main.nf | 2 +- .../bam_impute_stitch/tests/main.nf.test | 29 +-- .../bam_impute_stitch/tests/main.nf.test.snap | 45 +++-- .../tests/main.nf.test.snap | 52 +++--- .../tests/main.nf.test.snap | 8 +- .../local/get_region/tests/main.nf.test.snap | 8 +- .../tests/function.nf.test.snap | 62 +++++++ .../tests/function.nf.test.snap | 60 +++++-- .../tests/main.nf.test | 18 +- .../tests/main.nf.test.snap | 10 +- .../tests/main.nf.test.snap | 10 +- .../tests/main.nf.test.snap | 36 ++-- .../tests/main.nf.test.snap | 22 +-- .../tests/main.nf.test.snap | 26 +-- 23 files changed, 502 insertions(+), 477 deletions(-) create mode 100644 subworkflows/local/utils_nfcore_chrcheck_pipeline/tests/function.nf.test.snap diff --git a/subworkflows/local/bam_chr_rename_samtools/tests/main.nf.test b/subworkflows/local/bam_chr_rename_samtools/tests/main.nf.test index 63971f5c..0ab9cbf3 100644 --- a/subworkflows/local/bam_chr_rename_samtools/tests/main.nf.test +++ b/subworkflows/local/bam_chr_rename_samtools/tests/main.nf.test @@ -24,14 +24,14 @@ nextflow_workflow { input[0] = Channel.fromList([ [ [id: "test_paired"], - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExist:true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExist:true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExist:true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExist:true), "nochr" ], [ [id: "test_MT"], - file(params.test_data['homo_sapiens']['illumina']['test_illumina_mt_bam'], checkIfExist:true), - file(params.test_data['homo_sapiens']['illumina']['test_illumina_mt_bam_bai'], checkIfExist:true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test_illumina_mt.bam', checkIfExist:true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test_illumina_mt.bam.bai', checkIfExist:true), "nochr" ], ]) @@ -60,14 +60,14 @@ nextflow_workflow { input[0] = Channel.fromList([ [ [id: "test_paired"], - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExist:true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExist:true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExist:true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExist:true), "nochr" ], [ [id: "test_MT"], - file(params.test_data['homo_sapiens']['illumina']['test_illumina_mt_bam'], checkIfExist:true), - file(params.test_data['homo_sapiens']['illumina']['test_illumina_mt_bam_bai'], checkIfExist:true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test_illumina_mt.bam', checkIfExist:true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test_illumina_mt.bam.bai', checkIfExist:true), "nochr" ], ]) diff --git a/subworkflows/local/bam_chr_rename_samtools/tests/main.nf.test.snap b/subworkflows/local/bam_chr_rename_samtools/tests/main.nf.test.snap index 367d8277..e182f4f2 100644 --- a/subworkflows/local/bam_chr_rename_samtools/tests/main.nf.test.snap +++ b/subworkflows/local/bam_chr_rename_samtools/tests/main.nf.test.snap @@ -7,48 +7,48 @@ { "id": "test_MT" }, - "test_MT_withchr.bam:md5,33f16cad4bdac734717255f29d98e9b6", - "test_MT_withchr.bam.bai:md5,dbd8f1a5df58115b6f64a9312133d79d" + "test_MT_withchr.bam:md5,d954fdf4c600dcf02e3ff8687bf842d7", + "test_MT_withchr.bam.bai:md5,3a8e131f5666db321bdb9da17197096d" ], [ { "id": "test_paired" }, - "test_paired_withchr.bam:md5,c6908df90282cc95e846eee31476bb47", - "test_paired_withchr.bam.bai:md5,77524c609a3001cdca9c7d10dcc14b6a" + "test_paired_withchr.bam:md5,89d71d9dd1953bf7f23d6e01c4c2f11f", + "test_paired_withchr.bam.bai:md5,c96c56313430a3c8c806f9eac4d58ce9" ] ], "1": [ - "versions.yml:md5,42dd37f7dc7e85848f3bb65119dae337", - "versions.yml:md5,790a460c300d89aacfc941946b06b61d" + "versions.yml:md5,3777f4a1f04f5087333fbe98eee09df9", + "versions.yml:md5,fc2d8252e26e8b681f2dd73d8b08fdde" ], "bam_renamed": [ [ { "id": "test_MT" }, - "test_MT_withchr.bam:md5,33f16cad4bdac734717255f29d98e9b6", - "test_MT_withchr.bam.bai:md5,dbd8f1a5df58115b6f64a9312133d79d" + "test_MT_withchr.bam:md5,d954fdf4c600dcf02e3ff8687bf842d7", + "test_MT_withchr.bam.bai:md5,3a8e131f5666db321bdb9da17197096d" ], [ { "id": "test_paired" }, - "test_paired_withchr.bam:md5,c6908df90282cc95e846eee31476bb47", - "test_paired_withchr.bam.bai:md5,77524c609a3001cdca9c7d10dcc14b6a" + "test_paired_withchr.bam:md5,89d71d9dd1953bf7f23d6e01c4c2f11f", + "test_paired_withchr.bam.bai:md5,c96c56313430a3c8c806f9eac4d58ce9" ] ], "versions": [ - "versions.yml:md5,42dd37f7dc7e85848f3bb65119dae337", - "versions.yml:md5,790a460c300d89aacfc941946b06b61d" + "versions.yml:md5,3777f4a1f04f5087333fbe98eee09df9", + "versions.yml:md5,fc2d8252e26e8b681f2dd73d8b08fdde" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-07-17T15:22:44.813965855" + "timestamp": "2024-11-06T15:27:46.769666251" }, "headernochr": { "content": [ @@ -57,15 +57,15 @@ "@SQ\tSN:M\tLN:16569" ], [ - "@SQ\tSN:22\tLN:40001" + "@SQ\tSN:MT192765.1\tLN:29829" ] ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-06-19T12:32:09.649153266" + "timestamp": "2024-11-06T15:27:47.170803881" }, "Should add chr prefix": { "content": [ @@ -75,48 +75,48 @@ { "id": "test_MT" }, - "test_MT_withchr.bam:md5,07e733c5bdb64f2f48ceb1eafbb0d120", + "test_MT_withchr.bam:md5,e4080be5180ea52ce8bd1437c18101ed", "test_MT_withchr.bam.bai:md5,33b4ed892348364beceb9a2bfba07448" ], [ { "id": "test_paired" }, - "test_paired_withchr.bam:md5,a4d6b2b5a077ec1d7bdd459c15fe49d0", - "test_paired_withchr.bam.bai:md5,592b3771c867dfb0b31b14e4a578e795" + "test_paired_withchr.bam:md5,959888c3cc8c3f3d0b920b398b872c46", + "test_paired_withchr.bam.bai:md5,549e36a5953c22164b3b821125dd9482" ] ], "1": [ - "versions.yml:md5,42dd37f7dc7e85848f3bb65119dae337", - "versions.yml:md5,790a460c300d89aacfc941946b06b61d" + "versions.yml:md5,3777f4a1f04f5087333fbe98eee09df9", + "versions.yml:md5,fc2d8252e26e8b681f2dd73d8b08fdde" ], "bam_renamed": [ [ { "id": "test_MT" }, - "test_MT_withchr.bam:md5,07e733c5bdb64f2f48ceb1eafbb0d120", + "test_MT_withchr.bam:md5,e4080be5180ea52ce8bd1437c18101ed", "test_MT_withchr.bam.bai:md5,33b4ed892348364beceb9a2bfba07448" ], [ { "id": "test_paired" }, - "test_paired_withchr.bam:md5,a4d6b2b5a077ec1d7bdd459c15fe49d0", - "test_paired_withchr.bam.bai:md5,592b3771c867dfb0b31b14e4a578e795" + "test_paired_withchr.bam:md5,959888c3cc8c3f3d0b920b398b872c46", + "test_paired_withchr.bam.bai:md5,549e36a5953c22164b3b821125dd9482" ] ], "versions": [ - "versions.yml:md5,42dd37f7dc7e85848f3bb65119dae337", - "versions.yml:md5,790a460c300d89aacfc941946b06b61d" + "versions.yml:md5,3777f4a1f04f5087333fbe98eee09df9", + "versions.yml:md5,fc2d8252e26e8b681f2dd73d8b08fdde" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-07-17T15:22:55.966994758" + "timestamp": "2024-11-06T15:27:58.280092004" }, "headerwithchr": { "content": [ @@ -125,14 +125,14 @@ "@SQ\tSN:chrM\tLN:16569" ], [ - "@SQ\tSN:chr22\tLN:40001" + "@SQ\tSN:chrMT192765.1\tLN:29829" ] ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-06-19T12:34:52.016067829" + "timestamp": "2024-11-06T15:27:58.809912843" } } \ No newline at end of file diff --git a/subworkflows/local/bam_downsample_samtools/tests/main.nf.test.snap b/subworkflows/local/bam_downsample_samtools/tests/main.nf.test.snap index 26c8d0ca..9d908275 100644 --- a/subworkflows/local/bam_downsample_samtools/tests/main.nf.test.snap +++ b/subworkflows/local/bam_downsample_samtools/tests/main.nf.test.snap @@ -8,7 +8,7 @@ "id": "NA12878", "depth": 2 }, - "NA12878.bam:md5,c998482010b83365a4889c3fa75ac578", + "NA12878.bam:md5,f9f41668c064cb54051f77a18bd6a258", "NA12878.bam.csi:md5,0b4abd161cdcc2b51571c9cc651df354" ], [ @@ -16,14 +16,14 @@ "id": "NA19401", "depth": 2 }, - "NA19401.bam:md5,6b144e7adc1f9e6711aea0e4772c5937", + "NA19401.bam:md5,dd327e50a1d4ba3a8ccaa07a587a2ecf", "NA19401.bam.csi:md5,36c29896003f2de5306ff427a969058c" ] ], "1": [ - "versions.yml:md5,88f1d64445acc1f44531d7897b0f2684", + "versions.yml:md5,43ed2e6d85cac7ccd2fb22a733f585dc", "versions.yml:md5,9eef568f4fc903d70199abf5a48bd08f", - "versions.yml:md5,de64e28f766e3c91df1b353fd0a92e71" + "versions.yml:md5,a61d007b27e86103db8d68a8c79a98fb" ], "bam_emul": [ [ @@ -31,7 +31,7 @@ "id": "NA12878", "depth": 2 }, - "NA12878.bam:md5,c998482010b83365a4889c3fa75ac578", + "NA12878.bam:md5,f9f41668c064cb54051f77a18bd6a258", "NA12878.bam.csi:md5,0b4abd161cdcc2b51571c9cc651df354" ], [ @@ -39,22 +39,22 @@ "id": "NA19401", "depth": 2 }, - "NA19401.bam:md5,6b144e7adc1f9e6711aea0e4772c5937", + "NA19401.bam:md5,dd327e50a1d4ba3a8ccaa07a587a2ecf", "NA19401.bam.csi:md5,36c29896003f2de5306ff427a969058c" ] ], "versions": [ - "versions.yml:md5,88f1d64445acc1f44531d7897b0f2684", + "versions.yml:md5,43ed2e6d85cac7ccd2fb22a733f585dc", "versions.yml:md5,9eef568f4fc903d70199abf5a48bd08f", - "versions.yml:md5,de64e28f766e3c91df1b353fd0a92e71" + "versions.yml:md5,a61d007b27e86103db8d68a8c79a98fb" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-07-17T15:34:43.478151313" + "timestamp": "2024-11-06T15:28:20.410189057" }, "Downsample to 4X": { "content": [ @@ -65,7 +65,7 @@ "id": "NA12878", "depth": 4 }, - "NA12878.bam:md5,d6045df32f7c77d5c863b2068739faa9", + "NA12878.bam:md5,766247cca7d1ccff1352ecc3d47fe4be", "NA12878.bam.csi:md5,3f8f9a17463b6c2391c632681d3f253a" ], [ @@ -73,14 +73,14 @@ "id": "NA19401", "depth": 4 }, - "NA19401.bam:md5,3b0d20e5f44952135a547c6230117460", - "NA19401.bam.csi:md5,b44701d7d4de827cc1b83aaeb397deaf" + "NA19401.bam:md5,f678431058d8b4963f09fa3431681756", + "NA19401.bam.csi:md5,14a9e8d58a46360917263c22c07dea41" ] ], "1": [ - "versions.yml:md5,88f1d64445acc1f44531d7897b0f2684", + "versions.yml:md5,43ed2e6d85cac7ccd2fb22a733f585dc", "versions.yml:md5,9eef568f4fc903d70199abf5a48bd08f", - "versions.yml:md5,de64e28f766e3c91df1b353fd0a92e71" + "versions.yml:md5,a61d007b27e86103db8d68a8c79a98fb" ], "bam_emul": [ [ @@ -88,7 +88,7 @@ "id": "NA12878", "depth": 4 }, - "NA12878.bam:md5,d6045df32f7c77d5c863b2068739faa9", + "NA12878.bam:md5,766247cca7d1ccff1352ecc3d47fe4be", "NA12878.bam.csi:md5,3f8f9a17463b6c2391c632681d3f253a" ], [ @@ -96,22 +96,22 @@ "id": "NA19401", "depth": 4 }, - "NA19401.bam:md5,3b0d20e5f44952135a547c6230117460", - "NA19401.bam.csi:md5,b44701d7d4de827cc1b83aaeb397deaf" + "NA19401.bam:md5,f678431058d8b4963f09fa3431681756", + "NA19401.bam.csi:md5,14a9e8d58a46360917263c22c07dea41" ] ], "versions": [ - "versions.yml:md5,88f1d64445acc1f44531d7897b0f2684", + "versions.yml:md5,43ed2e6d85cac7ccd2fb22a733f585dc", "versions.yml:md5,9eef568f4fc903d70199abf5a48bd08f", - "versions.yml:md5,de64e28f766e3c91df1b353fd0a92e71" + "versions.yml:md5,a61d007b27e86103db8d68a8c79a98fb" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-07-17T15:34:15.168143808" + "timestamp": "2024-11-06T15:28:38.037041169" }, "Reads2X": { "content": [ diff --git a/subworkflows/local/bam_gl_bcftools/tests/main.nf.test.snap b/subworkflows/local/bam_gl_bcftools/tests/main.nf.test.snap index 7203e479..dfc0abc8 100644 --- a/subworkflows/local/bam_gl_bcftools/tests/main.nf.test.snap +++ b/subworkflows/local/bam_gl_bcftools/tests/main.nf.test.snap @@ -22,12 +22,12 @@ ], "variantcaller": "bcftools" }, - "all.annotate.vcf.gz:md5,fd2e606f302c569d276011254a95a728", + "all.annotate.vcf.gz:md5,95cf1e61c8d2776a02588952fb67c5d6", "all.annotate.vcf.gz.tbi:md5,e22a83a66d796dca37eab6d75e76f9c3" ] ], "1": [ - "versions.yml:md5,3779c6b3c000bc757d3d6109010518b0", + "versions.yml:md5,0980a298fde671494f5b4e9cb3a6ebc2", "versions.yml:md5,4739962c934731254db8b31083aa0df5", "versions.yml:md5,544ff5e39aa23f18c41587a739beaf34", "versions.yml:md5,74118beefc19065bed2de5d60277be55", @@ -62,12 +62,12 @@ ], "variantcaller": "bcftools" }, - "all.annotate.vcf.gz:md5,fd2e606f302c569d276011254a95a728", + "all.annotate.vcf.gz:md5,95cf1e61c8d2776a02588952fb67c5d6", "all.annotate.vcf.gz.tbi:md5,e22a83a66d796dca37eab6d75e76f9c3" ] ], "versions": [ - "versions.yml:md5,3779c6b3c000bc757d3d6109010518b0", + "versions.yml:md5,0980a298fde671494f5b4e9cb3a6ebc2", "versions.yml:md5,4739962c934731254db8b31083aa0df5", "versions.yml:md5,544ff5e39aa23f18c41587a739beaf34", "versions.yml:md5,74118beefc19065bed2de5d60277be55", @@ -77,10 +77,10 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-10-16T09:20:35.609695151" + "timestamp": "2024-11-06T15:29:03.964528903" }, "Compute genotype likelihood with only one input": { "content": [ @@ -93,12 +93,12 @@ "chr": "22", "variantcaller": "bcftools" }, - "NA12878.annotate.vcf.gz:md5,147ae3772f40a430036c7fabd10bb977", - "NA12878.annotate.vcf.gz.tbi:md5,a31b4a912de0ab6e1c7a13ed18ccc153" + "NA12878.annotate.vcf.gz:md5,15fdaa69229a6502d2638c467f4341e3", + "NA12878.annotate.vcf.gz.tbi:md5,21b8ed54102dc1e3a3596cc080039693" ] ], "1": [ - "versions.yml:md5,3779c6b3c000bc757d3d6109010518b0", + "versions.yml:md5,0980a298fde671494f5b4e9cb3a6ebc2", "versions.yml:md5,4739962c934731254db8b31083aa0df5", "versions.yml:md5,544ff5e39aa23f18c41587a739beaf34", "versions.yml:md5,c9d32dd20061f19422ff4d4b6f3fb24d" @@ -117,12 +117,12 @@ "chr": "22", "variantcaller": "bcftools" }, - "NA12878.annotate.vcf.gz:md5,147ae3772f40a430036c7fabd10bb977", - "NA12878.annotate.vcf.gz.tbi:md5,a31b4a912de0ab6e1c7a13ed18ccc153" + "NA12878.annotate.vcf.gz:md5,15fdaa69229a6502d2638c467f4341e3", + "NA12878.annotate.vcf.gz.tbi:md5,21b8ed54102dc1e3a3596cc080039693" ] ], "versions": [ - "versions.yml:md5,3779c6b3c000bc757d3d6109010518b0", + "versions.yml:md5,0980a298fde671494f5b4e9cb3a6ebc2", "versions.yml:md5,4739962c934731254db8b31083aa0df5", "versions.yml:md5,544ff5e39aa23f18c41587a739beaf34", "versions.yml:md5,c9d32dd20061f19422ff4d4b6f3fb24d" @@ -130,10 +130,10 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-10-16T09:21:00.8044734" + "timestamp": "2024-11-06T15:29:22.939785381" }, "Summary_one": { "content": [ diff --git a/subworkflows/local/bam_impute_glimpse2/main.nf b/subworkflows/local/bam_impute_glimpse2/main.nf index f8e704c1..63a913cd 100644 --- a/subworkflows/local/bam_impute_glimpse2/main.nf +++ b/subworkflows/local/bam_impute_glimpse2/main.nf @@ -7,7 +7,7 @@ include { BCFTOOLS_INDEX as BCFTOOLS_INDEX_2 } from '../../../modules/nf-core/bc workflow BAM_IMPUTE_GLIMPSE2 { take: - ch_input // channel (mandatory): [ [id], bam, bai, bamlist ] + ch_input // channel (mandatory): [ [id], [bam], [bai], bamlist ] ch_panel // channel (mandatory): [ [panel, chr], vcf, tbi ] ch_chunks // channel (optional): [ [panel, chr], region1, region2 ] ch_fasta // channel (mandatory): [ [genome], fa, fai ] diff --git a/subworkflows/local/bam_impute_glimpse2/tests/main.nf.test b/subworkflows/local/bam_impute_glimpse2/tests/main.nf.test index 662aad85..df55893a 100644 --- a/subworkflows/local/bam_impute_glimpse2/tests/main.nf.test +++ b/subworkflows/local/bam_impute_glimpse2/tests/main.nf.test @@ -26,6 +26,7 @@ nextflow_workflow { [id: "NA12878"], file(params.pipelines_testdata_base_path + "hum_data/individuals/NA12878/NA12878.s.bcf", checkIfExist:true), file(params.pipelines_testdata_base_path + "hum_data/individuals/NA12878/NA12878.s.bcf.csi", checkIfExist:true), + [] ] ]) input[1] = Channel.of([ @@ -49,28 +50,36 @@ nextflow_workflow { then { assertAll( { assert workflow.success }, - { assert snapshot(workflow.out).match() }, - { assert snapshot(workflow.out.vcf_tbi.collect{ path(it[1]).vcf.summary }).match("Summary_one_vcf") } + { assert snapshot( + workflow.out, + workflow.out.vcf_tbi.collect{ path(it[1]).vcf.summary }, + workflow.out.vcf_tbi.collect{ path(it[1]).vcf.header.getGenotypeSamples().sort() } + ).match() } ) } } - test("Impute with glimpse2 two individuals - input bam") { + test("Impute with glimpse2 two individuals - input bam with bamlist") { when { workflow { """ + bamlist = Channel.of( + "NA12878.s.bam\tNA12878", + "NA19401.s.bam\tNA19401" + ).collectFile(name: 'bamlist.txt', newLine: true) input[0] = Channel.fromList([ [ - [id: "NA12878"], - file(params.pipelines_testdata_base_path + "hum_data/individuals/NA12878/NA12878.s.bam", checkIfExist:true), - file(params.pipelines_testdata_base_path + "hum_data/individuals/NA12878/NA12878.s.bam.bai", checkIfExist:true), + [id: "allid"], + [ + file(params.pipelines_testdata_base_path + "hum_data/individuals/NA12878/NA12878.s.bam", checkIfExist:true), + file(params.pipelines_testdata_base_path + "hum_data/individuals/NA19401/NA19401.s.bam", checkIfExist:true) + ], + [ + file(params.pipelines_testdata_base_path + "hum_data/individuals/NA12878/NA12878.s.bam.bai", checkIfExist:true), + file(params.pipelines_testdata_base_path + "hum_data/individuals/NA19401/NA19401.s.bam.bai", checkIfExist:true) + ] ], - [ - [id: "NA19401"], - file(params.pipelines_testdata_base_path + "hum_data/individuals/NA19401/NA19401.s.bam", checkIfExist:true), - file(params.pipelines_testdata_base_path + "hum_data/individuals/NA19401/NA19401.s.bam.bai", checkIfExist:true), - ], - ]) + ]).combine(bamlist) input[1] = Channel.of([ [id: "1000GP", chr: "22"], file(params.pipelines_testdata_base_path + "hum_data/panel/chr22/1000GP.chr22.s.norel.vcf.gz", checkIfExist:true), @@ -92,23 +101,29 @@ nextflow_workflow { then { assertAll( { assert workflow.success }, - { assert snapshot(workflow.out).match() }, - { assert snapshot(workflow.out.vcf_tbi.collect{ path(it[1]).vcf.summary }).match("Summary_two_merged") } + { assert snapshot( + workflow.out, + workflow.out.vcf_tbi.collect{ path(it[1]).vcf.summary }, + workflow.out.vcf_tbi.collect{ path(it[1]).vcf.header.getGenotypeSamples().sort() } + ).match() } ) } } - test("Impute with glimpse2 one individual - input file bam") { + test("Impute with glimpse2 one individual - input file bam with bamlist") { when { workflow { """ + bamlist = Channel.of( + "NA12878.s.bam\tNA12878" + ).collectFile(name: 'bamlist.txt', newLine: true) input[0] = Channel.fromList([ [ [id: "NA12878"], file(params.pipelines_testdata_base_path + "hum_data/individuals/NA12878/NA12878.s.bam", checkIfExist:true), file(params.pipelines_testdata_base_path + "hum_data/individuals/NA12878/NA12878.s.bam.bai", checkIfExist:true), ] - ]) + ]).combine(bamlist) input[1] = Channel.of([ [id: "1000GP", chr: "22"], file(params.pipelines_testdata_base_path + "hum_data/panel/chr22/1000GP.chr22.s.norel.vcf.gz", checkIfExist:true), @@ -130,8 +145,11 @@ nextflow_workflow { then { assertAll( { assert workflow.success }, - { assert snapshot(workflow.out).match() }, - { assert snapshot(workflow.out.vcf_tbi.collect{ path(it[1]).vcf.summary }).match("Summary_one") } + { assert snapshot( + workflow.out, + workflow.out.vcf_tbi.collect{ path(it[1]).vcf.summary }, + workflow.out.vcf_tbi.collect{ path(it[1]).vcf.header.getGenotypeSamples().sort() } + ).match() } ) } } diff --git a/subworkflows/local/bam_impute_glimpse2/tests/main.nf.test.snap b/subworkflows/local/bam_impute_glimpse2/tests/main.nf.test.snap index 89e2355c..d6af369e 100644 --- a/subworkflows/local/bam_impute_glimpse2/tests/main.nf.test.snap +++ b/subworkflows/local/bam_impute_glimpse2/tests/main.nf.test.snap @@ -1,34 +1,17 @@ { - "Summary_one_vcf": { - "content": [ - [ - "VcfFile [chromosomes=[chr22], sampleCount=1, variantCount=903, phased=true, phasedAutodetect=true]" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" - }, - "timestamp": "2024-10-15T20:24:53.138873933" - }, - "Impute with glimpse2 one vcf": { + "Impute with glimpse2 one vcf - input bcf": { "content": [ { "0": [ [ { - "id": "all", - "metas": [ - { - "id": "NA12878" - } - ], + "id": "NA12878", "panel": "1000GP", "chr": "22", "tools": "glimpse2" }, - "all.vcf.gz:md5,12871b9108b2c39091710b220efe66e4", - "all.vcf.gz.tbi:md5,91cf385c7f8783ab54ab71f2c7c3d0d6" + "NA12878.vcf.gz:md5,7639fbde7f7406f79bfd4146fc05390b", + "NA12878.vcf.gz.tbi:md5,91cf385c7f8783ab54ab71f2c7c3d0d6" ] ], "1": [ @@ -42,18 +25,13 @@ "vcf_tbi": [ [ { - "id": "all", - "metas": [ - { - "id": "NA12878" - } - ], + "id": "NA12878", "panel": "1000GP", "chr": "22", "tools": "glimpse2" }, - "all.vcf.gz:md5,12871b9108b2c39091710b220efe66e4", - "all.vcf.gz.tbi:md5,91cf385c7f8783ab54ab71f2c7c3d0d6" + "NA12878.vcf.gz:md5,7639fbde7f7406f79bfd4146fc05390b", + "NA12878.vcf.gz.tbi:md5,91cf385c7f8783ab54ab71f2c7c3d0d6" ] ], "versions": [ @@ -64,59 +42,35 @@ "versions.yml:md5,2bfd212564086adb64cf01741a0d83ad", "versions.yml:md5,7d3bb3301fbcde0b12f553a2ae7d5b56" ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" - }, - "timestamp": "2024-10-15T20:24:49.977614625" - }, - "Summary_two_merged": { - "content": [ - [ - "VcfFile [chromosomes=[chr22], sampleCount=2, variantCount=903, phased=true, phasedAutodetect=true]" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" - }, - "timestamp": "2024-10-15T19:54:55.708226897" - }, - "Summary_one": { - "content": [ + }, [ "VcfFile [chromosomes=[chr22], sampleCount=1, variantCount=903, phased=true, phasedAutodetect=true]" + ], + [ + [ + "NA12878" + ] ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-10-15T19:55:29.713768601" + "timestamp": "2024-11-06T16:10:40.1574896" }, - "Impute with glimpse2 two individuals": { + "Impute with glimpse2 one individual - input file bam with bamlist": { "content": [ { "0": [ [ { - "id": "all", - "metas": [ - { - "id": "NA12878" - }, - { - "id": "NA19401" - } - ], + "id": "NA12878", "panel": "1000GP", "chr": "22", "tools": "glimpse2" }, - "all.vcf.gz:md5,89ac8fb35689ac345bbda89d26769985", - "all.vcf.gz.tbi:md5,3835e25e3ba02449c03f86d1d44bc4dd" + "NA12878.vcf.gz:md5,d676a65fa0f75d22aa1d7c79e3295679", + "NA12878.vcf.gz.tbi:md5,b5d3918a535c1aa01028635c9d94bf6f" ] ], "1": [ @@ -130,21 +84,13 @@ "vcf_tbi": [ [ { - "id": "all", - "metas": [ - { - "id": "NA12878" - }, - { - "id": "NA19401" - } - ], + "id": "NA12878", "panel": "1000GP", "chr": "22", "tools": "glimpse2" }, - "all.vcf.gz:md5,89ac8fb35689ac345bbda89d26769985", - "all.vcf.gz.tbi:md5,3835e25e3ba02449c03f86d1d44bc4dd" + "NA12878.vcf.gz:md5,d676a65fa0f75d22aa1d7c79e3295679", + "NA12878.vcf.gz.tbi:md5,b5d3918a535c1aa01028635c9d94bf6f" ] ], "versions": [ @@ -155,32 +101,35 @@ "versions.yml:md5,2bfd212564086adb64cf01741a0d83ad", "versions.yml:md5,7d3bb3301fbcde0b12f553a2ae7d5b56" ] - } + }, + [ + "VcfFile [chromosomes=[chr22], sampleCount=1, variantCount=903, phased=true, phasedAutodetect=true]" + ], + [ + [ + "NA12878" + ] + ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-10-15T20:25:23.722053705" + "timestamp": "2024-11-06T16:11:24.161757976" }, - "Impute with glimpse2 one individual": { + "Impute with glimpse2 two individuals - input bam with bamlist": { "content": [ { "0": [ [ { - "id": "all", - "metas": [ - { - "id": "NA12878" - } - ], + "id": "allid", "panel": "1000GP", "chr": "22", "tools": "glimpse2" }, - "all.vcf.gz:md5,122c2635b67460edf3a02e80069dcd81", - "all.vcf.gz.tbi:md5,f23fdc8f1678df5a351cd8d359f6a5cd" + "allid.vcf.gz:md5,4e99e5d80dfaf5eadfd9e876bc8124d3", + "allid.vcf.gz.tbi:md5,8ae3d3bb8a295d3ed194f2f3c82da77f" ] ], "1": [ @@ -194,18 +143,13 @@ "vcf_tbi": [ [ { - "id": "all", - "metas": [ - { - "id": "NA12878" - } - ], + "id": "allid", "panel": "1000GP", "chr": "22", "tools": "glimpse2" }, - "all.vcf.gz:md5,122c2635b67460edf3a02e80069dcd81", - "all.vcf.gz.tbi:md5,f23fdc8f1678df5a351cd8d359f6a5cd" + "allid.vcf.gz:md5,4e99e5d80dfaf5eadfd9e876bc8124d3", + "allid.vcf.gz.tbi:md5,8ae3d3bb8a295d3ed194f2f3c82da77f" ] ], "versions": [ @@ -216,12 +160,21 @@ "versions.yml:md5,2bfd212564086adb64cf01741a0d83ad", "versions.yml:md5,7d3bb3301fbcde0b12f553a2ae7d5b56" ] - } + }, + [ + "VcfFile [chromosomes=[chr22], sampleCount=2, variantCount=903, phased=true, phasedAutodetect=true]" + ], + [ + [ + "NA12878", + "NA19401" + ] + ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-10-15T20:25:54.091419593" + "timestamp": "2024-11-06T16:11:02.194341913" } -} +} \ No newline at end of file diff --git a/subworkflows/local/bam_impute_quilt/tests/main.nf.test b/subworkflows/local/bam_impute_quilt/tests/main.nf.test index ee1e86fe..2faecfa6 100644 --- a/subworkflows/local/bam_impute_quilt/tests/main.nf.test +++ b/subworkflows/local/bam_impute_quilt/tests/main.nf.test @@ -17,22 +17,27 @@ nextflow_workflow { tag "bcftools/index" tag "bcftools/annotate" - test("Impute with quilt two individuals") { + test("Impute with quilt two individuals with bamlist") { when { workflow { """ + bamlist = Channel.of( + "NA12878.s.bam", + "NA19401.s.bam" + ).collectFile(name: 'bamlist.txt', newLine: true) input[0] = Channel.fromList([ [ - [id: "NA12878"], - file(params.pipelines_testdata_base_path + "hum_data/individuals/NA12878/NA12878.s.bam", checkIfExist:true), - file(params.pipelines_testdata_base_path + "hum_data/individuals/NA12878/NA12878.s.bam.bai", checkIfExist:true), + [id: "allid"], + [ + file(params.pipelines_testdata_base_path + "hum_data/individuals/NA12878/NA12878.s.bam", checkIfExist:true), + file(params.pipelines_testdata_base_path + "hum_data/individuals/NA19401/NA19401.s.bam", checkIfExist:true) + ], + [ + file(params.pipelines_testdata_base_path + "hum_data/individuals/NA12878/NA12878.s.bam.bai", checkIfExist:true), + file(params.pipelines_testdata_base_path + "hum_data/individuals/NA19401/NA19401.s.bam.bai", checkIfExist:true) + ] ], - [ - [id: "NA19401"], - file(params.pipelines_testdata_base_path + "hum_data/individuals/NA19401/NA19401.s.bam", checkIfExist:true), - file(params.pipelines_testdata_base_path + "hum_data/individuals/NA19401/NA19401.s.bam.bai", checkIfExist:true), - ], - ]) + ]).combine(bamlist) input[1] = Channel.of([ [id: "1000GP", chr: "22"], file(params.pipelines_testdata_base_path + "hum_data/panel/chr22/1000GP.chr22.hap.gz", checkIfExist:true), @@ -53,8 +58,11 @@ nextflow_workflow { then { assertAll( { assert workflow.success }, - { assert snapshot(workflow.out).match() }, - { assert snapshot(workflow.out.vcf_tbi.collect{ path(it[1]).vcf.summary }).match("Summary_two_merged") } + { assert snapshot( + workflow.out, + workflow.out.vcf_tbi.collect{ path(it[1]).vcf.summary }, + workflow.out.vcf_tbi.collect{ path(it[1]).vcf.header.getGenotypeSamples().sort() } + ).match() } ) } } @@ -68,6 +76,7 @@ nextflow_workflow { [id: "NA12878"], file(params.pipelines_testdata_base_path + "hum_data/individuals/NA12878/NA12878.s.bam", checkIfExist:true), file(params.pipelines_testdata_base_path + "hum_data/individuals/NA12878/NA12878.s.bam.bai", checkIfExist:true), + [] ] ]) input[1] = Channel.of([ @@ -90,8 +99,11 @@ nextflow_workflow { then { assertAll( { assert workflow.success }, - { assert snapshot(workflow.out).match() }, - { assert snapshot(workflow.out.vcf_tbi.collect{ path(it[1]).vcf.summary }).match("Summary_one") } + { assert snapshot( + workflow.out, + workflow.out.vcf_tbi.collect{ path(it[1]).vcf.summary }, + workflow.out.vcf_tbi.collect{ path(it[1]).vcf.header.getGenotypeSamples().sort() } + ).match() } ) } } diff --git a/subworkflows/local/bam_impute_quilt/tests/main.nf.test.snap b/subworkflows/local/bam_impute_quilt/tests/main.nf.test.snap index 95f372f7..6052f72e 100644 --- a/subworkflows/local/bam_impute_quilt/tests/main.nf.test.snap +++ b/subworkflows/local/bam_impute_quilt/tests/main.nf.test.snap @@ -1,52 +1,29 @@ { - "Summary_two_merged": { - "content": [ - [ - "VcfFile [chromosomes=[chr22], sampleCount=2, variantCount=572, phased=true, phasedAutodetect=false]", - "VcfFile [chromosomes=[chr22], sampleCount=2, variantCount=570, phased=true, phasedAutodetect=false]" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" - }, - "timestamp": "2024-10-15T20:00:44.163346211" - }, - "Impute with quilt one individuals": { + "Impute with quilt two individuals with bamlist": { "content": [ { "0": [ [ { - "id": "all", - "metas": [ - { - "id": "NA12878" - } - ], + "id": "allid", "panel": "1000GP", "chr": "22", "chunk": "16570065-16597215", "tools": "quilt" }, - "all_22_16570065-16597215.impute.annotate.vcf.gz:md5,07016f1c2868ff055cda46741e897d8d", - "all_22_16570065-16597215.impute.annotate.vcf.gz.tbi:md5,f668f1f8308eb2d8aeae52871d496cf4" + "allid_22_16570065-16597215.impute.annotate.vcf.gz:md5,de611972f693a8c90c4a8175deab5249", + "allid_22_16570065-16597215.impute.annotate.vcf.gz.tbi:md5,0802cd70847696ee407c520fd963db31" ], [ { - "id": "all", - "metas": [ - { - "id": "NA12878" - } - ], + "id": "allid", "panel": "1000GP", "chr": "22", "chunk": "16587172-16609999", "tools": "quilt" }, - "all_22_16587172-16609999.impute.annotate.vcf.gz:md5,e62bc794624cabf26e2e133009d3bc39", - "all_22_16587172-16609999.impute.annotate.vcf.gz.tbi:md5,9eb3329cfc035f61ec26a68c1ecc2457" + "allid_22_16587172-16609999.impute.annotate.vcf.gz:md5,8a1dc994fc0eb4771b6acfe0e876580b", + "allid_22_16587172-16609999.impute.annotate.vcf.gz.tbi:md5,f3e0d1c94d02bcb57bafd143c49269f4" ] ], "1": [ @@ -56,103 +33,78 @@ "vcf_tbi": [ [ { - "id": "all", - "metas": [ - { - "id": "NA12878" - } - ], + "id": "allid", "panel": "1000GP", "chr": "22", "chunk": "16570065-16597215", "tools": "quilt" }, - "all_22_16570065-16597215.impute.annotate.vcf.gz:md5,07016f1c2868ff055cda46741e897d8d", - "all_22_16570065-16597215.impute.annotate.vcf.gz.tbi:md5,f668f1f8308eb2d8aeae52871d496cf4" + "allid_22_16570065-16597215.impute.annotate.vcf.gz:md5,de611972f693a8c90c4a8175deab5249", + "allid_22_16570065-16597215.impute.annotate.vcf.gz.tbi:md5,0802cd70847696ee407c520fd963db31" ], [ { - "id": "all", - "metas": [ - { - "id": "NA12878" - } - ], + "id": "allid", "panel": "1000GP", "chr": "22", "chunk": "16587172-16609999", "tools": "quilt" }, - "all_22_16587172-16609999.impute.annotate.vcf.gz:md5,e62bc794624cabf26e2e133009d3bc39", - "all_22_16587172-16609999.impute.annotate.vcf.gz.tbi:md5,9eb3329cfc035f61ec26a68c1ecc2457" + "allid_22_16587172-16609999.impute.annotate.vcf.gz:md5,8a1dc994fc0eb4771b6acfe0e876580b", + "allid_22_16587172-16609999.impute.annotate.vcf.gz.tbi:md5,f3e0d1c94d02bcb57bafd143c49269f4" ] ], "versions": [ "versions.yml:md5,ac2d0f2a8e77cd796d3b4b84fdd46b0d", "versions.yml:md5,cb038a1f67a47a76d0e0a983cfd56789" ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" - }, - "timestamp": "2024-10-15T20:08:59.438126764" - }, - "Summary_one": { - "content": [ + }, [ - "VcfFile [chromosomes=[chr22], sampleCount=1, variantCount=572, phased=true, phasedAutodetect=false]", - "VcfFile [chromosomes=[chr22], sampleCount=1, variantCount=570, phased=true, phasedAutodetect=false]" + "VcfFile [chromosomes=[chr22], sampleCount=2, variantCount=572, phased=true, phasedAutodetect=false]", + "VcfFile [chromosomes=[chr22], sampleCount=2, variantCount=570, phased=true, phasedAutodetect=false]" + ], + [ + [ + "NA12878", + "NA19401" + ], + [ + "NA12878", + "NA19401" + ] ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-10-15T20:05:13.062670619" + "timestamp": "2024-11-06T16:24:00.161098553" }, - "Impute with quilt two individuals": { + "Impute with quilt one individuals": { "content": [ { "0": [ [ { - "id": "all", - "metas": [ - { - "id": "NA12878" - }, - { - "id": "NA19401" - } - ], + "id": "NA12878", "panel": "1000GP", "chr": "22", "chunk": "16570065-16597215", "tools": "quilt" }, - "all_22_16570065-16597215.impute.annotate.vcf.gz:md5,ba2623c16adec2fc9ff7aa7211fb92b5", - "all_22_16570065-16597215.impute.annotate.vcf.gz.tbi:md5,fd2ab3c90342ed70566a08d848e3d736" + "NA12878_22_16570065-16597215.impute.annotate.vcf.gz:md5,f1a6f74a4782fc1df96db2b1fd458381", + "NA12878_22_16570065-16597215.impute.annotate.vcf.gz.tbi:md5,de3b20dc5f67aae2a9669f0c667edb5d" ], [ { - "id": "all", - "metas": [ - { - "id": "NA12878" - }, - { - "id": "NA19401" - } - ], + "id": "NA12878", "panel": "1000GP", "chr": "22", "chunk": "16587172-16609999", "tools": "quilt" }, - "all_22_16587172-16609999.impute.annotate.vcf.gz:md5,f158aa492dfa4966a28b44b99cd7beb1", - "all_22_16587172-16609999.impute.annotate.vcf.gz.tbi:md5,d3a6b0077504e48aadaa15d179733ffb" + "NA12878_22_16587172-16609999.impute.annotate.vcf.gz:md5,d549aa4a26cbe659081002521c4400c2", + "NA12878_22_16587172-16609999.impute.annotate.vcf.gz.tbi:md5,674782f71cca76015e0b72f9bc4e5431" ] ], "1": [ @@ -162,53 +114,49 @@ "vcf_tbi": [ [ { - "id": "all", - "metas": [ - { - "id": "NA12878" - }, - { - "id": "NA19401" - } - ], + "id": "NA12878", "panel": "1000GP", "chr": "22", "chunk": "16570065-16597215", "tools": "quilt" }, - "all_22_16570065-16597215.impute.annotate.vcf.gz:md5,ba2623c16adec2fc9ff7aa7211fb92b5", - "all_22_16570065-16597215.impute.annotate.vcf.gz.tbi:md5,fd2ab3c90342ed70566a08d848e3d736" + "NA12878_22_16570065-16597215.impute.annotate.vcf.gz:md5,f1a6f74a4782fc1df96db2b1fd458381", + "NA12878_22_16570065-16597215.impute.annotate.vcf.gz.tbi:md5,de3b20dc5f67aae2a9669f0c667edb5d" ], [ { - "id": "all", - "metas": [ - { - "id": "NA12878" - }, - { - "id": "NA19401" - } - ], + "id": "NA12878", "panel": "1000GP", "chr": "22", "chunk": "16587172-16609999", "tools": "quilt" }, - "all_22_16587172-16609999.impute.annotate.vcf.gz:md5,f158aa492dfa4966a28b44b99cd7beb1", - "all_22_16587172-16609999.impute.annotate.vcf.gz.tbi:md5,d3a6b0077504e48aadaa15d179733ffb" + "NA12878_22_16587172-16609999.impute.annotate.vcf.gz:md5,d549aa4a26cbe659081002521c4400c2", + "NA12878_22_16587172-16609999.impute.annotate.vcf.gz.tbi:md5,674782f71cca76015e0b72f9bc4e5431" ] ], "versions": [ "versions.yml:md5,ac2d0f2a8e77cd796d3b4b84fdd46b0d", "versions.yml:md5,cb038a1f67a47a76d0e0a983cfd56789" ] - } + }, + [ + "VcfFile [chromosomes=[chr22], sampleCount=1, variantCount=572, phased=true, phasedAutodetect=false]", + "VcfFile [chromosomes=[chr22], sampleCount=1, variantCount=570, phased=true, phasedAutodetect=false]" + ], + [ + [ + "NA12878" + ], + [ + "NA12878" + ] + ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-10-15T20:08:24.300458322" + "timestamp": "2024-11-06T16:24:29.617067286" } } \ No newline at end of file diff --git a/subworkflows/local/bam_impute_stitch/main.nf b/subworkflows/local/bam_impute_stitch/main.nf index b5cc4162..4b21d37e 100644 --- a/subworkflows/local/bam_impute_stitch/main.nf +++ b/subworkflows/local/bam_impute_stitch/main.nf @@ -5,7 +5,7 @@ include { BCFTOOLS_INDEX } from '../../../modules/nf-core/bcftools/index' workflow BAM_IMPUTE_STITCH { take: - ch_input // channel: [ [id], bam, bai, bamlist ] + ch_input // channel: [ [id], [bam], [bai], bamlist ] ch_posfile // channel: [ [panel, chr], legend ] ch_region // channel: [ [chr, region], region ] ch_fasta // channel: [ [genome], fa, fai ] diff --git a/subworkflows/local/bam_impute_stitch/tests/main.nf.test b/subworkflows/local/bam_impute_stitch/tests/main.nf.test index b4438641..26e66586 100644 --- a/subworkflows/local/bam_impute_stitch/tests/main.nf.test +++ b/subworkflows/local/bam_impute_stitch/tests/main.nf.test @@ -15,7 +15,7 @@ nextflow_workflow { tag "bcftools" tag "bcftools_index" - test("Prepare input stitch") { + test("Impute with stitch two individuals with bamlist") { when { params { max_cpus = 2 @@ -23,19 +23,23 @@ nextflow_workflow { } workflow { """ + bamlist = Channel.of( + "NA12878.s.bam", + "NA19401.s.bam" + ).collectFile(name: 'bamlist.txt', newLine: true) ch_samples = Channel.fromList([ + [ + [id: "allid"], [ - [id: "NA12878"], file(params.pipelines_testdata_base_path + "hum_data/individuals/NA12878/NA12878.s.bam", checkIfExist:true), - file(params.pipelines_testdata_base_path + "hum_data/individuals/NA12878/NA12878.s.bam.bai", checkIfExist:true), + file(params.pipelines_testdata_base_path + "hum_data/individuals/NA19401/NA19401.s.bam", checkIfExist:true) ], [ - [id: "NA19401"], - file(params.pipelines_testdata_base_path + "hum_data/individuals/NA19401/NA19401.s.bam", checkIfExist:true), - file(params.pipelines_testdata_base_path + "hum_data/individuals/NA19401/NA19401.s.bam.bai", checkIfExist:true), - ], - ]) - bamlist = Channel.of("NA12878.s.bam", "NA19401.s.bam").collectFile(name: "bamlist") + file(params.pipelines_testdata_base_path + "hum_data/individuals/NA12878/NA12878.s.bam.bai", checkIfExist:true), + file(params.pipelines_testdata_base_path + "hum_data/individuals/NA19401/NA19401.s.bam.bai", checkIfExist:true) + ] + ], + ]) ch_posfile = Channel.of([ [id: "1000GP", chr: "chr22"], @@ -61,8 +65,11 @@ nextflow_workflow { then { assertAll( { assert workflow.success }, - { assert snapshot(workflow.out).match() }, - { assert snapshot(workflow.out.vcf_tbi.collect{ path(it[1]).vcf.summary }).match("SummaryMixed") } + { assert snapshot( + workflow.out, + workflow.out.vcf_tbi.collect{ path(it[1]).vcf.summary }, + workflow.out.vcf_tbi.collect{ path(it[1]).vcf.header.getGenotypeSamples().sort() } + ).match() } ) } } diff --git a/subworkflows/local/bam_impute_stitch/tests/main.nf.test.snap b/subworkflows/local/bam_impute_stitch/tests/main.nf.test.snap index 648d160e..6206b54c 100644 --- a/subworkflows/local/bam_impute_stitch/tests/main.nf.test.snap +++ b/subworkflows/local/bam_impute_stitch/tests/main.nf.test.snap @@ -1,57 +1,56 @@ { - "Prepare input stitch": { + "Impute with stitch two individuals with bamlist": { "content": [ { "0": [ [ { - "id": "all_samples", + "id": "allid", "chr": "chr22", "panel": "1000GP", "tools": "stitch" }, - "stitch.chr22.vcf.gz:md5,9d3c27d9f0325cc92c22234665f5bb12", - "stitch.chr22.vcf.gz.tbi:md5,7d8d37b65e631c2b40c54e4a175de86c" + "stitch.chr22.vcf.gz:md5,bd5f0c37e08b601ba1cd9ffc8fd672fa", + "stitch.chr22.vcf.gz.tbi:md5,bc2655a04da76a431481799d3a4515ee" ] ], "1": [ "versions.yml:md5,4330856a215c4986b0591d550a4d22bf", - "versions.yml:md5,8561197b98b9a1e1f8f1b01c1369da35" + "versions.yml:md5,8561197b98b9a1e1f8f1b01c1369da35", + "versions.yml:md5,c0772dccc2cc2a3c8f0b3fa5f02312bc" ], "vcf_tbi": [ [ { - "id": "all_samples", + "id": "allid", "chr": "chr22", "panel": "1000GP", "tools": "stitch" }, - "stitch.chr22.vcf.gz:md5,9d3c27d9f0325cc92c22234665f5bb12", - "stitch.chr22.vcf.gz.tbi:md5,7d8d37b65e631c2b40c54e4a175de86c" + "stitch.chr22.vcf.gz:md5,bd5f0c37e08b601ba1cd9ffc8fd672fa", + "stitch.chr22.vcf.gz.tbi:md5,bc2655a04da76a431481799d3a4515ee" ] ], "versions": [ "versions.yml:md5,4330856a215c4986b0591d550a4d22bf", - "versions.yml:md5,8561197b98b9a1e1f8f1b01c1369da35" + "versions.yml:md5,8561197b98b9a1e1f8f1b01c1369da35", + "versions.yml:md5,c0772dccc2cc2a3c8f0b3fa5f02312bc" ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-17T16:32:53.365697746" - }, - "SummaryMixed": { - "content": [ + }, + [ + "VcfFile [chromosomes=[chr22], sampleCount=2, variantCount=903, phased=false, phasedAutodetect=false]" + ], [ - "VcfFile [chromosomes=[22], sampleCount=2, variantCount=903, phased=false, phasedAutodetect=false]" + [ + "NA12878", + "NA19401" + ] ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-07-17T16:32:53.598743638" + "timestamp": "2024-11-06T16:29:44.891707584" } } \ No newline at end of file diff --git a/subworkflows/local/bam_region_samtools/tests/main.nf.test.snap b/subworkflows/local/bam_region_samtools/tests/main.nf.test.snap index 50e4a7a6..2a15927c 100644 --- a/subworkflows/local/bam_region_samtools/tests/main.nf.test.snap +++ b/subworkflows/local/bam_region_samtools/tests/main.nf.test.snap @@ -8,7 +8,7 @@ "id": "NA12878", "chr": "all" }, - "NA12878.bam:md5,382b24f44346ec2027e8578a5085c20f", + "NA12878.bam:md5,12f8d7f8fa1d9f7694ef738dbcd61f5a", "NA12878.bam.bai:md5,484505b0727206e1e523dd90fa31cd16" ], [ @@ -16,14 +16,14 @@ "id": "NA19401", "chr": "all" }, - "NA19401.bam:md5,9efa18406f24954c75934d928ed9c062", + "NA19401.bam:md5,ded5cea4d4b696cfcf8a8c9aa5e7dbf5", "NA19401.bam.bai:md5,5a9429b877ffee92f7694d3579b4354b" ] ], "1": [ - "versions.yml:md5,466438b58e39f6156e98d049f38e9d71", - "versions.yml:md5,7c6c94bfec70fe9da9e00f94b45f38f5", - "versions.yml:md5,966689bbca491e03935dd21220e66a1e" + "versions.yml:md5,17ab59cf0e993cc8db9086093cdeb6e2", + "versions.yml:md5,3043c69a324445a251b7e9569bd012d3", + "versions.yml:md5,4dbd8db078f2e38fb335b8c3ee3db169" ], "bam_region": [ [ @@ -31,7 +31,7 @@ "id": "NA12878", "chr": "all" }, - "NA12878.bam:md5,382b24f44346ec2027e8578a5085c20f", + "NA12878.bam:md5,12f8d7f8fa1d9f7694ef738dbcd61f5a", "NA12878.bam.bai:md5,484505b0727206e1e523dd90fa31cd16" ], [ @@ -39,22 +39,22 @@ "id": "NA19401", "chr": "all" }, - "NA19401.bam:md5,9efa18406f24954c75934d928ed9c062", + "NA19401.bam:md5,ded5cea4d4b696cfcf8a8c9aa5e7dbf5", "NA19401.bam.bai:md5,5a9429b877ffee92f7694d3579b4354b" ] ], "versions": [ - "versions.yml:md5,466438b58e39f6156e98d049f38e9d71", - "versions.yml:md5,7c6c94bfec70fe9da9e00f94b45f38f5", - "versions.yml:md5,966689bbca491e03935dd21220e66a1e" + "versions.yml:md5,17ab59cf0e993cc8db9086093cdeb6e2", + "versions.yml:md5,3043c69a324445a251b7e9569bd012d3", + "versions.yml:md5,4dbd8db078f2e38fb335b8c3ee3db169" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-07-17T16:44:44.476760014" + "timestamp": "2024-11-06T15:30:24.020472297" }, "Summary10000bp": { "content": [ @@ -78,7 +78,7 @@ "id": "NA12878", "chr": "all" }, - "NA12878.bam:md5,bb7e4faf368fa9c3bce66db3632fe05b", + "NA12878.bam:md5,9337dfef8712c9d22259eb14b2e0231d", "NA12878.bam.bai:md5,8d864fd88a20d14d4aff3de607655cbb" ], [ @@ -86,14 +86,14 @@ "id": "NA19401", "chr": "all" }, - "NA19401.bam:md5,159d5b70d052e1269698635e28a8cbc9", + "NA19401.bam:md5,2bf30334abe9c8efd042e8515d2240e3", "NA19401.bam.bai:md5,ee992cd617b553c5fcfddd897193a0e5" ] ], "1": [ - "versions.yml:md5,466438b58e39f6156e98d049f38e9d71", - "versions.yml:md5,7c6c94bfec70fe9da9e00f94b45f38f5", - "versions.yml:md5,966689bbca491e03935dd21220e66a1e" + "versions.yml:md5,17ab59cf0e993cc8db9086093cdeb6e2", + "versions.yml:md5,3043c69a324445a251b7e9569bd012d3", + "versions.yml:md5,4dbd8db078f2e38fb335b8c3ee3db169" ], "bam_region": [ [ @@ -101,7 +101,7 @@ "id": "NA12878", "chr": "all" }, - "NA12878.bam:md5,bb7e4faf368fa9c3bce66db3632fe05b", + "NA12878.bam:md5,9337dfef8712c9d22259eb14b2e0231d", "NA12878.bam.bai:md5,8d864fd88a20d14d4aff3de607655cbb" ], [ @@ -109,22 +109,22 @@ "id": "NA19401", "chr": "all" }, - "NA19401.bam:md5,159d5b70d052e1269698635e28a8cbc9", + "NA19401.bam:md5,2bf30334abe9c8efd042e8515d2240e3", "NA19401.bam.bai:md5,ee992cd617b553c5fcfddd897193a0e5" ] ], "versions": [ - "versions.yml:md5,466438b58e39f6156e98d049f38e9d71", - "versions.yml:md5,7c6c94bfec70fe9da9e00f94b45f38f5", - "versions.yml:md5,966689bbca491e03935dd21220e66a1e" + "versions.yml:md5,17ab59cf0e993cc8db9086093cdeb6e2", + "versions.yml:md5,3043c69a324445a251b7e9569bd012d3", + "versions.yml:md5,4dbd8db078f2e38fb335b8c3ee3db169" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-07-17T16:45:00.483599493" + "timestamp": "2024-11-06T15:30:39.622920828" }, "Summary1000bp": { "content": [ diff --git a/subworkflows/local/chunk_prepare_channel/tests/main.nf.test.snap b/subworkflows/local/chunk_prepare_channel/tests/main.nf.test.snap index 34ba7aa7..974d2ce6 100644 --- a/subworkflows/local/chunk_prepare_channel/tests/main.nf.test.snap +++ b/subworkflows/local/chunk_prepare_channel/tests/main.nf.test.snap @@ -2,16 +2,14 @@ "Prepare chunks channel error tool": { "content": [ [ - "N E X T F L O W ~ version 23.10.1", - "Launching `/mnt/c/Users/llenezet/Documents/Repositories/phaseimpute/.nf-test/tests/c7782a704e2a438fa20d101b0208a35d/meta/mock.nf` [hungry_wescoff] DSL2 - revision: c41c2d7547", "Only 'glimpse' and 'quilt' output format are supported. Got glimpse2" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-07-18T09:57:16.071041128" + "timestamp": "2024-11-06T15:30:55.291994433" }, "Prepare chunks channel Quilt": { "content": [ diff --git a/subworkflows/local/get_region/tests/main.nf.test.snap b/subworkflows/local/get_region/tests/main.nf.test.snap index 252b98d6..9f9e1934 100644 --- a/subworkflows/local/get_region/tests/main.nf.test.snap +++ b/subworkflows/local/get_region/tests/main.nf.test.snap @@ -20,16 +20,14 @@ "Should run with an error": { "content": [ [ - "N E X T F L O W ~ version 23.10.1", - "Launching `/mnt/c/Users/llenezet/Documents/Repositories/phaseimpute/.nf-test/tests/68cf57ba96afcf7b8ba9414fb03e77b1/meta/mock.nf` [angry_babbage] DSL2 - revision: d7db2c206c", "Invalid input_region: chr22:0-4000:4648" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-07-18T10:00:37.781505704" + "timestamp": "2024-11-06T15:31:15.872517093" }, "Should run with specified chr": { "content": [ diff --git a/subworkflows/local/utils_nfcore_chrcheck_pipeline/tests/function.nf.test.snap b/subworkflows/local/utils_nfcore_chrcheck_pipeline/tests/function.nf.test.snap new file mode 100644 index 00000000..ff0bf78b --- /dev/null +++ b/subworkflows/local/utils_nfcore_chrcheck_pipeline/tests/function.nf.test.snap @@ -0,0 +1,62 @@ +{ + "ref chr & target chr but missing contig": { + "content": [ + [ + "Contig names: [chr4] absent from file: 123.vcf and cannot be solved by adding or removing the `chr` prefix." + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.0" + }, + "timestamp": "2024-11-06T15:31:34.992652974" + }, + "Mix file with and withouth chr": { + "content": [ + [ + [ + "chr2", + "chr1" + ], + "nochr" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.0" + }, + "timestamp": "2024-11-06T15:31:39.923011027" + }, + "ref no chr & target chr": { + "content": [ + [ + [ + "chr2", + "chr1" + ], + "nochr" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.0" + }, + "timestamp": "2024-11-06T15:31:25.618460553" + }, + "ref chr & target no chr": { + "content": [ + [ + [ + "2", + "1" + ], + "chr" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.0" + }, + "timestamp": "2024-11-06T15:31:30.499438797" + } +} \ No newline at end of file diff --git a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test.snap b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test.snap index 2e183c6c..0e6a5ffb 100644 --- a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test.snap +++ b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test.snap @@ -23,29 +23,63 @@ }, "timestamp": "2024-07-12T17:12:47.079086374" }, + "Test checkFileIndex no error with empty channel": { + "content": null, + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.0" + }, + "timestamp": "2024-11-06T15:32:04.356171769" + }, "Test validateInputBatchTools only one vcf": { "content": [ [ - "When using a Variant Calling Format file as input, only one file can be provided. If you have multiple samples, please merge them into a single VCF file." + "ERROR ~ Cannot invoke \"groovyx.gpars.serial.SerialContext.add(groovyx.gpars.serial.SerialHandle)\" because \"this.context\" is null", + "", + " -- Check script '/mnt/s/Users/Main/Documents/Louis/Travail/IGDR/Repositories/phaseimpute/.nf-test-3966cf4e416fef97090bd07fa5b5d788.nf' at line: 38 or see '/mnt/s/Users/Main/Documents/Louis/Travail/IGDR/Repositories/phaseimpute/.nf-test/tests/3966cf4e416fef97090bd07fa5b5d788/meta/nextflow.log' file for more details" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.0" + }, + "timestamp": "2024-11-06T15:33:20.783776531" + }, + "Test checkMetaChr warning": { + "content": [ + [ + "N E X T F L O W ~ version 24.10.0", + "Launching `/mnt/s/Users/Main/Documents/Louis/Travail/IGDR/Repositories/phaseimpute/.nf-test-af0bb48a0b40b23797dfa4c90d16a9be.nf` [distracted_curie] DSL2 - revision: 1e291df575", + "WARN: Chr : [chrY] is missing from test" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.0" + }, + "timestamp": "2024-11-06T16:42:18.153356973" + }, + "Test Function exportCsv": { + "content": null, + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-10-16T20:08:33.571723823" + "timestamp": "2024-11-06T15:32:58.039856651" }, "Test validateInputBatchTools vcf only for glimpse": { "content": [ [ - "Stitch or Quilt software cannot run with VCF or BCF files. Please provide alignment files (i.e. BAM or CRAM)." + "ERROR ~ Cannot invoke \"groovyx.gpars.serial.SerialContext.add(groovyx.gpars.serial.SerialHandle)\" because \"this.context\" is null", + "", + " -- Check script '/mnt/s/Users/Main/Documents/Louis/Travail/IGDR/Repositories/phaseimpute/.nf-test-ee405acbb326c194af37173eb2b9b995.nf' at line: 38 or see '/mnt/s/Users/Main/Documents/Louis/Travail/IGDR/Repositories/phaseimpute/.nf-test/tests/ee405acbb326c194af37173eb2b9b995/meta/nextflow.log' file for more details" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-10-16T20:20:28.177195568" + "timestamp": "2024-11-06T15:33:15.239178517" }, "Test getFileExtension non empty list": { "content": [ @@ -75,13 +109,15 @@ "Test validateInputBatchTools error batch": { "content": [ [ - "Stitch or Glimpse1 software is selected and the number of input files (150) is less than the batch size (60). Splitting the input files in batches would induce batch effect." + "ERROR ~ Cannot invoke \"groovyx.gpars.serial.SerialContext.add(groovyx.gpars.serial.SerialHandle)\" because \"this.context\" is null", + "", + " -- Check script '/mnt/s/Users/Main/Documents/Louis/Travail/IGDR/Repositories/phaseimpute/.nf-test-5de66bc0f91fbd42ad23f770871f349d.nf' at line: 38 or see '/mnt/s/Users/Main/Documents/Louis/Travail/IGDR/Repositories/phaseimpute/.nf-test/tests/5de66bc0f91fbd42ad23f770871f349d/meta/nextflow.log' file for more details" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-10-16T20:27:27.025786146" + "timestamp": "2024-11-06T15:33:26.334112895" } } \ No newline at end of file diff --git a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/main.nf.test b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/main.nf.test index 238bc53c..d6d71c8d 100644 --- a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/main.nf.test +++ b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/main.nf.test @@ -23,10 +23,8 @@ nextflow_workflow { input[0] = false input[1] = false input[2] = false - input[3] = false - input[4] = [] - input[5] = "results" - input[6] = "" + input[3] = [] + input[4] = "results" """ } } @@ -55,10 +53,8 @@ nextflow_workflow { input[0] = false input[1] = false input[2] = false - input[3] = false - input[4] = [] - input[5] = "results" - input[6] = "" + input[3] = [] + input[4] = "results" """ } } @@ -86,10 +82,8 @@ nextflow_workflow { input[0] = false input[1] = false input[2] = false - input[3] = false - input[4] = [] - input[5] = "results" - input[6] = "" + input[3] = [] + input[4] = "results" """ } } diff --git a/subworkflows/local/vcf_concatenate_bcftools/tests/main.nf.test.snap b/subworkflows/local/vcf_concatenate_bcftools/tests/main.nf.test.snap index 3bddc9c8..7a4733d9 100644 --- a/subworkflows/local/vcf_concatenate_bcftools/tests/main.nf.test.snap +++ b/subworkflows/local/vcf_concatenate_bcftools/tests/main.nf.test.snap @@ -20,7 +20,7 @@ "id": "1000GP", "chr": "all" }, - "1000GP_all.vcf.gz:md5,9836dd74da2ddd7956adf3e4f83f80e1", + "1000GP_all.vcf.gz:md5,fc8f8ceff29246d96337302072f8a3bb", "1000GP_all.vcf.gz.tbi:md5,e7180bb953d2bd657c420a5f76a7164d" ] ], @@ -33,7 +33,7 @@ "id": "1000GP", "chr": "all" }, - "1000GP_all.vcf.gz:md5,9836dd74da2ddd7956adf3e4f83f80e1", + "1000GP_all.vcf.gz:md5,fc8f8ceff29246d96337302072f8a3bb", "1000GP_all.vcf.gz.tbi:md5,e7180bb953d2bd657c420a5f76a7164d" ] ], @@ -43,9 +43,9 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-07-18T11:56:36.85523481" + "timestamp": "2024-11-06T15:34:39.215613472" } } \ No newline at end of file diff --git a/subworkflows/local/vcf_concordance_glimpse2/tests/main.nf.test.snap b/subworkflows/local/vcf_concordance_glimpse2/tests/main.nf.test.snap index 478a073a..214b2b4c 100644 --- a/subworkflows/local/vcf_concordance_glimpse2/tests/main.nf.test.snap +++ b/subworkflows/local/vcf_concordance_glimpse2/tests/main.nf.test.snap @@ -7,7 +7,7 @@ { "id": "TestQuality" }, - "TestQuality.txt:md5,0e199fabdd479db15849394e148bd1e1" + "TestQuality.txt:md5,10e837d99ad7a390747962c0eed9babd" ] ], "1": [ @@ -85,7 +85,7 @@ { "id": "TestQuality" }, - "TestQuality.txt:md5,0e199fabdd479db15849394e148bd1e1" + "TestQuality.txt:md5,10e837d99ad7a390747962c0eed9babd" ] ], "versions": [ @@ -97,9 +97,9 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-07-17T12:39:49.843552307" + "timestamp": "2024-11-06T15:34:58.441704416" } } \ No newline at end of file diff --git a/subworkflows/local/vcf_normalize_bcftools/tests/main.nf.test.snap b/subworkflows/local/vcf_normalize_bcftools/tests/main.nf.test.snap index af3ae15d..6d2cf5b6 100644 --- a/subworkflows/local/vcf_normalize_bcftools/tests/main.nf.test.snap +++ b/subworkflows/local/vcf_normalize_bcftools/tests/main.nf.test.snap @@ -21,16 +21,16 @@ "id": "1000GP", "chr": "chr21" }, - "1000GP_chr21_fixed.vcf.gz:md5,07239edd29a6c5a8ca1c3226d0f83de5", - "1000GP_chr21_fixed.vcf.gz.tbi:md5,388eefaf444c084970d27dff0478b212" + "1000GP_chr21_fixed.vcf.gz:md5,7ba662a360af50800f160a68dc168375", + "1000GP_chr21_fixed.vcf.gz.tbi:md5,a6690d0553f532e3952d591d9c57ba71" ], [ { "id": "1000GP", "chr": "chr22" }, - "1000GP_chr22_fixed.vcf.gz:md5,5d4579b182241f5aa812206ac81835d7", - "1000GP_chr22_fixed.vcf.gz.tbi:md5,9088246d10963b3cd8704715dc09c436" + "1000GP_chr22_fixed.vcf.gz:md5,a00481ba39e0e0a769aa49d1e57ffb66", + "1000GP_chr22_fixed.vcf.gz.tbi:md5,3fb30aa704a97e35898a7a281d18ab29" ] ], "1": [ @@ -49,16 +49,16 @@ "id": "1000GP", "chr": "chr21" }, - "1000GP_chr21_fixed.vcf.gz:md5,07239edd29a6c5a8ca1c3226d0f83de5", - "1000GP_chr21_fixed.vcf.gz.tbi:md5,388eefaf444c084970d27dff0478b212" + "1000GP_chr21_fixed.vcf.gz:md5,7ba662a360af50800f160a68dc168375", + "1000GP_chr21_fixed.vcf.gz.tbi:md5,a6690d0553f532e3952d591d9c57ba71" ], [ { "id": "1000GP", "chr": "chr22" }, - "1000GP_chr22_fixed.vcf.gz:md5,5d4579b182241f5aa812206ac81835d7", - "1000GP_chr22_fixed.vcf.gz.tbi:md5,9088246d10963b3cd8704715dc09c436" + "1000GP_chr22_fixed.vcf.gz:md5,a00481ba39e0e0a769aa49d1e57ffb66", + "1000GP_chr22_fixed.vcf.gz.tbi:md5,3fb30aa704a97e35898a7a281d18ab29" ] ], "versions": [ @@ -74,10 +74,10 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-07-22T15:51:30.725699084" + "timestamp": "2024-11-06T15:35:50.602801842" }, "Norm content recomputed": { "content": [ @@ -101,7 +101,7 @@ "id": "1000GP", "chr": "chr21" }, - "1000GP_chr21_biallelic_snps.vcf.gz:md5,17746c80b9e02787f4cb950a3c2efa93", + "1000GP_chr21_biallelic_snps.vcf.gz:md5,2adaff4c1dc4168a152d56e98c42a687", "1000GP_chr21_biallelic_snps.vcf.gz.tbi:md5,006d0bec1050410aa64d427e2fad42e2" ], [ @@ -109,7 +109,7 @@ "id": "1000GP", "chr": "chr22" }, - "1000GP_chr22_biallelic_snps.vcf.gz:md5,817ebeceadcaea1e95f92c7b67659f28", + "1000GP_chr22_biallelic_snps.vcf.gz:md5,f5b6f95c3412181413cac2927a48c67b", "1000GP_chr22_biallelic_snps.vcf.gz.tbi:md5,d3460d21cacfbb15b34289454e2922a8" ] ], @@ -125,7 +125,7 @@ "id": "1000GP", "chr": "chr21" }, - "1000GP_chr21_biallelic_snps.vcf.gz:md5,17746c80b9e02787f4cb950a3c2efa93", + "1000GP_chr21_biallelic_snps.vcf.gz:md5,2adaff4c1dc4168a152d56e98c42a687", "1000GP_chr21_biallelic_snps.vcf.gz.tbi:md5,006d0bec1050410aa64d427e2fad42e2" ], [ @@ -133,7 +133,7 @@ "id": "1000GP", "chr": "chr22" }, - "1000GP_chr22_biallelic_snps.vcf.gz:md5,817ebeceadcaea1e95f92c7b67659f28", + "1000GP_chr22_biallelic_snps.vcf.gz:md5,f5b6f95c3412181413cac2927a48c67b", "1000GP_chr22_biallelic_snps.vcf.gz.tbi:md5,d3460d21cacfbb15b34289454e2922a8" ] ], @@ -146,9 +146,9 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-07-22T15:51:02.997348191" + "timestamp": "2024-11-06T15:35:24.336463059" } } \ No newline at end of file diff --git a/subworkflows/local/vcf_phase_shapeit5/tests/main.nf.test.snap b/subworkflows/local/vcf_phase_shapeit5/tests/main.nf.test.snap index ffa1c169..b8071863 100644 --- a/subworkflows/local/vcf_phase_shapeit5/tests/main.nf.test.snap +++ b/subworkflows/local/vcf_phase_shapeit5/tests/main.nf.test.snap @@ -21,16 +21,16 @@ "id": "1000GP", "chr": "chr21" }, - "1000GP.vcf.gz:md5,a8af1c991fb1ca9e0919e0d5ddae8968", - "1000GP.vcf.gz.csi:md5,b4c653bd398bb838b496e022705bb562" + "1000GP.vcf.gz:md5,fa076304a5451d471c5714f173677431", + "1000GP.vcf.gz.csi:md5,20c7a75a26dc678f9ecc2ab989a3a942" ], [ { "id": "1000GP", "chr": "chr22" }, - "1000GP.vcf.gz:md5,106157dc553c3c19eebdce0567e69d4f", - "1000GP.vcf.gz.csi:md5,58026cf302bd82382a078c5690429b5c" + "1000GP.vcf.gz:md5,13e3166bf4a0779c1c13bd87facc2297", + "1000GP.vcf.gz.csi:md5,ed1f6fd4d15139955d9d0e8bb6b2700f" ] ], "1": [ @@ -46,16 +46,16 @@ "id": "1000GP", "chr": "chr21" }, - "1000GP.vcf.gz:md5,a8af1c991fb1ca9e0919e0d5ddae8968", - "1000GP.vcf.gz.csi:md5,b4c653bd398bb838b496e022705bb562" + "1000GP.vcf.gz:md5,fa076304a5451d471c5714f173677431", + "1000GP.vcf.gz.csi:md5,20c7a75a26dc678f9ecc2ab989a3a942" ], [ { "id": "1000GP", "chr": "chr22" }, - "1000GP.vcf.gz:md5,106157dc553c3c19eebdce0567e69d4f", - "1000GP.vcf.gz.csi:md5,58026cf302bd82382a078c5690429b5c" + "1000GP.vcf.gz:md5,13e3166bf4a0779c1c13bd87facc2297", + "1000GP.vcf.gz.csi:md5,ed1f6fd4d15139955d9d0e8bb6b2700f" ] ], "versions": [ @@ -68,9 +68,9 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-07-22T15:46:34.727932091" + "timestamp": "2024-11-06T15:36:12.498553422" } } \ No newline at end of file diff --git a/subworkflows/local/vcf_split_bcftools/tests/main.nf.test.snap b/subworkflows/local/vcf_split_bcftools/tests/main.nf.test.snap index 8ffde0b8..2e8b257d 100644 --- a/subworkflows/local/vcf_split_bcftools/tests/main.nf.test.snap +++ b/subworkflows/local/vcf_split_bcftools/tests/main.nf.test.snap @@ -7,22 +7,22 @@ { "id": "NA12878" }, - "NA12878.vcf.gz:md5,af16cd340d33ffecc15dd6062b243232", + "NA12878.vcf.gz:md5,0ba553f8ab7319a53d6dd2a275c5df7c", "NA12878.vcf.gz.tbi:md5,31c12acb72d301cc69478c58b513d779" ], [ { "id": "NA19401" }, - "NA19401.vcf.gz:md5,09e2e2a30260310fe7db55edcf36b1c9", - "NA19401.vcf.gz.tbi:md5,8f93c5e7d94089d9b0313f1d7d7ba40d" + "NA19401.vcf.gz:md5,5f299ed6d9c5fb877e32786f41b1a762", + "NA19401.vcf.gz.tbi:md5,df50fdbb8acbbcdc2144b56cb5a946a8" ], [ { "id": "NA20359" }, - "NA20359.vcf.gz:md5,56cba6b61bcc14c42d92bf3708ebf621", - "NA20359.vcf.gz.tbi:md5,6bf326636fb91d7ffffad543763c5be1" + "NA20359.vcf.gz:md5,9b4896c27ab986f3a8699dc8e11c4182", + "NA20359.vcf.gz.tbi:md5,9ba59a25c5a6c07a0896d57ecf3103bd" ] ], "1": [ @@ -33,22 +33,22 @@ { "id": "NA12878" }, - "NA12878.vcf.gz:md5,af16cd340d33ffecc15dd6062b243232", + "NA12878.vcf.gz:md5,0ba553f8ab7319a53d6dd2a275c5df7c", "NA12878.vcf.gz.tbi:md5,31c12acb72d301cc69478c58b513d779" ], [ { "id": "NA19401" }, - "NA19401.vcf.gz:md5,09e2e2a30260310fe7db55edcf36b1c9", - "NA19401.vcf.gz.tbi:md5,8f93c5e7d94089d9b0313f1d7d7ba40d" + "NA19401.vcf.gz:md5,5f299ed6d9c5fb877e32786f41b1a762", + "NA19401.vcf.gz.tbi:md5,df50fdbb8acbbcdc2144b56cb5a946a8" ], [ { "id": "NA20359" }, - "NA20359.vcf.gz:md5,56cba6b61bcc14c42d92bf3708ebf621", - "NA20359.vcf.gz.tbi:md5,6bf326636fb91d7ffffad543763c5be1" + "NA20359.vcf.gz:md5,9b4896c27ab986f3a8699dc8e11c4182", + "NA20359.vcf.gz.tbi:md5,9ba59a25c5a6c07a0896d57ecf3103bd" ] ], "versions": [ @@ -57,10 +57,10 @@ } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-07-22T15:45:19.206308102" + "timestamp": "2024-11-06T15:36:41.842146898" }, "Phasing content": { "content": [ From c2a59ffcd6871927c804dd10a41b8bee4a29f79f Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Wed, 6 Nov 2024 17:42:12 +0100 Subject: [PATCH 19/32] Update nf-test --- .../local/vcf_impute_glimpse1/main.nf | 6 +- .../vcf_impute_glimpse1/tests/main.nf.test | 48 +-- .../tests/main.nf.test.snap | 333 ++++-------------- 3 files changed, 87 insertions(+), 300 deletions(-) diff --git a/subworkflows/local/vcf_impute_glimpse1/main.nf b/subworkflows/local/vcf_impute_glimpse1/main.nf index a0b36617..f1402986 100644 --- a/subworkflows/local/vcf_impute_glimpse1/main.nf +++ b/subworkflows/local/vcf_impute_glimpse1/main.nf @@ -7,7 +7,7 @@ include { BCFTOOLS_INDEX as BCFTOOLS_INDEX_2 } from '../../../modules/nf-core/bc workflow VCF_IMPUTE_GLIMPSE1 { take: - ch_input // channel (mandatory): [ [id], bam, bai ] + ch_input // channel (mandatory): [ [id], vcf, tbi ] ch_panel // channel (mandatory): [ [panel, chr], vcf, tbi ] ch_chunks // channel (optional): [ [panel, chr], region1, region2 ] @@ -29,8 +29,8 @@ workflow VCF_IMPUTE_GLIMPSE1 { // Join input and chunks reference ch_phase_input = ch_input .map{ metaIPC, vcf, index -> [metaIPC.subMap("panel", "chr"), metaIPC, vcf, index] } - .combine(samples_file) - .combine(ch_chunks_panel, by: 0) + .combine(samples_file).view() + .combine(ch_chunks_panel, by: 0).view() .combine(gmap_file) .map{ _metaPC, metaIPC, bam, bai, samples, regionin, regionout, panel, panel_index, gmap -> [metaIPC + ["chunk": regionout], diff --git a/subworkflows/local/vcf_impute_glimpse1/tests/main.nf.test b/subworkflows/local/vcf_impute_glimpse1/tests/main.nf.test index bea430e5..45d37de8 100644 --- a/subworkflows/local/vcf_impute_glimpse1/tests/main.nf.test +++ b/subworkflows/local/vcf_impute_glimpse1/tests/main.nf.test @@ -4,12 +4,12 @@ nextflow_workflow { script "../main.nf" config "./nextflow.config" - workflow "BAM_IMPUTE_GLIMPSE1" + workflow "VCF_IMPUTE_GLIMPSE1" tag "subworkflows" tag "subworkflows_local" - tag "subworkflows/bam_impute_glimpse1" - tag "bam_impute_glimpse1" + tag "subworkflows/vcf_impute_glimpse1" + tag "vcf_impute_glimpse1" tag "bam_gl_bcftools" tag "glimpse" @@ -24,34 +24,25 @@ nextflow_workflow { """ input[0] = Channel.fromList([ [ - [id: "NA12878"], + [id: "NA12878", panel: "1000GP", chr: "22"], file(params.pipelines_testdata_base_path + "hum_data/individuals/NA12878/NA12878.s.bcf", checkIfExist:true), file(params.pipelines_testdata_base_path + "hum_data/individuals/NA12878/NA12878.s.bcf.csi", checkIfExist:true), ], [ - [id: "NA19401"], + [id: "NA19401", panel: "1000GP", chr: "22"], file(params.pipelines_testdata_base_path + "hum_data/individuals/NA19401/NA19401.s.bcf", checkIfExist:true), file(params.pipelines_testdata_base_path + "hum_data/individuals/NA19401/NA19401.s.bcf.csi", checkIfExist:true), ], ]) input[1] = Channel.of([ - [id: "1000GP", chr: "22"], - file(params.pipelines_testdata_base_path + "hum_data/panel/chr22/1000GP.chr22.legend.gz", checkIfExist:true) - ]).collect() - input[2] = Channel.of([ [id: "1000GP", chr: "22"], file(params.pipelines_testdata_base_path + "hum_data/panel/chr22/1000GP.chr22.s.norel.vcf.gz", checkIfExist:true), file(params.pipelines_testdata_base_path + "hum_data/panel/chr22/1000GP.chr22.s.norel.vcf.gz.csi", checkIfExist:true), ]).collect() - input[3] = Channel.of( + input[2] = Channel.of( [[chr: "22", id: "1000GP"], "chr22:16570065-16597215", "chr22:16570065-16592216"], [[chr: "22", id: "1000GP"], "chr22:16587172-16609999", "chr22:16592229-16609999"] ) - input[4] = Channel.of([ - [id: "GRCh38"], - file(params.pipelines_testdata_base_path + "hum_data/reference_genome/GRCh38.s.fa.gz", checkIfExist:true), - file(params.pipelines_testdata_base_path + "hum_data/reference_genome/GRCh38.s.fa.gz.fai", checkIfExist:true), - ]).collect() """ } } @@ -59,8 +50,11 @@ nextflow_workflow { then { assertAll( { assert workflow.success }, - { assert snapshot(workflow.out).match() }, - { assert snapshot(workflow.out.vcf_tbi.collect{ path(it[1]).vcf.summary }).match("Summary_two_vcf") } + { assert snapshot( + workflow.out, + workflow.out.vcf_tbi.collect{ path(it[1]).vcf.summary }, + workflow.out.vcf_tbi.collect{ path(it[1]).vcf.header.getGenotypeSamples().sort() } + ).match() } ) } } @@ -71,29 +65,20 @@ nextflow_workflow { """ input[0] = Channel.fromList([ [ - [id: "NA12878"], + [id: "NA12878", panel: "1000GP", chr: "22"], file(params.pipelines_testdata_base_path + "hum_data/individuals/NA12878/NA12878.s.bcf", checkIfExist:true), file(params.pipelines_testdata_base_path + "hum_data/individuals/NA12878/NA12878.s.bcf.csi", checkIfExist:true), ] ]) input[1] = Channel.of([ - [id: "1000GP", chr: "22"], - file(params.pipelines_testdata_base_path + "hum_data/panel/chr22/1000GP.chr22.legend.gz", checkIfExist:true) - ]).collect() - input[2] = Channel.of([ [id: "1000GP", chr: "22"], file(params.pipelines_testdata_base_path + "hum_data/panel/chr22/1000GP.chr22.s.norel.vcf.gz", checkIfExist:true), file(params.pipelines_testdata_base_path + "hum_data/panel/chr22/1000GP.chr22.s.norel.vcf.gz.csi", checkIfExist:true), ]).collect() - input[3] = Channel.of( + input[2] = Channel.of( [[chr: "22", id: "1000GP"], "chr22:16570065-16597215", "chr22:16570065-16592216"], [[chr: "22", id: "1000GP"], "chr22:16587172-16609999", "chr22:16592229-16609999"] ) - input[4] = Channel.of([ - [id: "GRCh38"], - file(params.pipelines_testdata_base_path + "hum_data/reference_genome/GRCh38.s.fa.gz", checkIfExist:true), - file(params.pipelines_testdata_base_path + "hum_data/reference_genome/GRCh38.s.fa.gz.fai", checkIfExist:true), - ]).collect() """ } } @@ -101,8 +86,11 @@ nextflow_workflow { then { assertAll( { assert workflow.success }, - { assert snapshot(workflow.out).match() }, - { assert snapshot(workflow.out.vcf_tbi.collect{ path(it[1]).vcf.summary }).match("Summary_one_vcf") } + { assert snapshot( + workflow.out, + workflow.out.vcf_tbi.collect{ path(it[1]).vcf.summary }, + workflow.out.vcf_tbi.collect{ path(it[1]).vcf.header.getGenotypeSamples().sort() } + ).match() } ) } } diff --git a/subworkflows/local/vcf_impute_glimpse1/tests/main.nf.test.snap b/subworkflows/local/vcf_impute_glimpse1/tests/main.nf.test.snap index 914a5877..8bd6f81c 100644 --- a/subworkflows/local/vcf_impute_glimpse1/tests/main.nf.test.snap +++ b/subworkflows/local/vcf_impute_glimpse1/tests/main.nf.test.snap @@ -1,16 +1,4 @@ { - "Summary_one_vcf": { - "content": [ - [ - "VcfFile [chromosomes=[chr22], sampleCount=1, variantCount=903, phased=false, phasedAutodetect=false]" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" - }, - "timestamp": "2024-10-15T20:18:10.29281923" - }, "Impute with glimpse1 one vcf": { "content": [ { @@ -22,19 +10,17 @@ "chr": "22", "tools": "glimpse1" }, - "NA12878_22_ligate.vcf.gz:md5,001cfd63118b26a767149d88d295e770", + "NA12878_22_ligate.vcf.gz:md5,3a6cbabaafd2772afa140e02d3fe3238", "NA12878_22_ligate.vcf.gz.tbi:md5,870a906079573453167617fc818638ab" ] ], "1": [ - "versions.yml:md5,37a7932cdb5436e6de517224997782b7", - "versions.yml:md5,37a7932cdb5436e6de517224997782b7", - "versions.yml:md5,a3db5c2981d19a6f37340bb9c7cede83", - "versions.yml:md5,a3db5c2981d19a6f37340bb9c7cede83", - "versions.yml:md5,ba880476e98fa9825649bb9d394a96b5", - "versions.yml:md5,cffe7f76c26424afef6177533d1b8768", - "versions.yml:md5,e554dad12029fb193020cbcdbc1519cc", - "versions.yml:md5,f630355fc3b592f13a2ca2f1edd4aad1" + "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", + "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", + "versions.yml:md5,8c79d92b93fe75a9094499ce5d5eaca2", + "versions.yml:md5,9d78fceae32ec42b1818bb5890e9a6ba", + "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa", + "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa" ], "2": [ @@ -50,27 +36,33 @@ "chr": "22", "tools": "glimpse1" }, - "NA12878_22_ligate.vcf.gz:md5,001cfd63118b26a767149d88d295e770", + "NA12878_22_ligate.vcf.gz:md5,3a6cbabaafd2772afa140e02d3fe3238", "NA12878_22_ligate.vcf.gz.tbi:md5,870a906079573453167617fc818638ab" ] ], "versions": [ - "versions.yml:md5,37a7932cdb5436e6de517224997782b7", - "versions.yml:md5,37a7932cdb5436e6de517224997782b7", - "versions.yml:md5,a3db5c2981d19a6f37340bb9c7cede83", - "versions.yml:md5,a3db5c2981d19a6f37340bb9c7cede83", - "versions.yml:md5,ba880476e98fa9825649bb9d394a96b5", - "versions.yml:md5,cffe7f76c26424afef6177533d1b8768", - "versions.yml:md5,e554dad12029fb193020cbcdbc1519cc", - "versions.yml:md5,f630355fc3b592f13a2ca2f1edd4aad1" + "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", + "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", + "versions.yml:md5,8c79d92b93fe75a9094499ce5d5eaca2", + "versions.yml:md5,9d78fceae32ec42b1818bb5890e9a6ba", + "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa", + "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa" + ] + }, + [ + "VcfFile [chromosomes=[chr22], sampleCount=1, variantCount=903, phased=false, phasedAutodetect=false]" + ], + [ + [ + "NA12878" ] - } + ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-10-15T20:18:02.133587421" + "timestamp": "2024-11-06T17:41:06.29924786" }, "Impute with glimpse1 two vcf": { "content": [ @@ -83,8 +75,8 @@ "chr": "22", "tools": "glimpse1" }, - "NA12878_22_ligate.vcf.gz:md5,425adcee9993cd20735d6805aed0a8fc", - "NA12878_22_ligate.vcf.gz.tbi:md5,e642114e10be3e2d0bc7a2ba4ecf71f0" + "NA12878_22_ligate.vcf.gz:md5,9dade6f748ddd821ec01775ad378ba42", + "NA12878_22_ligate.vcf.gz.tbi:md5,870a906079573453167617fc818638ab" ], [ { @@ -93,25 +85,23 @@ "chr": "22", "tools": "glimpse1" }, - "NA19401_22_ligate.vcf.gz:md5,4ce47dfb271878e1e33d333ad97e70ac", + "NA19401_22_ligate.vcf.gz:md5,4c684a116c49da91d7271793f89f95e4", "NA19401_22_ligate.vcf.gz.tbi:md5,7efba07d4dec3b525149f459c08d853b" ] ], "1": [ - "versions.yml:md5,37a7932cdb5436e6de517224997782b7", - "versions.yml:md5,37a7932cdb5436e6de517224997782b7", - "versions.yml:md5,37a7932cdb5436e6de517224997782b7", - "versions.yml:md5,37a7932cdb5436e6de517224997782b7", - "versions.yml:md5,a3db5c2981d19a6f37340bb9c7cede83", - "versions.yml:md5,a3db5c2981d19a6f37340bb9c7cede83", - "versions.yml:md5,a3db5c2981d19a6f37340bb9c7cede83", - "versions.yml:md5,a3db5c2981d19a6f37340bb9c7cede83", - "versions.yml:md5,ba880476e98fa9825649bb9d394a96b5", - "versions.yml:md5,ba880476e98fa9825649bb9d394a96b5", - "versions.yml:md5,cffe7f76c26424afef6177533d1b8768", - "versions.yml:md5,cffe7f76c26424afef6177533d1b8768", - "versions.yml:md5,e554dad12029fb193020cbcdbc1519cc", - "versions.yml:md5,f630355fc3b592f13a2ca2f1edd4aad1" + "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", + "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", + "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", + "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", + "versions.yml:md5,8c79d92b93fe75a9094499ce5d5eaca2", + "versions.yml:md5,8c79d92b93fe75a9094499ce5d5eaca2", + "versions.yml:md5,9d78fceae32ec42b1818bb5890e9a6ba", + "versions.yml:md5,9d78fceae32ec42b1818bb5890e9a6ba", + "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa", + "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa", + "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa", + "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa" ], "2": [ @@ -127,8 +117,8 @@ "chr": "22", "tools": "glimpse1" }, - "NA12878_22_ligate.vcf.gz:md5,425adcee9993cd20735d6805aed0a8fc", - "NA12878_22_ligate.vcf.gz.tbi:md5,e642114e10be3e2d0bc7a2ba4ecf71f0" + "NA12878_22_ligate.vcf.gz:md5,9dade6f748ddd821ec01775ad378ba42", + "NA12878_22_ligate.vcf.gz.tbi:md5,870a906079573453167617fc818638ab" ], [ { @@ -137,233 +127,42 @@ "chr": "22", "tools": "glimpse1" }, - "NA19401_22_ligate.vcf.gz:md5,4ce47dfb271878e1e33d333ad97e70ac", + "NA19401_22_ligate.vcf.gz:md5,4c684a116c49da91d7271793f89f95e4", "NA19401_22_ligate.vcf.gz.tbi:md5,7efba07d4dec3b525149f459c08d853b" ] ], "versions": [ - "versions.yml:md5,37a7932cdb5436e6de517224997782b7", - "versions.yml:md5,37a7932cdb5436e6de517224997782b7", - "versions.yml:md5,37a7932cdb5436e6de517224997782b7", - "versions.yml:md5,37a7932cdb5436e6de517224997782b7", - "versions.yml:md5,a3db5c2981d19a6f37340bb9c7cede83", - "versions.yml:md5,a3db5c2981d19a6f37340bb9c7cede83", - "versions.yml:md5,a3db5c2981d19a6f37340bb9c7cede83", - "versions.yml:md5,a3db5c2981d19a6f37340bb9c7cede83", - "versions.yml:md5,ba880476e98fa9825649bb9d394a96b5", - "versions.yml:md5,ba880476e98fa9825649bb9d394a96b5", - "versions.yml:md5,cffe7f76c26424afef6177533d1b8768", - "versions.yml:md5,cffe7f76c26424afef6177533d1b8768", - "versions.yml:md5,e554dad12029fb193020cbcdbc1519cc", - "versions.yml:md5,f630355fc3b592f13a2ca2f1edd4aad1" + "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", + "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", + "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", + "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", + "versions.yml:md5,8c79d92b93fe75a9094499ce5d5eaca2", + "versions.yml:md5,8c79d92b93fe75a9094499ce5d5eaca2", + "versions.yml:md5,9d78fceae32ec42b1818bb5890e9a6ba", + "versions.yml:md5,9d78fceae32ec42b1818bb5890e9a6ba", + "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa", + "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa", + "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa", + "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa" ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" - }, - "timestamp": "2024-10-15T20:17:35.167720938" - }, - "Summary_two_vcf": { - "content": [ + }, [ "VcfFile [chromosomes=[chr22], sampleCount=1, variantCount=903, phased=false, phasedAutodetect=false]", "VcfFile [chromosomes=[chr22], sampleCount=1, variantCount=903, phased=false, phasedAutodetect=false]" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" - }, - "timestamp": "2024-10-15T20:16:04.438014299" - }, - "Summary_two_merged": { - "content": [ + ], [ - "VcfFile [chromosomes=[chr22], sampleCount=2, variantCount=903, phased=false, phasedAutodetect=false]" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" - }, - "timestamp": "2024-10-15T19:12:26.717097717" - }, - "Summary_one": { - "content": [ - [ - "VcfFile [chromosomes=[chr22], sampleCount=1, variantCount=903, phased=false, phasedAutodetect=false]" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" - }, - "timestamp": "2024-10-15T18:51:53.265129979" - }, - "Impute with glimpse1 two target": { - "content": [ - { - "0": [ - [ - { - "panel": "1000GP", - "chr": "22", - "id": "all", - "metas": [ - { - "id": "NA19401", - "panel": "1000GP", - "chr": "22" - }, - { - "id": "NA12878", - "panel": "1000GP", - "chr": "22" - } - ], - "variantcaller": "bcftools", - "tools": "glimpse1" - }, - "all_22_ligate.vcf.gz:md5,b0c1703dee27ea6cc1fd8bb1f4835c05", - "all_22_ligate.vcf.gz.tbi:md5,7280c66fe369a2737c6137c4f5c1ccfd" - ] - ], - "1": [ - "versions.yml:md5,37a7932cdb5436e6de517224997782b7", - "versions.yml:md5,37a7932cdb5436e6de517224997782b7", - "versions.yml:md5,470f38ebb4e2333ff70702df9716dfa2", - "versions.yml:md5,470f38ebb4e2333ff70702df9716dfa2", - "versions.yml:md5,a3db5c2981d19a6f37340bb9c7cede83", - "versions.yml:md5,a3db5c2981d19a6f37340bb9c7cede83", - "versions.yml:md5,ba880476e98fa9825649bb9d394a96b5", - "versions.yml:md5,c31f44e734475e947185393613d55450", - "versions.yml:md5,cffe7f76c26424afef6177533d1b8768", - "versions.yml:md5,e554dad12029fb193020cbcdbc1519cc", - "versions.yml:md5,f630355fc3b592f13a2ca2f1edd4aad1", - "versions.yml:md5,fe05ac885c0841c53f9f4a1cbae5d9e9" - ], - "2": [ - "NA12878.bcftools_stats.txt:md5,4cacbe4d6dfba4a8035e37611c91923c", - "NA19401.bcftools_stats.txt:md5,f91fd586acfdf3845d111a062fbb263f" - ], - "multiqc_files": [ - "NA12878.bcftools_stats.txt:md5,4cacbe4d6dfba4a8035e37611c91923c", - "NA19401.bcftools_stats.txt:md5,f91fd586acfdf3845d111a062fbb263f" - ], - "vcf_tbi": [ - [ - { - "panel": "1000GP", - "chr": "22", - "id": "all", - "metas": [ - { - "id": "NA19401", - "panel": "1000GP", - "chr": "22" - }, - { - "id": "NA12878", - "panel": "1000GP", - "chr": "22" - } - ], - "variantcaller": "bcftools", - "tools": "glimpse1" - }, - "all_22_ligate.vcf.gz:md5,b0c1703dee27ea6cc1fd8bb1f4835c05", - "all_22_ligate.vcf.gz.tbi:md5,7280c66fe369a2737c6137c4f5c1ccfd" - ] - ], - "versions": [ - "versions.yml:md5,37a7932cdb5436e6de517224997782b7", - "versions.yml:md5,37a7932cdb5436e6de517224997782b7", - "versions.yml:md5,470f38ebb4e2333ff70702df9716dfa2", - "versions.yml:md5,470f38ebb4e2333ff70702df9716dfa2", - "versions.yml:md5,a3db5c2981d19a6f37340bb9c7cede83", - "versions.yml:md5,a3db5c2981d19a6f37340bb9c7cede83", - "versions.yml:md5,ba880476e98fa9825649bb9d394a96b5", - "versions.yml:md5,c31f44e734475e947185393613d55450", - "versions.yml:md5,cffe7f76c26424afef6177533d1b8768", - "versions.yml:md5,e554dad12029fb193020cbcdbc1519cc", - "versions.yml:md5,f630355fc3b592f13a2ca2f1edd4aad1", - "versions.yml:md5,fe05ac885c0841c53f9f4a1cbae5d9e9" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" - }, - "timestamp": "2024-10-15T20:18:58.997991111" - }, - "Impute with glimpse1 one target": { - "content": [ - { - "0": [ - [ - { - "id": "NA12878", - "panel": "1000GP", - "chr": "22", - "variantcaller": "bcftools", - "tools": "glimpse1" - }, - "NA12878_22_ligate.vcf.gz:md5,3ca556e82a6d1eb0e1b85d6ee3e60382", - "NA12878_22_ligate.vcf.gz.tbi:md5,e642114e10be3e2d0bc7a2ba4ecf71f0" - ] - ], - "1": [ - "versions.yml:md5,37a7932cdb5436e6de517224997782b7", - "versions.yml:md5,37a7932cdb5436e6de517224997782b7", - "versions.yml:md5,470f38ebb4e2333ff70702df9716dfa2", - "versions.yml:md5,a3db5c2981d19a6f37340bb9c7cede83", - "versions.yml:md5,a3db5c2981d19a6f37340bb9c7cede83", - "versions.yml:md5,ba880476e98fa9825649bb9d394a96b5", - "versions.yml:md5,cffe7f76c26424afef6177533d1b8768", - "versions.yml:md5,e554dad12029fb193020cbcdbc1519cc", - "versions.yml:md5,f630355fc3b592f13a2ca2f1edd4aad1", - "versions.yml:md5,fe05ac885c0841c53f9f4a1cbae5d9e9" - ], - "2": [ - "NA12878.bcftools_stats.txt:md5,4cacbe4d6dfba4a8035e37611c91923c" - ], - "multiqc_files": [ - "NA12878.bcftools_stats.txt:md5,4cacbe4d6dfba4a8035e37611c91923c" + [ + "NA12878" ], - "vcf_tbi": [ - [ - { - "id": "NA12878", - "panel": "1000GP", - "chr": "22", - "variantcaller": "bcftools", - "tools": "glimpse1" - }, - "NA12878_22_ligate.vcf.gz:md5,3ca556e82a6d1eb0e1b85d6ee3e60382", - "NA12878_22_ligate.vcf.gz.tbi:md5,e642114e10be3e2d0bc7a2ba4ecf71f0" - ] - ], - "versions": [ - "versions.yml:md5,37a7932cdb5436e6de517224997782b7", - "versions.yml:md5,37a7932cdb5436e6de517224997782b7", - "versions.yml:md5,470f38ebb4e2333ff70702df9716dfa2", - "versions.yml:md5,a3db5c2981d19a6f37340bb9c7cede83", - "versions.yml:md5,a3db5c2981d19a6f37340bb9c7cede83", - "versions.yml:md5,ba880476e98fa9825649bb9d394a96b5", - "versions.yml:md5,cffe7f76c26424afef6177533d1b8768", - "versions.yml:md5,e554dad12029fb193020cbcdbc1519cc", - "versions.yml:md5,f630355fc3b592f13a2ca2f1edd4aad1", - "versions.yml:md5,fe05ac885c0841c53f9f4a1cbae5d9e9" + [ + "NA19401" ] - } + ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-10-15T20:19:46.19707687" + "timestamp": "2024-11-06T17:40:48.121360395" } } \ No newline at end of file From 01a51d067bee88b0cf795760cd7bdf43ee450084 Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Wed, 6 Nov 2024 17:47:08 +0100 Subject: [PATCH 20/32] Update nf-test --- workflows/chrcheck/tests/main.nf.test | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/workflows/chrcheck/tests/main.nf.test b/workflows/chrcheck/tests/main.nf.test index 367e24c1..c6e063af 100644 --- a/workflows/chrcheck/tests/main.nf.test +++ b/workflows/chrcheck/tests/main.nf.test @@ -26,14 +26,14 @@ nextflow_workflow { input[0] = Channel.fromList([ [ [id: "VCF_chr22"], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz',checkIfExist:true), - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz.tbi',checkIfExist:true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz',checkIfExist:true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz.tbi',checkIfExist:true), ["22"] ], [ [id: "BAM_chr22"], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExist:true), - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExist:true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExist:true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExist:true), ["22"] ] ]) @@ -74,8 +74,8 @@ nextflow_workflow { input[0] = Channel.fromList([ [ [id: "BAM_22"], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExist:true), - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExist:true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExist:true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExist:true), "nochr" ] ]) @@ -91,8 +91,8 @@ nextflow_workflow { Channel.fromList([ [ [id: "VCF_AllNoChr"], - file("https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/vcf/NA24385_sv.vcf.gz",checkIfExist:true), - file("https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/illumina/vcf/NA24385_sv.vcf.gz.tbi",checkIfExist:true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/vcf/NA24385_sv.vcf.gz',checkIfExist:true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/vcf/NA24385_sv.vcf.gz.tbi',checkIfExist:true), ], ]) ) @@ -131,8 +131,8 @@ nextflow_workflow { input[0] = Channel.fromList([ [ [id: "VCF_chr22"], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz',checkIfExist:true), - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz.tbi',checkIfExist:true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz',checkIfExist:true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz.tbi',checkIfExist:true), ["22"] ] ]) @@ -158,8 +158,8 @@ nextflow_workflow { input[0] = Channel.fromList([ [ [id: "BAM_chr22"], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExist:true), - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExist:true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExist:true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExist:true), ["22"] ] ]) @@ -186,8 +186,8 @@ nextflow_workflow { input[0] = Channel.fromList([ [ [id: "VCF_AllNoChr"], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/illumina/vcf/NA24385_sv.vcf.gz',checkIfExist:true), - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/illumina/vcf/NA24385_sv.vcf.gz.tbi',checkIfExist:true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/vcf/NA24385_sv.vcf.gz',checkIfExist:true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/vcf/NA24385_sv.vcf.gz.tbi',checkIfExist:true), lst_chr ], ]) @@ -211,8 +211,8 @@ nextflow_workflow { input[0] = Channel.fromList([ [ [id: "BAM_chr22"], - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExist:true), - file(params.modules_testdata_base_path + '/genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExist:true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExist:true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExist:true), ["chr1"] ], ]) From 0d20965a648d8be6d62633282b4e0075e94af559 Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Wed, 6 Nov 2024 20:50:48 +0100 Subject: [PATCH 21/32] Remove .view() --- subworkflows/local/vcf_impute_glimpse1/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subworkflows/local/vcf_impute_glimpse1/main.nf b/subworkflows/local/vcf_impute_glimpse1/main.nf index f1402986..25177676 100644 --- a/subworkflows/local/vcf_impute_glimpse1/main.nf +++ b/subworkflows/local/vcf_impute_glimpse1/main.nf @@ -29,8 +29,8 @@ workflow VCF_IMPUTE_GLIMPSE1 { // Join input and chunks reference ch_phase_input = ch_input .map{ metaIPC, vcf, index -> [metaIPC.subMap("panel", "chr"), metaIPC, vcf, index] } - .combine(samples_file).view() - .combine(ch_chunks_panel, by: 0).view() + .combine(samples_file) + .combine(ch_chunks_panel, by: 0) .combine(gmap_file) .map{ _metaPC, metaIPC, bam, bai, samples, regionin, regionout, panel, panel_index, gmap -> [metaIPC + ["chunk": regionout], From bbc99d7f3a8705d2d21548e3314c3eaab8f0a419 Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Wed, 6 Nov 2024 20:51:18 +0100 Subject: [PATCH 22/32] Set resourceLimits --- conf/test.config | 4 ++-- workflows/chrcheck/tests/nextflow.config | 9 ++++++++- workflows/chrcheck/tests/nextflow_rename.config | 9 ++++++++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/conf/test.config b/conf/test.config index f5c7b8dd..8a7c8c2b 100644 --- a/conf/test.config +++ b/conf/test.config @@ -12,8 +12,8 @@ process { resourceLimits = [ - cpus: 4, - memory: '15.GB', + cpus: 2, + memory: '2.GB', time: '1.h' ] } diff --git a/workflows/chrcheck/tests/nextflow.config b/workflows/chrcheck/tests/nextflow.config index d454193d..43b74e31 100644 --- a/workflows/chrcheck/tests/nextflow.config +++ b/workflows/chrcheck/tests/nextflow.config @@ -1,5 +1,12 @@ +process { + resourceLimits = [ + cpus: 2, + memory: '7.GB', + time: '1.h' + ] +} + params { - max_memory = '7.GB' rename_chr = false max_chr_names = 4 } diff --git a/workflows/chrcheck/tests/nextflow_rename.config b/workflows/chrcheck/tests/nextflow_rename.config index 65e780a3..bd0e1f3c 100644 --- a/workflows/chrcheck/tests/nextflow_rename.config +++ b/workflows/chrcheck/tests/nextflow_rename.config @@ -1,5 +1,12 @@ +process { + resourceLimits = [ + cpus: 2, + memory: '7.GB', + time: '1.h' + ] +} + params { - max_memory = '7.GB' rename_chr = true max_chr_names = 4 } From ebf7f9ea3dedfd6922cb3c11e13e2b41c8c6966a Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Wed, 6 Nov 2024 20:56:38 +0100 Subject: [PATCH 23/32] Fix region processed with subset --- CHANGELOG.md | 1 + .../utils_nfcore_phaseimpute_pipeline/main.nf | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d44c730..bee89a55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -74,6 +74,7 @@ Initial release of nf-core/phaseimpute, created with the [nf-core](https://nf-co - [#75](https://github.com/nf-core/phaseimpute/pull/75) - Set frequency computation with VCFFIXUP process as optional with `--compute_freq`. Use Glimpse_chunk on panel vcf to compute the chunk and not makewindows on fasta. - [#117](https://github.com/nf-core/phaseimpute/pull/117) - Fix directories in CSV. - [#151](https://github.com/nf-core/phaseimpute/pull/151) - Fix `Type not supported: class org.codehaus.groovy.runtime.GStringImpl` error due to `String` test in `getFileExtension()`. +- [#153](https://github.com/nf-core/phaseimpute/pull/153) - Fix contigs usage when regions is only a subset of the given contigs (e.g. if panel file has the 22 chr and the region file only 2 then only the 2 common will be processed). ### `Dependencies` diff --git a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf index 3d07de32..8c59bdaa 100644 --- a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf @@ -275,6 +275,25 @@ workflow PIPELINE_INITIALISATION { .collect() .subscribe { log.info "The following contigs will be processed: ${it}" } + // Remove other contigs from panel and posfile files + ch_panel = ch_panel + .combine(ch_regions.collect{ it[0]["chr"]}.toList()) + .filter { meta, _vcf, _index, chrs -> + meta.chr in chrs + } + .map {meta, vcf, index, _chrs -> + [meta, vcf, index] + } + + ch_posfile = ch_posfile + .combine(ch_regions.collect{ it[0]["chr"]}.toList()) + .filter { meta, _vcf, _index, _hap, _legend, chrs -> + meta.chr in chrs + } + .map {meta, vcf, index, hap, legend, _chrs -> + [meta, vcf, index, hap, legend] + } + // Check that all input files have the correct index checkFileIndex(ch_input.mix(ch_input_truth, ch_ref_gen, ch_panel)) From c7af9b8d2063c42dc0b07785543cbcebacadf18a Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Wed, 6 Nov 2024 20:57:22 +0100 Subject: [PATCH 24/32] Set resourceLimits --- conf/test_all.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/test_all.config b/conf/test_all.config index 854f8664..c1b0057f 100644 --- a/conf/test_all.config +++ b/conf/test_all.config @@ -13,7 +13,7 @@ process { resourceLimits = [ cpus: 2, - memory: '10.GB', + memory: '7.GB', time: '1.h' ] } From 5f864479bad86dc96de3a4465713abdc014e7baa Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Wed, 6 Nov 2024 21:17:17 +0100 Subject: [PATCH 25/32] Update nf-test --- workflows/phaseimpute/tests/main.nf.test.snap | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/workflows/phaseimpute/tests/main.nf.test.snap b/workflows/phaseimpute/tests/main.nf.test.snap index 5cb0c564..336b9585 100644 --- a/workflows/phaseimpute/tests/main.nf.test.snap +++ b/workflows/phaseimpute/tests/main.nf.test.snap @@ -190,10 +190,10 @@ ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-10-25T19:14:20.211846091" + "timestamp": "2024-11-06T21:16:53.209347713" }, "Check test_batch": { "content": [ @@ -232,17 +232,17 @@ ], "VcfFile [chromosomes=[chr21, chr22], sampleCount=2, variantCount=1739, phased=true]", [ - "NA19401", - "NA20359" + "NA12878", + "NA19401" ], "VcfFile [chromosomes=[chr21, chr22], sampleCount=2, variantCount=1739, phased=true]", [ - "NA19401", - "NA20359" + "NA12878", + "NA19401" ], "VcfFile [chromosomes=[chr21, chr22], sampleCount=1, variantCount=1739, phased=true]", [ - "NA12878" + "NA20359" ], "VcfFile [chromosomes=[chr21, chr22], sampleCount=1, variantCount=1739, phased=true]", [ @@ -268,10 +268,10 @@ ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" + "nf-test": "0.9.2", + "nextflow": "24.10.0" }, - "timestamp": "2024-10-25T19:25:15.563226326" + "timestamp": "2024-11-06T21:03:44.505303287" }, "Check test_quilt": { "content": [ From 9f814d8b2e4bbce5b23388fea231e51f8087399c Mon Sep 17 00:00:00 2001 From: Louis Le Nezet Date: Thu, 7 Nov 2024 14:14:40 +0100 Subject: [PATCH 26/32] Update nf-test --- .../tests/main.nf.test | 32 ++- .../tests/main.nf.test.snap | 142 ++++--------- .../tests/main.nf.test | 26 ++- .../tests/main.nf.test.snap | 170 +++++---------- .../local/bam_gl_bcftools/tests/main.nf.test | 26 ++- .../bam_gl_bcftools/tests/main.nf.test.snap | 198 +++++------------- .../bam_impute_glimpse2/tests/main.nf.test | 21 +- .../tests/main.nf.test.snap | 192 ++++++----------- .../local/bam_impute_quilt/tests/main.nf.test | 14 +- .../bam_impute_quilt/tests/main.nf.test.snap | 172 +++++---------- .../bam_impute_stitch/tests/main.nf.test | 7 +- .../bam_impute_stitch/tests/main.nf.test.snap | 55 ++--- .../bam_region_samtools/tests/main.nf.test | 26 ++- .../tests/main.nf.test.snap | 142 ++----------- .../tests/function.nf.test.snap | 26 ++- .../tests/main.nf.test | 16 +- .../tests/main.nf.test.snap | 56 ++--- .../tests/main.nf.test.snap | 8 +- .../vcf_impute_glimpse1/tests/main.nf.test | 14 +- .../tests/main.nf.test.snap | 186 +++++----------- .../vcf_normalize_bcftools/tests/main.nf.test | 38 +++- .../tests/main.nf.test.snap | 196 ++++++----------- .../vcf_phase_shapeit5/tests/main.nf.test | 16 +- .../tests/main.nf.test.snap | 92 +++----- .../vcf_split_bcftools/tests/main.nf.test | 16 +- .../tests/main.nf.test.snap | 89 +++----- 26 files changed, 711 insertions(+), 1265 deletions(-) diff --git a/subworkflows/local/bam_chr_rename_samtools/tests/main.nf.test b/subworkflows/local/bam_chr_rename_samtools/tests/main.nf.test index 0ab9cbf3..0e3dda5b 100644 --- a/subworkflows/local/bam_chr_rename_samtools/tests/main.nf.test +++ b/subworkflows/local/bam_chr_rename_samtools/tests/main.nf.test @@ -42,11 +42,17 @@ nextflow_workflow { then { assertAll( { assert workflow.success }, - { assert snapshot(workflow.out).match() }, - { assert snapshot(workflow.out.bam_renamed.collect{ - bam(it[1]).getHeader().findAll { it.startsWith ("@SQ") } - }).match("headernochr") - } + { assert snapshot( + workflow.out.versions, + workflow.out.bam_renamed.collect{[ + it[0], + path(it[1]).getFileName().toString(), + path(it[2]).getFileName().toString() + ] }, + workflow.out.bam_renamed.collect{ + bam(it[1]).getHeader().findAll { it.startsWith ("@SQ") } + } + ).match() } ) } } @@ -87,11 +93,17 @@ nextflow_workflow { then { assertAll( { assert workflow.success }, - { assert snapshot(workflow.out).match() }, - { assert snapshot(workflow.out.bam_renamed.collect{ - bam(it[1]).getHeader().findAll { it.startsWith ("@SQ") } - }).match("headerwithchr") - } + { assert snapshot( + workflow.out.versions, + workflow.out.bam_renamed.collect{[ + it[0], + path(it[1]).getFileName().toString(), + path(it[2]).getFileName().toString() + ] }, + workflow.out.bam_renamed.collect{ + bam(it[1]).getHeader().findAll { it.startsWith ("@SQ") } + } + ).match() } ) } } diff --git a/subworkflows/local/bam_chr_rename_samtools/tests/main.nf.test.snap b/subworkflows/local/bam_chr_rename_samtools/tests/main.nf.test.snap index e182f4f2..6f077931 100644 --- a/subworkflows/local/bam_chr_rename_samtools/tests/main.nf.test.snap +++ b/subworkflows/local/bam_chr_rename_samtools/tests/main.nf.test.snap @@ -1,57 +1,26 @@ { "Should remove chr prefix": { "content": [ - { - "0": [ - [ - { - "id": "test_MT" - }, - "test_MT_withchr.bam:md5,d954fdf4c600dcf02e3ff8687bf842d7", - "test_MT_withchr.bam.bai:md5,3a8e131f5666db321bdb9da17197096d" - ], - [ - { - "id": "test_paired" - }, - "test_paired_withchr.bam:md5,89d71d9dd1953bf7f23d6e01c4c2f11f", - "test_paired_withchr.bam.bai:md5,c96c56313430a3c8c806f9eac4d58ce9" - ] - ], - "1": [ - "versions.yml:md5,3777f4a1f04f5087333fbe98eee09df9", - "versions.yml:md5,fc2d8252e26e8b681f2dd73d8b08fdde" - ], - "bam_renamed": [ - [ - { - "id": "test_MT" - }, - "test_MT_withchr.bam:md5,d954fdf4c600dcf02e3ff8687bf842d7", - "test_MT_withchr.bam.bai:md5,3a8e131f5666db321bdb9da17197096d" - ], - [ - { - "id": "test_paired" - }, - "test_paired_withchr.bam:md5,89d71d9dd1953bf7f23d6e01c4c2f11f", - "test_paired_withchr.bam.bai:md5,c96c56313430a3c8c806f9eac4d58ce9" - ] + [ + "versions.yml:md5,3777f4a1f04f5087333fbe98eee09df9", + "versions.yml:md5,fc2d8252e26e8b681f2dd73d8b08fdde" + ], + [ + [ + { + "id": "test_MT" + }, + "test_MT_withchr.bam", + "test_MT_withchr.bam.bai" ], - "versions": [ - "versions.yml:md5,3777f4a1f04f5087333fbe98eee09df9", - "versions.yml:md5,fc2d8252e26e8b681f2dd73d8b08fdde" + [ + { + "id": "test_paired" + }, + "test_paired_withchr.bam", + "test_paired_withchr.bam.bai" ] - } - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.0" - }, - "timestamp": "2024-11-06T15:27:46.769666251" - }, - "headernochr": { - "content": [ + ], [ [ "@SQ\tSN:M\tLN:16569" @@ -62,64 +31,33 @@ ] ], "meta": { - "nf-test": "0.9.2", + "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-06T15:27:47.170803881" + "timestamp": "2024-11-07T13:27:45.777831517" }, "Should add chr prefix": { "content": [ - { - "0": [ - [ - { - "id": "test_MT" - }, - "test_MT_withchr.bam:md5,e4080be5180ea52ce8bd1437c18101ed", - "test_MT_withchr.bam.bai:md5,33b4ed892348364beceb9a2bfba07448" - ], - [ - { - "id": "test_paired" - }, - "test_paired_withchr.bam:md5,959888c3cc8c3f3d0b920b398b872c46", - "test_paired_withchr.bam.bai:md5,549e36a5953c22164b3b821125dd9482" - ] - ], - "1": [ - "versions.yml:md5,3777f4a1f04f5087333fbe98eee09df9", - "versions.yml:md5,fc2d8252e26e8b681f2dd73d8b08fdde" - ], - "bam_renamed": [ - [ - { - "id": "test_MT" - }, - "test_MT_withchr.bam:md5,e4080be5180ea52ce8bd1437c18101ed", - "test_MT_withchr.bam.bai:md5,33b4ed892348364beceb9a2bfba07448" - ], - [ - { - "id": "test_paired" - }, - "test_paired_withchr.bam:md5,959888c3cc8c3f3d0b920b398b872c46", - "test_paired_withchr.bam.bai:md5,549e36a5953c22164b3b821125dd9482" - ] + [ + "versions.yml:md5,3777f4a1f04f5087333fbe98eee09df9", + "versions.yml:md5,fc2d8252e26e8b681f2dd73d8b08fdde" + ], + [ + [ + { + "id": "test_MT" + }, + "test_MT_withchr.bam", + "test_MT_withchr.bam.bai" ], - "versions": [ - "versions.yml:md5,3777f4a1f04f5087333fbe98eee09df9", - "versions.yml:md5,fc2d8252e26e8b681f2dd73d8b08fdde" + [ + { + "id": "test_paired" + }, + "test_paired_withchr.bam", + "test_paired_withchr.bam.bai" ] - } - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.0" - }, - "timestamp": "2024-11-06T15:27:58.280092004" - }, - "headerwithchr": { - "content": [ + ], [ [ "@SQ\tSN:chrM\tLN:16569" @@ -130,9 +68,9 @@ ] ], "meta": { - "nf-test": "0.9.2", + "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-06T15:27:58.809912843" + "timestamp": "2024-11-07T13:28:15.125413039" } } \ No newline at end of file diff --git a/subworkflows/local/bam_downsample_samtools/tests/main.nf.test b/subworkflows/local/bam_downsample_samtools/tests/main.nf.test index 1ff32b6b..05ab92e2 100644 --- a/subworkflows/local/bam_downsample_samtools/tests/main.nf.test +++ b/subworkflows/local/bam_downsample_samtools/tests/main.nf.test @@ -50,8 +50,17 @@ nextflow_workflow { then { assertAll( { assert workflow.success }, - { assert snapshot(workflow.out).match() }, - { assert snapshot(workflow.out.bam_emul.collect{ bam(it[1]).getReads().size() }).match("Reads2X") } + { assert snapshot( + workflow.out.versions, + workflow.out.bam_emul.collect{[ + it[0], + path(it[1]).getFileName().toString(), + path(it[2]).getFileName().toString() + ] }, + workflow.out.bam_emul.collect{ + bam(it[1]).getReads().size() + } + ).match() } ) } } @@ -89,8 +98,17 @@ nextflow_workflow { then { assertAll( { assert workflow.success }, - { assert snapshot(workflow.out).match() }, - { assert snapshot(workflow.out.bam_emul.collect{ bam(it[1]).getReads().size() }).match("Reads4X") } + { assert snapshot( + workflow.out.versions, + workflow.out.bam_emul.collect{[ + it[0], + path(it[1]).getFileName().toString(), + path(it[2]).getFileName().toString() + ] }, + workflow.out.bam_emul.collect{ + bam(it[1]).getReads().size() + } + ).match() } ) } } diff --git a/subworkflows/local/bam_downsample_samtools/tests/main.nf.test.snap b/subworkflows/local/bam_downsample_samtools/tests/main.nf.test.snap index 9d908275..5eacd50a 100644 --- a/subworkflows/local/bam_downsample_samtools/tests/main.nf.test.snap +++ b/subworkflows/local/bam_downsample_samtools/tests/main.nf.test.snap @@ -1,142 +1,74 @@ { "Downsample to 2X": { "content": [ - { - "0": [ - [ - { - "id": "NA12878", - "depth": 2 - }, - "NA12878.bam:md5,f9f41668c064cb54051f77a18bd6a258", - "NA12878.bam.csi:md5,0b4abd161cdcc2b51571c9cc651df354" - ], - [ - { - "id": "NA19401", - "depth": 2 - }, - "NA19401.bam:md5,dd327e50a1d4ba3a8ccaa07a587a2ecf", - "NA19401.bam.csi:md5,36c29896003f2de5306ff427a969058c" - ] - ], - "1": [ - "versions.yml:md5,43ed2e6d85cac7ccd2fb22a733f585dc", - "versions.yml:md5,9eef568f4fc903d70199abf5a48bd08f", - "versions.yml:md5,a61d007b27e86103db8d68a8c79a98fb" - ], - "bam_emul": [ - [ - { - "id": "NA12878", - "depth": 2 - }, - "NA12878.bam:md5,f9f41668c064cb54051f77a18bd6a258", - "NA12878.bam.csi:md5,0b4abd161cdcc2b51571c9cc651df354" - ], - [ - { - "id": "NA19401", - "depth": 2 - }, - "NA19401.bam:md5,dd327e50a1d4ba3a8ccaa07a587a2ecf", - "NA19401.bam.csi:md5,36c29896003f2de5306ff427a969058c" - ] - ], - "versions": [ - "versions.yml:md5,43ed2e6d85cac7ccd2fb22a733f585dc", - "versions.yml:md5,9eef568f4fc903d70199abf5a48bd08f", - "versions.yml:md5,a61d007b27e86103db8d68a8c79a98fb" - ] - } - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.0" - }, - "timestamp": "2024-11-06T15:28:20.410189057" - }, - "Downsample to 4X": { - "content": [ - { - "0": [ - [ - { - "id": "NA12878", - "depth": 4 - }, - "NA12878.bam:md5,766247cca7d1ccff1352ecc3d47fe4be", - "NA12878.bam.csi:md5,3f8f9a17463b6c2391c632681d3f253a" - ], - [ - { - "id": "NA19401", - "depth": 4 - }, - "NA19401.bam:md5,f678431058d8b4963f09fa3431681756", - "NA19401.bam.csi:md5,14a9e8d58a46360917263c22c07dea41" - ] - ], - "1": [ - "versions.yml:md5,43ed2e6d85cac7ccd2fb22a733f585dc", - "versions.yml:md5,9eef568f4fc903d70199abf5a48bd08f", - "versions.yml:md5,a61d007b27e86103db8d68a8c79a98fb" - ], - "bam_emul": [ - [ - { - "id": "NA12878", - "depth": 4 - }, - "NA12878.bam:md5,766247cca7d1ccff1352ecc3d47fe4be", - "NA12878.bam.csi:md5,3f8f9a17463b6c2391c632681d3f253a" - ], - [ - { - "id": "NA19401", - "depth": 4 - }, - "NA19401.bam:md5,f678431058d8b4963f09fa3431681756", - "NA19401.bam.csi:md5,14a9e8d58a46360917263c22c07dea41" - ] + [ + "versions.yml:md5,43ed2e6d85cac7ccd2fb22a733f585dc", + "versions.yml:md5,9eef568f4fc903d70199abf5a48bd08f", + "versions.yml:md5,a61d007b27e86103db8d68a8c79a98fb" + ], + [ + [ + { + "id": "NA12878", + "depth": 2 + }, + "NA12878.bam", + "NA12878.bam.csi" ], - "versions": [ - "versions.yml:md5,43ed2e6d85cac7ccd2fb22a733f585dc", - "versions.yml:md5,9eef568f4fc903d70199abf5a48bd08f", - "versions.yml:md5,a61d007b27e86103db8d68a8c79a98fb" + [ + { + "id": "NA19401", + "depth": 2 + }, + "NA19401.bam", + "NA19401.bam.csi" ] - } - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.0" - }, - "timestamp": "2024-11-06T15:28:38.037041169" - }, - "Reads2X": { - "content": [ + ], [ 1164, 1196 ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" + "nf-test": "0.9.1", + "nextflow": "24.10.0" }, - "timestamp": "2024-07-17T15:34:43.895894693" + "timestamp": "2024-11-07T13:28:49.191579339" }, - "Reads4X": { + "Downsample to 4X": { "content": [ + [ + "versions.yml:md5,43ed2e6d85cac7ccd2fb22a733f585dc", + "versions.yml:md5,9eef568f4fc903d70199abf5a48bd08f", + "versions.yml:md5,a61d007b27e86103db8d68a8c79a98fb" + ], + [ + [ + { + "id": "NA12878", + "depth": 4 + }, + "NA12878.bam", + "NA12878.bam.csi" + ], + [ + { + "id": "NA19401", + "depth": 4 + }, + "NA19401.bam", + "NA19401.bam.csi" + ] + ], [ 2402, 2321 ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" + "nf-test": "0.9.1", + "nextflow": "24.10.0" }, - "timestamp": "2024-07-17T15:34:15.646735174" + "timestamp": "2024-11-07T13:29:24.179563513" } } \ No newline at end of file diff --git a/subworkflows/local/bam_gl_bcftools/tests/main.nf.test b/subworkflows/local/bam_gl_bcftools/tests/main.nf.test index da716dd9..027a5969 100644 --- a/subworkflows/local/bam_gl_bcftools/tests/main.nf.test +++ b/subworkflows/local/bam_gl_bcftools/tests/main.nf.test @@ -50,8 +50,17 @@ nextflow_workflow { then { assertAll( { assert workflow.success }, - { assert snapshot(workflow.out).match() }, - { assert snapshot(workflow.out.vcf_tbi.collect{ path(it[1]).vcf.summary }).match("Summary_merge") } + { assert snapshot( + workflow.out.versions, + workflow.out.vcf_tbi.collect{[ + it[0], + path(it[1]).getFileName().toString(), + path(it[2]).getFileName().toString() + ] }, + workflow.out.vcf_tbi.collect{ + path(it[1]).vcf.summary + } + ).match() } ) } } @@ -83,8 +92,17 @@ nextflow_workflow { then { assertAll( { assert workflow.success }, - { assert snapshot(workflow.out).match() }, - { assert snapshot(workflow.out.vcf_tbi.collect{ path(it[1]).vcf.summary }).match("Summary_one") } + { assert snapshot( + workflow.out.versions, + workflow.out.vcf_tbi.collect{[ + it[0], + path(it[1]).getFileName().toString(), + path(it[2]).getFileName().toString() + ] }, + workflow.out.vcf_tbi.collect{ + path(it[1]).vcf.summary + } + ).match() } ) } } diff --git a/subworkflows/local/bam_gl_bcftools/tests/main.nf.test.snap b/subworkflows/local/bam_gl_bcftools/tests/main.nf.test.snap index dfc0abc8..71b76e85 100644 --- a/subworkflows/local/bam_gl_bcftools/tests/main.nf.test.snap +++ b/subworkflows/local/bam_gl_bcftools/tests/main.nf.test.snap @@ -1,162 +1,76 @@ { "Compute genotype likelihood with merging": { "content": [ - { - "0": [ - [ - { - "panel": "1000GP", - "chr": "22", - "id": "all", - "metas": [ - { - "id": "NA12878", - "panel": "1000GP", - "chr": "22" - }, - { - "id": "NA19401", - "panel": "1000GP", - "chr": "22" - } - ], - "variantcaller": "bcftools" - }, - "all.annotate.vcf.gz:md5,95cf1e61c8d2776a02588952fb67c5d6", - "all.annotate.vcf.gz.tbi:md5,e22a83a66d796dca37eab6d75e76f9c3" - ] - ], - "1": [ - "versions.yml:md5,0980a298fde671494f5b4e9cb3a6ebc2", - "versions.yml:md5,4739962c934731254db8b31083aa0df5", - "versions.yml:md5,544ff5e39aa23f18c41587a739beaf34", - "versions.yml:md5,74118beefc19065bed2de5d60277be55", - "versions.yml:md5,c9d32dd20061f19422ff4d4b6f3fb24d", - "versions.yml:md5,c9d32dd20061f19422ff4d4b6f3fb24d" - ], - "2": [ - "NA12878.bcftools_stats.txt:md5,4cacbe4d6dfba4a8035e37611c91923c", - "NA19401.bcftools_stats.txt:md5,f91fd586acfdf3845d111a062fbb263f" - ], - "multiqc_files": [ - "NA12878.bcftools_stats.txt:md5,4cacbe4d6dfba4a8035e37611c91923c", - "NA19401.bcftools_stats.txt:md5,f91fd586acfdf3845d111a062fbb263f" - ], - "vcf_tbi": [ - [ - { - "panel": "1000GP", - "chr": "22", - "id": "all", - "metas": [ - { - "id": "NA12878", - "panel": "1000GP", - "chr": "22" - }, - { - "id": "NA19401", - "panel": "1000GP", - "chr": "22" - } - ], - "variantcaller": "bcftools" - }, - "all.annotate.vcf.gz:md5,95cf1e61c8d2776a02588952fb67c5d6", - "all.annotate.vcf.gz.tbi:md5,e22a83a66d796dca37eab6d75e76f9c3" - ] - ], - "versions": [ - "versions.yml:md5,0980a298fde671494f5b4e9cb3a6ebc2", - "versions.yml:md5,4739962c934731254db8b31083aa0df5", - "versions.yml:md5,544ff5e39aa23f18c41587a739beaf34", - "versions.yml:md5,74118beefc19065bed2de5d60277be55", - "versions.yml:md5,c9d32dd20061f19422ff4d4b6f3fb24d", - "versions.yml:md5,c9d32dd20061f19422ff4d4b6f3fb24d" + [ + "versions.yml:md5,0980a298fde671494f5b4e9cb3a6ebc2", + "versions.yml:md5,4739962c934731254db8b31083aa0df5", + "versions.yml:md5,544ff5e39aa23f18c41587a739beaf34", + "versions.yml:md5,74118beefc19065bed2de5d60277be55", + "versions.yml:md5,c9d32dd20061f19422ff4d4b6f3fb24d", + "versions.yml:md5,c9d32dd20061f19422ff4d4b6f3fb24d" + ], + [ + [ + { + "panel": "1000GP", + "chr": "22", + "id": "all", + "metas": [ + { + "id": "NA12878", + "panel": "1000GP", + "chr": "22" + }, + { + "id": "NA19401", + "panel": "1000GP", + "chr": "22" + } + ], + "variantcaller": "bcftools" + }, + "all.annotate.vcf.gz", + "all.annotate.vcf.gz.tbi" ] - } + ], + [ + "VcfFile [chromosomes=[chr22], sampleCount=2, variantCount=903, phased=false, phasedAutodetect=false]" + ] ], "meta": { - "nf-test": "0.9.2", + "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-06T15:29:03.964528903" + "timestamp": "2024-11-07T13:49:19.689761982" }, "Compute genotype likelihood with only one input": { "content": [ - { - "0": [ - [ - { - "id": "NA12878", - "panel": "1000GP", - "chr": "22", - "variantcaller": "bcftools" - }, - "NA12878.annotate.vcf.gz:md5,15fdaa69229a6502d2638c467f4341e3", - "NA12878.annotate.vcf.gz.tbi:md5,21b8ed54102dc1e3a3596cc080039693" - ] - ], - "1": [ - "versions.yml:md5,0980a298fde671494f5b4e9cb3a6ebc2", - "versions.yml:md5,4739962c934731254db8b31083aa0df5", - "versions.yml:md5,544ff5e39aa23f18c41587a739beaf34", - "versions.yml:md5,c9d32dd20061f19422ff4d4b6f3fb24d" - ], - "2": [ - "NA12878.bcftools_stats.txt:md5,4cacbe4d6dfba4a8035e37611c91923c" - ], - "multiqc_files": [ - "NA12878.bcftools_stats.txt:md5,4cacbe4d6dfba4a8035e37611c91923c" - ], - "vcf_tbi": [ - [ - { - "id": "NA12878", - "panel": "1000GP", - "chr": "22", - "variantcaller": "bcftools" - }, - "NA12878.annotate.vcf.gz:md5,15fdaa69229a6502d2638c467f4341e3", - "NA12878.annotate.vcf.gz.tbi:md5,21b8ed54102dc1e3a3596cc080039693" - ] - ], - "versions": [ - "versions.yml:md5,0980a298fde671494f5b4e9cb3a6ebc2", - "versions.yml:md5,4739962c934731254db8b31083aa0df5", - "versions.yml:md5,544ff5e39aa23f18c41587a739beaf34", - "versions.yml:md5,c9d32dd20061f19422ff4d4b6f3fb24d" + [ + "versions.yml:md5,0980a298fde671494f5b4e9cb3a6ebc2", + "versions.yml:md5,4739962c934731254db8b31083aa0df5", + "versions.yml:md5,544ff5e39aa23f18c41587a739beaf34", + "versions.yml:md5,c9d32dd20061f19422ff4d4b6f3fb24d" + ], + [ + [ + { + "id": "NA12878", + "panel": "1000GP", + "chr": "22", + "variantcaller": "bcftools" + }, + "NA12878.annotate.vcf.gz", + "NA12878.annotate.vcf.gz.tbi" ] - } - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.0" - }, - "timestamp": "2024-11-06T15:29:22.939785381" - }, - "Summary_one": { - "content": [ + ], [ "VcfFile [chromosomes=[chr22], sampleCount=1, variantCount=903, phased=false, phasedAutodetect=false]" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" - }, - "timestamp": "2024-10-15T18:40:28.756168568" - }, - "Summary_merge": { - "content": [ - [ - "VcfFile [chromosomes=[chr22], sampleCount=2, variantCount=903, phased=false, phasedAutodetect=false]" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.4" + "nf-test": "0.9.1", + "nextflow": "24.10.0" }, - "timestamp": "2024-10-15T18:35:39.946019792" + "timestamp": "2024-11-07T13:50:09.373771371" } } \ No newline at end of file diff --git a/subworkflows/local/bam_impute_glimpse2/tests/main.nf.test b/subworkflows/local/bam_impute_glimpse2/tests/main.nf.test index df55893a..b6a2bc6c 100644 --- a/subworkflows/local/bam_impute_glimpse2/tests/main.nf.test +++ b/subworkflows/local/bam_impute_glimpse2/tests/main.nf.test @@ -51,7 +51,12 @@ nextflow_workflow { assertAll( { assert workflow.success }, { assert snapshot( - workflow.out, + workflow.out.versions, + workflow.out.vcf_tbi.collect{[ + it[0], + path(it[1]).getFileName().toString(), + path(it[2]).getFileName().toString() + ] }, workflow.out.vcf_tbi.collect{ path(it[1]).vcf.summary }, workflow.out.vcf_tbi.collect{ path(it[1]).vcf.header.getGenotypeSamples().sort() } ).match() } @@ -102,7 +107,12 @@ nextflow_workflow { assertAll( { assert workflow.success }, { assert snapshot( - workflow.out, + workflow.out.versions, + workflow.out.vcf_tbi.collect{[ + it[0], + path(it[1]).getFileName().toString(), + path(it[2]).getFileName().toString() + ] }, workflow.out.vcf_tbi.collect{ path(it[1]).vcf.summary }, workflow.out.vcf_tbi.collect{ path(it[1]).vcf.header.getGenotypeSamples().sort() } ).match() } @@ -146,7 +156,12 @@ nextflow_workflow { assertAll( { assert workflow.success }, { assert snapshot( - workflow.out, + workflow.out.versions, + workflow.out.vcf_tbi.collect{[ + it[0], + path(it[1]).getFileName().toString(), + path(it[2]).getFileName().toString() + ] }, workflow.out.vcf_tbi.collect{ path(it[1]).vcf.summary }, workflow.out.vcf_tbi.collect{ path(it[1]).vcf.header.getGenotypeSamples().sort() } ).match() } diff --git a/subworkflows/local/bam_impute_glimpse2/tests/main.nf.test.snap b/subworkflows/local/bam_impute_glimpse2/tests/main.nf.test.snap index d6af369e..7a717fc9 100644 --- a/subworkflows/local/bam_impute_glimpse2/tests/main.nf.test.snap +++ b/subworkflows/local/bam_impute_glimpse2/tests/main.nf.test.snap @@ -1,48 +1,26 @@ { "Impute with glimpse2 one vcf - input bcf": { "content": [ - { - "0": [ - [ - { - "id": "NA12878", - "panel": "1000GP", - "chr": "22", - "tools": "glimpse2" - }, - "NA12878.vcf.gz:md5,7639fbde7f7406f79bfd4146fc05390b", - "NA12878.vcf.gz.tbi:md5,91cf385c7f8783ab54ab71f2c7c3d0d6" - ] - ], - "1": [ - "versions.yml:md5,02e20b0099653bc476dac65a92e768c1", - "versions.yml:md5,02e20b0099653bc476dac65a92e768c1", - "versions.yml:md5,1d8512dd2d5f6649a1111faabd24b399", - "versions.yml:md5,2bfd212564086adb64cf01741a0d83ad", - "versions.yml:md5,2bfd212564086adb64cf01741a0d83ad", - "versions.yml:md5,7d3bb3301fbcde0b12f553a2ae7d5b56" - ], - "vcf_tbi": [ - [ - { - "id": "NA12878", - "panel": "1000GP", - "chr": "22", - "tools": "glimpse2" - }, - "NA12878.vcf.gz:md5,7639fbde7f7406f79bfd4146fc05390b", - "NA12878.vcf.gz.tbi:md5,91cf385c7f8783ab54ab71f2c7c3d0d6" - ] - ], - "versions": [ - "versions.yml:md5,02e20b0099653bc476dac65a92e768c1", - "versions.yml:md5,02e20b0099653bc476dac65a92e768c1", - "versions.yml:md5,1d8512dd2d5f6649a1111faabd24b399", - "versions.yml:md5,2bfd212564086adb64cf01741a0d83ad", - "versions.yml:md5,2bfd212564086adb64cf01741a0d83ad", - "versions.yml:md5,7d3bb3301fbcde0b12f553a2ae7d5b56" + [ + "versions.yml:md5,02e20b0099653bc476dac65a92e768c1", + "versions.yml:md5,02e20b0099653bc476dac65a92e768c1", + "versions.yml:md5,1d8512dd2d5f6649a1111faabd24b399", + "versions.yml:md5,2bfd212564086adb64cf01741a0d83ad", + "versions.yml:md5,2bfd212564086adb64cf01741a0d83ad", + "versions.yml:md5,7d3bb3301fbcde0b12f553a2ae7d5b56" + ], + [ + [ + { + "id": "NA12878", + "panel": "1000GP", + "chr": "22", + "tools": "glimpse2" + }, + "NA12878.vcf.gz", + "NA12878.vcf.gz.tbi" ] - }, + ], [ "VcfFile [chromosomes=[chr22], sampleCount=1, variantCount=903, phased=true, phasedAutodetect=true]" ], @@ -53,55 +31,33 @@ ] ], "meta": { - "nf-test": "0.9.2", + "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-06T16:10:40.1574896" + "timestamp": "2024-11-07T13:51:00.205148681" }, "Impute with glimpse2 one individual - input file bam with bamlist": { "content": [ - { - "0": [ - [ - { - "id": "NA12878", - "panel": "1000GP", - "chr": "22", - "tools": "glimpse2" - }, - "NA12878.vcf.gz:md5,d676a65fa0f75d22aa1d7c79e3295679", - "NA12878.vcf.gz.tbi:md5,b5d3918a535c1aa01028635c9d94bf6f" - ] - ], - "1": [ - "versions.yml:md5,02e20b0099653bc476dac65a92e768c1", - "versions.yml:md5,02e20b0099653bc476dac65a92e768c1", - "versions.yml:md5,1d8512dd2d5f6649a1111faabd24b399", - "versions.yml:md5,2bfd212564086adb64cf01741a0d83ad", - "versions.yml:md5,2bfd212564086adb64cf01741a0d83ad", - "versions.yml:md5,7d3bb3301fbcde0b12f553a2ae7d5b56" - ], - "vcf_tbi": [ - [ - { - "id": "NA12878", - "panel": "1000GP", - "chr": "22", - "tools": "glimpse2" - }, - "NA12878.vcf.gz:md5,d676a65fa0f75d22aa1d7c79e3295679", - "NA12878.vcf.gz.tbi:md5,b5d3918a535c1aa01028635c9d94bf6f" - ] - ], - "versions": [ - "versions.yml:md5,02e20b0099653bc476dac65a92e768c1", - "versions.yml:md5,02e20b0099653bc476dac65a92e768c1", - "versions.yml:md5,1d8512dd2d5f6649a1111faabd24b399", - "versions.yml:md5,2bfd212564086adb64cf01741a0d83ad", - "versions.yml:md5,2bfd212564086adb64cf01741a0d83ad", - "versions.yml:md5,7d3bb3301fbcde0b12f553a2ae7d5b56" + [ + "versions.yml:md5,02e20b0099653bc476dac65a92e768c1", + "versions.yml:md5,02e20b0099653bc476dac65a92e768c1", + "versions.yml:md5,1d8512dd2d5f6649a1111faabd24b399", + "versions.yml:md5,2bfd212564086adb64cf01741a0d83ad", + "versions.yml:md5,2bfd212564086adb64cf01741a0d83ad", + "versions.yml:md5,7d3bb3301fbcde0b12f553a2ae7d5b56" + ], + [ + [ + { + "id": "NA12878", + "panel": "1000GP", + "chr": "22", + "tools": "glimpse2" + }, + "NA12878.vcf.gz", + "NA12878.vcf.gz.tbi" ] - }, + ], [ "VcfFile [chromosomes=[chr22], sampleCount=1, variantCount=903, phased=true, phasedAutodetect=true]" ], @@ -112,55 +68,33 @@ ] ], "meta": { - "nf-test": "0.9.2", + "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-06T16:11:24.161757976" + "timestamp": "2024-11-07T13:52:40.66012322" }, "Impute with glimpse2 two individuals - input bam with bamlist": { "content": [ - { - "0": [ - [ - { - "id": "allid", - "panel": "1000GP", - "chr": "22", - "tools": "glimpse2" - }, - "allid.vcf.gz:md5,4e99e5d80dfaf5eadfd9e876bc8124d3", - "allid.vcf.gz.tbi:md5,8ae3d3bb8a295d3ed194f2f3c82da77f" - ] - ], - "1": [ - "versions.yml:md5,02e20b0099653bc476dac65a92e768c1", - "versions.yml:md5,02e20b0099653bc476dac65a92e768c1", - "versions.yml:md5,1d8512dd2d5f6649a1111faabd24b399", - "versions.yml:md5,2bfd212564086adb64cf01741a0d83ad", - "versions.yml:md5,2bfd212564086adb64cf01741a0d83ad", - "versions.yml:md5,7d3bb3301fbcde0b12f553a2ae7d5b56" - ], - "vcf_tbi": [ - [ - { - "id": "allid", - "panel": "1000GP", - "chr": "22", - "tools": "glimpse2" - }, - "allid.vcf.gz:md5,4e99e5d80dfaf5eadfd9e876bc8124d3", - "allid.vcf.gz.tbi:md5,8ae3d3bb8a295d3ed194f2f3c82da77f" - ] - ], - "versions": [ - "versions.yml:md5,02e20b0099653bc476dac65a92e768c1", - "versions.yml:md5,02e20b0099653bc476dac65a92e768c1", - "versions.yml:md5,1d8512dd2d5f6649a1111faabd24b399", - "versions.yml:md5,2bfd212564086adb64cf01741a0d83ad", - "versions.yml:md5,2bfd212564086adb64cf01741a0d83ad", - "versions.yml:md5,7d3bb3301fbcde0b12f553a2ae7d5b56" + [ + "versions.yml:md5,02e20b0099653bc476dac65a92e768c1", + "versions.yml:md5,02e20b0099653bc476dac65a92e768c1", + "versions.yml:md5,1d8512dd2d5f6649a1111faabd24b399", + "versions.yml:md5,2bfd212564086adb64cf01741a0d83ad", + "versions.yml:md5,2bfd212564086adb64cf01741a0d83ad", + "versions.yml:md5,7d3bb3301fbcde0b12f553a2ae7d5b56" + ], + [ + [ + { + "id": "allid", + "panel": "1000GP", + "chr": "22", + "tools": "glimpse2" + }, + "allid.vcf.gz", + "allid.vcf.gz.tbi" ] - }, + ], [ "VcfFile [chromosomes=[chr22], sampleCount=2, variantCount=903, phased=true, phasedAutodetect=true]" ], @@ -172,9 +106,9 @@ ] ], "meta": { - "nf-test": "0.9.2", + "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-06T16:11:02.194341913" + "timestamp": "2024-11-07T13:51:55.269054819" } } \ No newline at end of file diff --git a/subworkflows/local/bam_impute_quilt/tests/main.nf.test b/subworkflows/local/bam_impute_quilt/tests/main.nf.test index 2faecfa6..57e19e49 100644 --- a/subworkflows/local/bam_impute_quilt/tests/main.nf.test +++ b/subworkflows/local/bam_impute_quilt/tests/main.nf.test @@ -59,7 +59,12 @@ nextflow_workflow { assertAll( { assert workflow.success }, { assert snapshot( - workflow.out, + workflow.out.versions, + workflow.out.vcf_tbi.collect{[ + it[0], + path(it[1]).getFileName().toString(), + path(it[2]).getFileName().toString() + ] }, workflow.out.vcf_tbi.collect{ path(it[1]).vcf.summary }, workflow.out.vcf_tbi.collect{ path(it[1]).vcf.header.getGenotypeSamples().sort() } ).match() } @@ -100,7 +105,12 @@ nextflow_workflow { assertAll( { assert workflow.success }, { assert snapshot( - workflow.out, + workflow.out.versions, + workflow.out.vcf_tbi.collect{[ + it[0], + path(it[1]).getFileName().toString(), + path(it[2]).getFileName().toString() + ] }, workflow.out.vcf_tbi.collect{ path(it[1]).vcf.summary }, workflow.out.vcf_tbi.collect{ path(it[1]).vcf.header.getGenotypeSamples().sort() } ).match() } diff --git a/subworkflows/local/bam_impute_quilt/tests/main.nf.test.snap b/subworkflows/local/bam_impute_quilt/tests/main.nf.test.snap index 6052f72e..1136b7f1 100644 --- a/subworkflows/local/bam_impute_quilt/tests/main.nf.test.snap +++ b/subworkflows/local/bam_impute_quilt/tests/main.nf.test.snap @@ -1,64 +1,34 @@ { "Impute with quilt two individuals with bamlist": { "content": [ - { - "0": [ - [ - { - "id": "allid", - "panel": "1000GP", - "chr": "22", - "chunk": "16570065-16597215", - "tools": "quilt" - }, - "allid_22_16570065-16597215.impute.annotate.vcf.gz:md5,de611972f693a8c90c4a8175deab5249", - "allid_22_16570065-16597215.impute.annotate.vcf.gz.tbi:md5,0802cd70847696ee407c520fd963db31" - ], - [ - { - "id": "allid", - "panel": "1000GP", - "chr": "22", - "chunk": "16587172-16609999", - "tools": "quilt" - }, - "allid_22_16587172-16609999.impute.annotate.vcf.gz:md5,8a1dc994fc0eb4771b6acfe0e876580b", - "allid_22_16587172-16609999.impute.annotate.vcf.gz.tbi:md5,f3e0d1c94d02bcb57bafd143c49269f4" - ] - ], - "1": [ - "versions.yml:md5,ac2d0f2a8e77cd796d3b4b84fdd46b0d", - "versions.yml:md5,cb038a1f67a47a76d0e0a983cfd56789" - ], - "vcf_tbi": [ - [ - { - "id": "allid", - "panel": "1000GP", - "chr": "22", - "chunk": "16570065-16597215", - "tools": "quilt" - }, - "allid_22_16570065-16597215.impute.annotate.vcf.gz:md5,de611972f693a8c90c4a8175deab5249", - "allid_22_16570065-16597215.impute.annotate.vcf.gz.tbi:md5,0802cd70847696ee407c520fd963db31" - ], - [ - { - "id": "allid", - "panel": "1000GP", - "chr": "22", - "chunk": "16587172-16609999", - "tools": "quilt" - }, - "allid_22_16587172-16609999.impute.annotate.vcf.gz:md5,8a1dc994fc0eb4771b6acfe0e876580b", - "allid_22_16587172-16609999.impute.annotate.vcf.gz.tbi:md5,f3e0d1c94d02bcb57bafd143c49269f4" - ] + [ + "versions.yml:md5,ac2d0f2a8e77cd796d3b4b84fdd46b0d", + "versions.yml:md5,cb038a1f67a47a76d0e0a983cfd56789" + ], + [ + [ + { + "id": "allid", + "panel": "1000GP", + "chr": "22", + "chunk": "16570065-16597215", + "tools": "quilt" + }, + "allid_22_16570065-16597215.impute.annotate.vcf.gz", + "allid_22_16570065-16597215.impute.annotate.vcf.gz.tbi" ], - "versions": [ - "versions.yml:md5,ac2d0f2a8e77cd796d3b4b84fdd46b0d", - "versions.yml:md5,cb038a1f67a47a76d0e0a983cfd56789" + [ + { + "id": "allid", + "panel": "1000GP", + "chr": "22", + "chunk": "16587172-16609999", + "tools": "quilt" + }, + "allid_22_16587172-16609999.impute.annotate.vcf.gz", + "allid_22_16587172-16609999.impute.annotate.vcf.gz.tbi" ] - }, + ], [ "VcfFile [chromosomes=[chr22], sampleCount=2, variantCount=572, phased=true, phasedAutodetect=false]", "VcfFile [chromosomes=[chr22], sampleCount=2, variantCount=570, phased=true, phasedAutodetect=false]" @@ -75,71 +45,41 @@ ] ], "meta": { - "nf-test": "0.9.2", + "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-06T16:24:00.161098553" + "timestamp": "2024-11-07T13:53:40.231874326" }, "Impute with quilt one individuals": { "content": [ - { - "0": [ - [ - { - "id": "NA12878", - "panel": "1000GP", - "chr": "22", - "chunk": "16570065-16597215", - "tools": "quilt" - }, - "NA12878_22_16570065-16597215.impute.annotate.vcf.gz:md5,f1a6f74a4782fc1df96db2b1fd458381", - "NA12878_22_16570065-16597215.impute.annotate.vcf.gz.tbi:md5,de3b20dc5f67aae2a9669f0c667edb5d" - ], - [ - { - "id": "NA12878", - "panel": "1000GP", - "chr": "22", - "chunk": "16587172-16609999", - "tools": "quilt" - }, - "NA12878_22_16587172-16609999.impute.annotate.vcf.gz:md5,d549aa4a26cbe659081002521c4400c2", - "NA12878_22_16587172-16609999.impute.annotate.vcf.gz.tbi:md5,674782f71cca76015e0b72f9bc4e5431" - ] - ], - "1": [ - "versions.yml:md5,ac2d0f2a8e77cd796d3b4b84fdd46b0d", - "versions.yml:md5,cb038a1f67a47a76d0e0a983cfd56789" - ], - "vcf_tbi": [ - [ - { - "id": "NA12878", - "panel": "1000GP", - "chr": "22", - "chunk": "16570065-16597215", - "tools": "quilt" - }, - "NA12878_22_16570065-16597215.impute.annotate.vcf.gz:md5,f1a6f74a4782fc1df96db2b1fd458381", - "NA12878_22_16570065-16597215.impute.annotate.vcf.gz.tbi:md5,de3b20dc5f67aae2a9669f0c667edb5d" - ], - [ - { - "id": "NA12878", - "panel": "1000GP", - "chr": "22", - "chunk": "16587172-16609999", - "tools": "quilt" - }, - "NA12878_22_16587172-16609999.impute.annotate.vcf.gz:md5,d549aa4a26cbe659081002521c4400c2", - "NA12878_22_16587172-16609999.impute.annotate.vcf.gz.tbi:md5,674782f71cca76015e0b72f9bc4e5431" - ] + [ + "versions.yml:md5,ac2d0f2a8e77cd796d3b4b84fdd46b0d", + "versions.yml:md5,cb038a1f67a47a76d0e0a983cfd56789" + ], + [ + [ + { + "id": "NA12878", + "panel": "1000GP", + "chr": "22", + "chunk": "16570065-16597215", + "tools": "quilt" + }, + "NA12878_22_16570065-16597215.impute.annotate.vcf.gz", + "NA12878_22_16570065-16597215.impute.annotate.vcf.gz.tbi" ], - "versions": [ - "versions.yml:md5,ac2d0f2a8e77cd796d3b4b84fdd46b0d", - "versions.yml:md5,cb038a1f67a47a76d0e0a983cfd56789" + [ + { + "id": "NA12878", + "panel": "1000GP", + "chr": "22", + "chunk": "16587172-16609999", + "tools": "quilt" + }, + "NA12878_22_16587172-16609999.impute.annotate.vcf.gz", + "NA12878_22_16587172-16609999.impute.annotate.vcf.gz.tbi" ] - }, + ], [ "VcfFile [chromosomes=[chr22], sampleCount=1, variantCount=572, phased=true, phasedAutodetect=false]", "VcfFile [chromosomes=[chr22], sampleCount=1, variantCount=570, phased=true, phasedAutodetect=false]" @@ -154,9 +94,9 @@ ] ], "meta": { - "nf-test": "0.9.2", + "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-06T16:24:29.617067286" + "timestamp": "2024-11-07T13:54:20.551354608" } } \ No newline at end of file diff --git a/subworkflows/local/bam_impute_stitch/tests/main.nf.test b/subworkflows/local/bam_impute_stitch/tests/main.nf.test index 26e66586..55d9a0fa 100644 --- a/subworkflows/local/bam_impute_stitch/tests/main.nf.test +++ b/subworkflows/local/bam_impute_stitch/tests/main.nf.test @@ -66,7 +66,12 @@ nextflow_workflow { assertAll( { assert workflow.success }, { assert snapshot( - workflow.out, + workflow.out.versions, + workflow.out.vcf_tbi.collect{[ + it[0], + path(it[1]).getFileName().toString(), + path(it[2]).getFileName().toString() + ] }, workflow.out.vcf_tbi.collect{ path(it[1]).vcf.summary }, workflow.out.vcf_tbi.collect{ path(it[1]).vcf.header.getGenotypeSamples().sort() } ).match() } diff --git a/subworkflows/local/bam_impute_stitch/tests/main.nf.test.snap b/subworkflows/local/bam_impute_stitch/tests/main.nf.test.snap index 6206b54c..36e74e98 100644 --- a/subworkflows/local/bam_impute_stitch/tests/main.nf.test.snap +++ b/subworkflows/local/bam_impute_stitch/tests/main.nf.test.snap @@ -1,42 +1,23 @@ { "Impute with stitch two individuals with bamlist": { "content": [ - { - "0": [ - [ - { - "id": "allid", - "chr": "chr22", - "panel": "1000GP", - "tools": "stitch" - }, - "stitch.chr22.vcf.gz:md5,bd5f0c37e08b601ba1cd9ffc8fd672fa", - "stitch.chr22.vcf.gz.tbi:md5,bc2655a04da76a431481799d3a4515ee" - ] - ], - "1": [ - "versions.yml:md5,4330856a215c4986b0591d550a4d22bf", - "versions.yml:md5,8561197b98b9a1e1f8f1b01c1369da35", - "versions.yml:md5,c0772dccc2cc2a3c8f0b3fa5f02312bc" - ], - "vcf_tbi": [ - [ - { - "id": "allid", - "chr": "chr22", - "panel": "1000GP", - "tools": "stitch" - }, - "stitch.chr22.vcf.gz:md5,bd5f0c37e08b601ba1cd9ffc8fd672fa", - "stitch.chr22.vcf.gz.tbi:md5,bc2655a04da76a431481799d3a4515ee" - ] - ], - "versions": [ - "versions.yml:md5,4330856a215c4986b0591d550a4d22bf", - "versions.yml:md5,8561197b98b9a1e1f8f1b01c1369da35", - "versions.yml:md5,c0772dccc2cc2a3c8f0b3fa5f02312bc" + [ + "versions.yml:md5,4330856a215c4986b0591d550a4d22bf", + "versions.yml:md5,8561197b98b9a1e1f8f1b01c1369da35", + "versions.yml:md5,c0772dccc2cc2a3c8f0b3fa5f02312bc" + ], + [ + [ + { + "id": "allid", + "chr": "chr22", + "panel": "1000GP", + "tools": "stitch" + }, + "stitch.chr22.vcf.gz", + "stitch.chr22.vcf.gz.tbi" ] - }, + ], [ "VcfFile [chromosomes=[chr22], sampleCount=2, variantCount=903, phased=false, phasedAutodetect=false]" ], @@ -48,9 +29,9 @@ ] ], "meta": { - "nf-test": "0.9.2", + "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-06T16:29:44.891707584" + "timestamp": "2024-11-07T13:55:08.174481463" } } \ No newline at end of file diff --git a/subworkflows/local/bam_region_samtools/tests/main.nf.test b/subworkflows/local/bam_region_samtools/tests/main.nf.test index dd9b6380..b2456d38 100644 --- a/subworkflows/local/bam_region_samtools/tests/main.nf.test +++ b/subworkflows/local/bam_region_samtools/tests/main.nf.test @@ -51,8 +51,17 @@ nextflow_workflow { then { assertAll( { assert workflow.success }, - { assert snapshot(workflow.out).match() }, - { assert snapshot(workflow.out.bam_region.collect{ bam(it[1]).getReads().size() }).match("Summary10000bp") } + { assert snapshot( + workflow.out.versions, + workflow.out.vcf_tbi.collect{[ + it[0], + path(it[1]).getFileName().toString(), + path(it[2]).getFileName().toString() + ] }, + workflow.out.bam_region.collect{ + bam(it[1]).getReads().size() + } + ).match() } ) } } @@ -92,8 +101,17 @@ nextflow_workflow { then { assertAll( { assert workflow.success }, - { assert snapshot(workflow.out).match() }, - { assert snapshot(workflow.out.bam_region.collect{ bam(it[1]).getReads().size() }).match("Summary1000bp") } + { assert snapshot( + workflow.out.versions, + workflow.out.vcf_tbi.collect{[ + it[0], + path(it[1]).getFileName().toString(), + path(it[2]).getFileName().toString() + ] }, + workflow.out.bam_region.collect{ + bam(it[1]).getReads().size() + } + ).match() } ) } } diff --git a/subworkflows/local/bam_region_samtools/tests/main.nf.test.snap b/subworkflows/local/bam_region_samtools/tests/main.nf.test.snap index 2a15927c..82e4b44b 100644 --- a/subworkflows/local/bam_region_samtools/tests/main.nf.test.snap +++ b/subworkflows/local/bam_region_samtools/tests/main.nf.test.snap @@ -1,142 +1,44 @@ { "Get subregion of bam file 10000bp": { "content": [ - { - "0": [ - [ - { - "id": "NA12878", - "chr": "all" - }, - "NA12878.bam:md5,12f8d7f8fa1d9f7694ef738dbcd61f5a", - "NA12878.bam.bai:md5,484505b0727206e1e523dd90fa31cd16" - ], - [ - { - "id": "NA19401", - "chr": "all" - }, - "NA19401.bam:md5,ded5cea4d4b696cfcf8a8c9aa5e7dbf5", - "NA19401.bam.bai:md5,5a9429b877ffee92f7694d3579b4354b" - ] - ], - "1": [ - "versions.yml:md5,17ab59cf0e993cc8db9086093cdeb6e2", - "versions.yml:md5,3043c69a324445a251b7e9569bd012d3", - "versions.yml:md5,4dbd8db078f2e38fb335b8c3ee3db169" - ], - "bam_region": [ - [ - { - "id": "NA12878", - "chr": "all" - }, - "NA12878.bam:md5,12f8d7f8fa1d9f7694ef738dbcd61f5a", - "NA12878.bam.bai:md5,484505b0727206e1e523dd90fa31cd16" - ], - [ - { - "id": "NA19401", - "chr": "all" - }, - "NA19401.bam:md5,ded5cea4d4b696cfcf8a8c9aa5e7dbf5", - "NA19401.bam.bai:md5,5a9429b877ffee92f7694d3579b4354b" - ] - ], - "versions": [ - "versions.yml:md5,17ab59cf0e993cc8db9086093cdeb6e2", - "versions.yml:md5,3043c69a324445a251b7e9569bd012d3", - "versions.yml:md5,4dbd8db078f2e38fb335b8c3ee3db169" - ] - } - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.0" - }, - "timestamp": "2024-11-06T15:30:24.020472297" - }, - "Summary10000bp": { - "content": [ + [ + "versions.yml:md5,17ab59cf0e993cc8db9086093cdeb6e2", + "versions.yml:md5,3043c69a324445a251b7e9569bd012d3", + "versions.yml:md5,4dbd8db078f2e38fb335b8c3ee3db169" + ], + [ + + ], [ 2498, 2510 ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-17T16:44:44.886794567" - }, - "Get subregion of bam file 1000bp": { - "content": [ - { - "0": [ - [ - { - "id": "NA12878", - "chr": "all" - }, - "NA12878.bam:md5,9337dfef8712c9d22259eb14b2e0231d", - "NA12878.bam.bai:md5,8d864fd88a20d14d4aff3de607655cbb" - ], - [ - { - "id": "NA19401", - "chr": "all" - }, - "NA19401.bam:md5,2bf30334abe9c8efd042e8515d2240e3", - "NA19401.bam.bai:md5,ee992cd617b553c5fcfddd897193a0e5" - ] - ], - "1": [ - "versions.yml:md5,17ab59cf0e993cc8db9086093cdeb6e2", - "versions.yml:md5,3043c69a324445a251b7e9569bd012d3", - "versions.yml:md5,4dbd8db078f2e38fb335b8c3ee3db169" - ], - "bam_region": [ - [ - { - "id": "NA12878", - "chr": "all" - }, - "NA12878.bam:md5,9337dfef8712c9d22259eb14b2e0231d", - "NA12878.bam.bai:md5,8d864fd88a20d14d4aff3de607655cbb" - ], - [ - { - "id": "NA19401", - "chr": "all" - }, - "NA19401.bam:md5,2bf30334abe9c8efd042e8515d2240e3", - "NA19401.bam.bai:md5,ee992cd617b553c5fcfddd897193a0e5" - ] - ], - "versions": [ - "versions.yml:md5,17ab59cf0e993cc8db9086093cdeb6e2", - "versions.yml:md5,3043c69a324445a251b7e9569bd012d3", - "versions.yml:md5,4dbd8db078f2e38fb335b8c3ee3db169" - ] - } - ], - "meta": { - "nf-test": "0.9.2", + "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-06T15:30:39.622920828" + "timestamp": "2024-11-07T13:55:45.543427226" }, - "Summary1000bp": { + "Get subregion of bam file 1000bp": { "content": [ + [ + "versions.yml:md5,17ab59cf0e993cc8db9086093cdeb6e2", + "versions.yml:md5,3043c69a324445a251b7e9569bd012d3", + "versions.yml:md5,4dbd8db078f2e38fb335b8c3ee3db169" + ], + [ + + ], [ 368, 327 ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.3" + "nf-test": "0.9.1", + "nextflow": "24.10.0" }, - "timestamp": "2024-07-17T16:45:00.954762728" + "timestamp": "2024-11-07T13:57:19.117705738" } } \ No newline at end of file diff --git a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test.snap b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test.snap index 0e6a5ffb..cee01f80 100644 --- a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test.snap +++ b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test.snap @@ -36,28 +36,26 @@ [ "ERROR ~ Cannot invoke \"groovyx.gpars.serial.SerialContext.add(groovyx.gpars.serial.SerialHandle)\" because \"this.context\" is null", "", - " -- Check script '/mnt/s/Users/Main/Documents/Louis/Travail/IGDR/Repositories/phaseimpute/.nf-test-3966cf4e416fef97090bd07fa5b5d788.nf' at line: 38 or see '/mnt/s/Users/Main/Documents/Louis/Travail/IGDR/Repositories/phaseimpute/.nf-test/tests/3966cf4e416fef97090bd07fa5b5d788/meta/nextflow.log' file for more details" + " -- Check script '/mnt/c/Users/llenezet/Documents/Repositories/phaseimpute/.nf-test-d46c3ae4355f57c428b5399cb25385a3.nf' at line: 38 or see '/mnt/c/Users/llenezet/Documents/Repositories/phaseimpute/.nf-test/tests/d46c3ae4355f57c428b5399cb25385a3/meta/nextflow.log' file for more details" ] ], "meta": { - "nf-test": "0.9.2", + "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-06T15:33:20.783776531" + "timestamp": "2024-11-07T14:04:16.896325441" }, "Test checkMetaChr warning": { "content": [ [ - "N E X T F L O W ~ version 24.10.0", - "Launching `/mnt/s/Users/Main/Documents/Louis/Travail/IGDR/Repositories/phaseimpute/.nf-test-af0bb48a0b40b23797dfa4c90d16a9be.nf` [distracted_curie] DSL2 - revision: 1e291df575", - "WARN: Chr : [chrY] is missing from test" + ] ], "meta": { - "nf-test": "0.9.2", + "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-06T16:42:18.153356973" + "timestamp": "2024-11-07T14:03:45.047353204" }, "Test Function exportCsv": { "content": null, @@ -72,14 +70,14 @@ [ "ERROR ~ Cannot invoke \"groovyx.gpars.serial.SerialContext.add(groovyx.gpars.serial.SerialHandle)\" because \"this.context\" is null", "", - " -- Check script '/mnt/s/Users/Main/Documents/Louis/Travail/IGDR/Repositories/phaseimpute/.nf-test-ee405acbb326c194af37173eb2b9b995.nf' at line: 38 or see '/mnt/s/Users/Main/Documents/Louis/Travail/IGDR/Repositories/phaseimpute/.nf-test/tests/ee405acbb326c194af37173eb2b9b995/meta/nextflow.log' file for more details" + " -- Check script '/mnt/c/Users/llenezet/Documents/Repositories/phaseimpute/.nf-test-ee1562fb7668b97a4ee2fa78f0a93342.nf' at line: 38 or see '/mnt/c/Users/llenezet/Documents/Repositories/phaseimpute/.nf-test/tests/ee1562fb7668b97a4ee2fa78f0a93342/meta/nextflow.log' file for more details" ] ], "meta": { - "nf-test": "0.9.2", + "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-06T15:33:15.239178517" + "timestamp": "2024-11-07T14:04:00.742774334" }, "Test getFileExtension non empty list": { "content": [ @@ -111,13 +109,13 @@ [ "ERROR ~ Cannot invoke \"groovyx.gpars.serial.SerialContext.add(groovyx.gpars.serial.SerialHandle)\" because \"this.context\" is null", "", - " -- Check script '/mnt/s/Users/Main/Documents/Louis/Travail/IGDR/Repositories/phaseimpute/.nf-test-5de66bc0f91fbd42ad23f770871f349d.nf' at line: 38 or see '/mnt/s/Users/Main/Documents/Louis/Travail/IGDR/Repositories/phaseimpute/.nf-test/tests/5de66bc0f91fbd42ad23f770871f349d/meta/nextflow.log' file for more details" + " -- Check script '/mnt/c/Users/llenezet/Documents/Repositories/phaseimpute/.nf-test-87470b2a8c60f98b5dc561cea5e9bc6f.nf' at line: 38 or see '/mnt/c/Users/llenezet/Documents/Repositories/phaseimpute/.nf-test/tests/87470b2a8c60f98b5dc561cea5e9bc6f/meta/nextflow.log' file for more details" ] ], "meta": { - "nf-test": "0.9.2", + "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-06T15:33:26.334112895" + "timestamp": "2024-11-07T14:04:30.351215657" } } \ No newline at end of file diff --git a/subworkflows/local/vcf_concatenate_bcftools/tests/main.nf.test b/subworkflows/local/vcf_concatenate_bcftools/tests/main.nf.test index 62682207..bf59d2af 100644 --- a/subworkflows/local/vcf_concatenate_bcftools/tests/main.nf.test +++ b/subworkflows/local/vcf_concatenate_bcftools/tests/main.nf.test @@ -43,11 +43,17 @@ nextflow_workflow { then { assertAll( { assert workflow.success }, - { assert snapshot(workflow.out).match() }, - { assert snapshot(workflow.out.vcf_tbi.collect{ - path(it[1]).vcf.summary - }).match("Concat content") - } + { assert snapshot( + workflow.out.versions, + workflow.out.vcf_tbi.collect{[ + it[0], + path(it[1]).getFileName().toString(), + path(it[2]).getFileName().toString() + ] }, + workflow.out.vcf_tbi.collect{ + path(it[1]).vcf.summary + } + ).match() } ) } } diff --git a/subworkflows/local/vcf_concatenate_bcftools/tests/main.nf.test.snap b/subworkflows/local/vcf_concatenate_bcftools/tests/main.nf.test.snap index 7a4733d9..f9977675 100644 --- a/subworkflows/local/vcf_concatenate_bcftools/tests/main.nf.test.snap +++ b/subworkflows/local/vcf_concatenate_bcftools/tests/main.nf.test.snap @@ -1,51 +1,27 @@ { - "Concat content": { + "Concatenate vcf": { "content": [ + [ + "versions.yml:md5,0370775d4b565f1cf95dcbea437fa36a" + ], + [ + [ + { + "id": "1000GP", + "chr": "all" + }, + "1000GP_all.vcf.gz", + "1000GP_all.vcf.gz.tbi" + ] + ], [ "VcfFile [chromosomes=[chr21, chr22], sampleCount=3196, variantCount=1739, phased=true, phasedAutodetect=true]" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-07-18T11:56:39.376973769" - }, - "Concatenate vcf": { - "content": [ - { - "0": [ - [ - { - "id": "1000GP", - "chr": "all" - }, - "1000GP_all.vcf.gz:md5,fc8f8ceff29246d96337302072f8a3bb", - "1000GP_all.vcf.gz.tbi:md5,e7180bb953d2bd657c420a5f76a7164d" - ] - ], - "1": [ - "versions.yml:md5,0370775d4b565f1cf95dcbea437fa36a" - ], - "vcf_tbi": [ - [ - { - "id": "1000GP", - "chr": "all" - }, - "1000GP_all.vcf.gz:md5,fc8f8ceff29246d96337302072f8a3bb", - "1000GP_all.vcf.gz.tbi:md5,e7180bb953d2bd657c420a5f76a7164d" - ] - ], - "versions": [ - "versions.yml:md5,0370775d4b565f1cf95dcbea437fa36a" - ] - } - ], - "meta": { - "nf-test": "0.9.2", + "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-06T15:34:39.215613472" + "timestamp": "2024-11-07T14:07:30.535498349" } } \ No newline at end of file diff --git a/subworkflows/local/vcf_concordance_glimpse2/tests/main.nf.test.snap b/subworkflows/local/vcf_concordance_glimpse2/tests/main.nf.test.snap index 214b2b4c..7fdea09f 100644 --- a/subworkflows/local/vcf_concordance_glimpse2/tests/main.nf.test.snap +++ b/subworkflows/local/vcf_concordance_glimpse2/tests/main.nf.test.snap @@ -7,7 +7,7 @@ { "id": "TestQuality" }, - "TestQuality.txt:md5,10e837d99ad7a390747962c0eed9babd" + "TestQuality.txt:md5,0e199fabdd479db15849394e148bd1e1" ] ], "1": [ @@ -85,7 +85,7 @@ { "id": "TestQuality" }, - "TestQuality.txt:md5,10e837d99ad7a390747962c0eed9babd" + "TestQuality.txt:md5,0e199fabdd479db15849394e148bd1e1" ] ], "versions": [ @@ -97,9 +97,9 @@ } ], "meta": { - "nf-test": "0.9.2", + "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-06T15:34:58.441704416" + "timestamp": "2024-11-07T14:08:13.256185601" } } \ No newline at end of file diff --git a/subworkflows/local/vcf_impute_glimpse1/tests/main.nf.test b/subworkflows/local/vcf_impute_glimpse1/tests/main.nf.test index 45d37de8..a9a626d5 100644 --- a/subworkflows/local/vcf_impute_glimpse1/tests/main.nf.test +++ b/subworkflows/local/vcf_impute_glimpse1/tests/main.nf.test @@ -51,7 +51,12 @@ nextflow_workflow { assertAll( { assert workflow.success }, { assert snapshot( - workflow.out, + workflow.out.versions, + workflow.out.vcf_tbi.collect{[ + it[0], + path(it[1]).getFileName().toString(), + path(it[2]).getFileName().toString() + ] }, workflow.out.vcf_tbi.collect{ path(it[1]).vcf.summary }, workflow.out.vcf_tbi.collect{ path(it[1]).vcf.header.getGenotypeSamples().sort() } ).match() } @@ -87,7 +92,12 @@ nextflow_workflow { assertAll( { assert workflow.success }, { assert snapshot( - workflow.out, + workflow.out.versions, + workflow.out.vcf_tbi.collect{[ + it[0], + path(it[1]).getFileName().toString(), + path(it[2]).getFileName().toString() + ] }, workflow.out.vcf_tbi.collect{ path(it[1]).vcf.summary }, workflow.out.vcf_tbi.collect{ path(it[1]).vcf.header.getGenotypeSamples().sort() } ).match() } diff --git a/subworkflows/local/vcf_impute_glimpse1/tests/main.nf.test.snap b/subworkflows/local/vcf_impute_glimpse1/tests/main.nf.test.snap index 8bd6f81c..f6481644 100644 --- a/subworkflows/local/vcf_impute_glimpse1/tests/main.nf.test.snap +++ b/subworkflows/local/vcf_impute_glimpse1/tests/main.nf.test.snap @@ -1,54 +1,26 @@ { "Impute with glimpse1 one vcf": { "content": [ - { - "0": [ - [ - { - "id": "NA12878", - "panel": "1000GP", - "chr": "22", - "tools": "glimpse1" - }, - "NA12878_22_ligate.vcf.gz:md5,3a6cbabaafd2772afa140e02d3fe3238", - "NA12878_22_ligate.vcf.gz.tbi:md5,870a906079573453167617fc818638ab" - ] - ], - "1": [ - "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", - "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", - "versions.yml:md5,8c79d92b93fe75a9094499ce5d5eaca2", - "versions.yml:md5,9d78fceae32ec42b1818bb5890e9a6ba", - "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa", - "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa" - ], - "2": [ - - ], - "multiqc_files": [ - - ], - "vcf_tbi": [ - [ - { - "id": "NA12878", - "panel": "1000GP", - "chr": "22", - "tools": "glimpse1" - }, - "NA12878_22_ligate.vcf.gz:md5,3a6cbabaafd2772afa140e02d3fe3238", - "NA12878_22_ligate.vcf.gz.tbi:md5,870a906079573453167617fc818638ab" - ] - ], - "versions": [ - "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", - "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", - "versions.yml:md5,8c79d92b93fe75a9094499ce5d5eaca2", - "versions.yml:md5,9d78fceae32ec42b1818bb5890e9a6ba", - "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa", - "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa" + [ + "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", + "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", + "versions.yml:md5,8c79d92b93fe75a9094499ce5d5eaca2", + "versions.yml:md5,9d78fceae32ec42b1818bb5890e9a6ba", + "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa", + "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa" + ], + [ + [ + { + "id": "NA12878", + "panel": "1000GP", + "chr": "22", + "tools": "glimpse1" + }, + "NA12878_22_ligate.vcf.gz", + "NA12878_22_ligate.vcf.gz.tbi" ] - }, + ], [ "VcfFile [chromosomes=[chr22], sampleCount=1, variantCount=903, phased=false, phasedAutodetect=false]" ], @@ -59,93 +31,49 @@ ] ], "meta": { - "nf-test": "0.9.2", + "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-06T17:41:06.29924786" + "timestamp": "2024-11-07T12:31:45.012960487" }, "Impute with glimpse1 two vcf": { "content": [ - { - "0": [ - [ - { - "id": "NA12878", - "panel": "1000GP", - "chr": "22", - "tools": "glimpse1" - }, - "NA12878_22_ligate.vcf.gz:md5,9dade6f748ddd821ec01775ad378ba42", - "NA12878_22_ligate.vcf.gz.tbi:md5,870a906079573453167617fc818638ab" - ], - [ - { - "id": "NA19401", - "panel": "1000GP", - "chr": "22", - "tools": "glimpse1" - }, - "NA19401_22_ligate.vcf.gz:md5,4c684a116c49da91d7271793f89f95e4", - "NA19401_22_ligate.vcf.gz.tbi:md5,7efba07d4dec3b525149f459c08d853b" - ] - ], - "1": [ - "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", - "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", - "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", - "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", - "versions.yml:md5,8c79d92b93fe75a9094499ce5d5eaca2", - "versions.yml:md5,8c79d92b93fe75a9094499ce5d5eaca2", - "versions.yml:md5,9d78fceae32ec42b1818bb5890e9a6ba", - "versions.yml:md5,9d78fceae32ec42b1818bb5890e9a6ba", - "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa", - "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa", - "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa", - "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa" - ], - "2": [ - - ], - "multiqc_files": [ - - ], - "vcf_tbi": [ - [ - { - "id": "NA12878", - "panel": "1000GP", - "chr": "22", - "tools": "glimpse1" - }, - "NA12878_22_ligate.vcf.gz:md5,9dade6f748ddd821ec01775ad378ba42", - "NA12878_22_ligate.vcf.gz.tbi:md5,870a906079573453167617fc818638ab" - ], - [ - { - "id": "NA19401", - "panel": "1000GP", - "chr": "22", - "tools": "glimpse1" - }, - "NA19401_22_ligate.vcf.gz:md5,4c684a116c49da91d7271793f89f95e4", - "NA19401_22_ligate.vcf.gz.tbi:md5,7efba07d4dec3b525149f459c08d853b" - ] + [ + "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", + "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", + "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", + "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", + "versions.yml:md5,8c79d92b93fe75a9094499ce5d5eaca2", + "versions.yml:md5,8c79d92b93fe75a9094499ce5d5eaca2", + "versions.yml:md5,9d78fceae32ec42b1818bb5890e9a6ba", + "versions.yml:md5,9d78fceae32ec42b1818bb5890e9a6ba", + "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa", + "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa", + "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa", + "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa" + ], + [ + [ + { + "id": "NA12878", + "panel": "1000GP", + "chr": "22", + "tools": "glimpse1" + }, + "NA12878_22_ligate.vcf.gz", + "NA12878_22_ligate.vcf.gz.tbi" ], - "versions": [ - "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", - "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", - "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", - "versions.yml:md5,2f8b6f8bb3b3972bb0375abf1de08807", - "versions.yml:md5,8c79d92b93fe75a9094499ce5d5eaca2", - "versions.yml:md5,8c79d92b93fe75a9094499ce5d5eaca2", - "versions.yml:md5,9d78fceae32ec42b1818bb5890e9a6ba", - "versions.yml:md5,9d78fceae32ec42b1818bb5890e9a6ba", - "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa", - "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa", - "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa", - "versions.yml:md5,bf4a479eb73467775a4afeebd25841aa" + [ + { + "id": "NA19401", + "panel": "1000GP", + "chr": "22", + "tools": "glimpse1" + }, + "NA19401_22_ligate.vcf.gz", + "NA19401_22_ligate.vcf.gz.tbi" ] - }, + ], [ "VcfFile [chromosomes=[chr22], sampleCount=1, variantCount=903, phased=false, phasedAutodetect=false]", "VcfFile [chromosomes=[chr22], sampleCount=1, variantCount=903, phased=false, phasedAutodetect=false]" @@ -160,9 +88,9 @@ ] ], "meta": { - "nf-test": "0.9.2", + "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-06T17:40:48.121360395" + "timestamp": "2024-11-07T12:31:10.854492318" } } \ No newline at end of file diff --git a/subworkflows/local/vcf_normalize_bcftools/tests/main.nf.test b/subworkflows/local/vcf_normalize_bcftools/tests/main.nf.test index 68333ed4..6fa38fbd 100644 --- a/subworkflows/local/vcf_normalize_bcftools/tests/main.nf.test +++ b/subworkflows/local/vcf_normalize_bcftools/tests/main.nf.test @@ -54,11 +54,20 @@ nextflow_workflow { then { assertAll( { assert workflow.success }, - { assert snapshot(workflow.out).match() }, - { assert snapshot(workflow.out.vcf_tbi.collect{ - path(it[1]).vcf.summary - }).match("Normalize content") - }, + { assert snapshot( + workflow.out.versions, + workflow.out.vcf_tbi.collect{[ + it[0], + path(it[1]).getFileName().toString(), + path(it[2]).getFileName().toString() + ] }, + workflow.out.vcf_tbi.collect{ + path(it[1]).vcf.summary + }, + workflow.out.vcf_tbi.collect{ + path(it[1]).vcf.header.getGenotypeSamples().size() + } + ).match() }, { workflow.out.vcf_tbi.collect{ assert path(it[1]).vcf.variantCount == path(it[1]).vcf.noSnps }} @@ -100,11 +109,20 @@ nextflow_workflow { then { assertAll( { assert workflow.success }, - { assert snapshot(workflow.out).match() }, - { assert snapshot(workflow.out.vcf_tbi.collect{ - path(it[1]).vcf.summary - }).match("Norm content recomputed") - } + { assert snapshot( + workflow.out.versions, + workflow.out.vcf_tbi.collect{[ + it[0], + path(it[1]).getFileName().toString(), + path(it[2]).getFileName().toString() + ] }, + workflow.out.vcf_tbi.collect{ + path(it[1]).vcf.summary + }, + workflow.out.vcf_tbi.collect{ + path(it[1]).vcf.header.getGenotypeSamples().size() + } + ).match() } ) } } diff --git a/subworkflows/local/vcf_normalize_bcftools/tests/main.nf.test.snap b/subworkflows/local/vcf_normalize_bcftools/tests/main.nf.test.snap index 6d2cf5b6..ae68d16e 100644 --- a/subworkflows/local/vcf_normalize_bcftools/tests/main.nf.test.snap +++ b/subworkflows/local/vcf_normalize_bcftools/tests/main.nf.test.snap @@ -1,154 +1,88 @@ { - "Normalize content": { - "content": [ - [ - "VcfFile [chromosomes=[chr21], sampleCount=3196, variantCount=836, phased=true, phasedAutodetect=true]", - "VcfFile [chromosomes=[chr22], sampleCount=3196, variantCount=903, phased=true, phasedAutodetect=true]" - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-07-18T15:21:05.213839279" - }, "Normalize vcf with computing frequencies after removing samples": { "content": [ - { - "0": [ - [ - { - "id": "1000GP", - "chr": "chr21" - }, - "1000GP_chr21_fixed.vcf.gz:md5,7ba662a360af50800f160a68dc168375", - "1000GP_chr21_fixed.vcf.gz.tbi:md5,a6690d0553f532e3952d591d9c57ba71" - ], - [ - { - "id": "1000GP", - "chr": "chr22" - }, - "1000GP_chr22_fixed.vcf.gz:md5,a00481ba39e0e0a769aa49d1e57ffb66", - "1000GP_chr22_fixed.vcf.gz.tbi:md5,3fb30aa704a97e35898a7a281d18ab29" - ] - ], - "1": [ - "versions.yml:md5,3bba75c8e94eb2271ad38e3a1ee06ad8", - "versions.yml:md5,3bba75c8e94eb2271ad38e3a1ee06ad8", - "versions.yml:md5,bdf2c1ea1cace63b301158243f3fd12f", - "versions.yml:md5,bdf2c1ea1cace63b301158243f3fd12f", - "versions.yml:md5,c1918a7ebe19e200e8981e12c8fd52d4", - "versions.yml:md5,c1918a7ebe19e200e8981e12c8fd52d4", - "versions.yml:md5,da9510d939fc9cb45b897127f0d5e490", - "versions.yml:md5,da9510d939fc9cb45b897127f0d5e490" - ], - "vcf_tbi": [ - [ - { - "id": "1000GP", - "chr": "chr21" - }, - "1000GP_chr21_fixed.vcf.gz:md5,7ba662a360af50800f160a68dc168375", - "1000GP_chr21_fixed.vcf.gz.tbi:md5,a6690d0553f532e3952d591d9c57ba71" - ], - [ - { - "id": "1000GP", - "chr": "chr22" - }, - "1000GP_chr22_fixed.vcf.gz:md5,a00481ba39e0e0a769aa49d1e57ffb66", - "1000GP_chr22_fixed.vcf.gz.tbi:md5,3fb30aa704a97e35898a7a281d18ab29" - ] + [ + "versions.yml:md5,3bba75c8e94eb2271ad38e3a1ee06ad8", + "versions.yml:md5,3bba75c8e94eb2271ad38e3a1ee06ad8", + "versions.yml:md5,bdf2c1ea1cace63b301158243f3fd12f", + "versions.yml:md5,bdf2c1ea1cace63b301158243f3fd12f", + "versions.yml:md5,c1918a7ebe19e200e8981e12c8fd52d4", + "versions.yml:md5,c1918a7ebe19e200e8981e12c8fd52d4", + "versions.yml:md5,da9510d939fc9cb45b897127f0d5e490", + "versions.yml:md5,da9510d939fc9cb45b897127f0d5e490" + ], + [ + [ + { + "id": "1000GP", + "chr": "chr21" + }, + "1000GP_chr21_fixed.vcf.gz", + "1000GP_chr21_fixed.vcf.gz.tbi" ], - "versions": [ - "versions.yml:md5,3bba75c8e94eb2271ad38e3a1ee06ad8", - "versions.yml:md5,3bba75c8e94eb2271ad38e3a1ee06ad8", - "versions.yml:md5,bdf2c1ea1cace63b301158243f3fd12f", - "versions.yml:md5,bdf2c1ea1cace63b301158243f3fd12f", - "versions.yml:md5,c1918a7ebe19e200e8981e12c8fd52d4", - "versions.yml:md5,c1918a7ebe19e200e8981e12c8fd52d4", - "versions.yml:md5,da9510d939fc9cb45b897127f0d5e490", - "versions.yml:md5,da9510d939fc9cb45b897127f0d5e490" + [ + { + "id": "1000GP", + "chr": "chr22" + }, + "1000GP_chr22_fixed.vcf.gz", + "1000GP_chr22_fixed.vcf.gz.tbi" ] - } - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.0" - }, - "timestamp": "2024-11-06T15:35:50.602801842" - }, - "Norm content recomputed": { - "content": [ + ], [ "VcfFile [chromosomes=[chr21], sampleCount=3190, variantCount=836, phased=true, phasedAutodetect=true]", "VcfFile [chromosomes=[chr22], sampleCount=3190, variantCount=903, phased=true, phasedAutodetect=true]" + ], + [ + 3190, + 3190 ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.1", + "nextflow": "24.10.0" }, - "timestamp": "2024-07-18T15:23:37.057826205" + "timestamp": "2024-11-07T14:11:08.9049564" }, "Normalize vcf without computing frequencies nor removing samples": { "content": [ - { - "0": [ - [ - { - "id": "1000GP", - "chr": "chr21" - }, - "1000GP_chr21_biallelic_snps.vcf.gz:md5,2adaff4c1dc4168a152d56e98c42a687", - "1000GP_chr21_biallelic_snps.vcf.gz.tbi:md5,006d0bec1050410aa64d427e2fad42e2" - ], - [ - { - "id": "1000GP", - "chr": "chr22" - }, - "1000GP_chr22_biallelic_snps.vcf.gz:md5,f5b6f95c3412181413cac2927a48c67b", - "1000GP_chr22_biallelic_snps.vcf.gz.tbi:md5,d3460d21cacfbb15b34289454e2922a8" - ] - ], - "1": [ - "versions.yml:md5,c1918a7ebe19e200e8981e12c8fd52d4", - "versions.yml:md5,c1918a7ebe19e200e8981e12c8fd52d4", - "versions.yml:md5,da9510d939fc9cb45b897127f0d5e490", - "versions.yml:md5,da9510d939fc9cb45b897127f0d5e490" - ], - "vcf_tbi": [ - [ - { - "id": "1000GP", - "chr": "chr21" - }, - "1000GP_chr21_biallelic_snps.vcf.gz:md5,2adaff4c1dc4168a152d56e98c42a687", - "1000GP_chr21_biallelic_snps.vcf.gz.tbi:md5,006d0bec1050410aa64d427e2fad42e2" - ], - [ - { - "id": "1000GP", - "chr": "chr22" - }, - "1000GP_chr22_biallelic_snps.vcf.gz:md5,f5b6f95c3412181413cac2927a48c67b", - "1000GP_chr22_biallelic_snps.vcf.gz.tbi:md5,d3460d21cacfbb15b34289454e2922a8" - ] + [ + "versions.yml:md5,c1918a7ebe19e200e8981e12c8fd52d4", + "versions.yml:md5,c1918a7ebe19e200e8981e12c8fd52d4", + "versions.yml:md5,da9510d939fc9cb45b897127f0d5e490", + "versions.yml:md5,da9510d939fc9cb45b897127f0d5e490" + ], + [ + [ + { + "id": "1000GP", + "chr": "chr21" + }, + "1000GP_chr21_biallelic_snps.vcf.gz", + "1000GP_chr21_biallelic_snps.vcf.gz.tbi" ], - "versions": [ - "versions.yml:md5,c1918a7ebe19e200e8981e12c8fd52d4", - "versions.yml:md5,c1918a7ebe19e200e8981e12c8fd52d4", - "versions.yml:md5,da9510d939fc9cb45b897127f0d5e490", - "versions.yml:md5,da9510d939fc9cb45b897127f0d5e490" + [ + { + "id": "1000GP", + "chr": "chr22" + }, + "1000GP_chr22_biallelic_snps.vcf.gz", + "1000GP_chr22_biallelic_snps.vcf.gz.tbi" ] - } + ], + [ + "VcfFile [chromosomes=[chr21], sampleCount=3196, variantCount=836, phased=true, phasedAutodetect=true]", + "VcfFile [chromosomes=[chr22], sampleCount=3196, variantCount=903, phased=true, phasedAutodetect=true]" + ], + [ + 3196, + 3196 + ] ], "meta": { - "nf-test": "0.9.2", + "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-06T15:35:24.336463059" + "timestamp": "2024-11-07T14:10:11.989583075" } } \ No newline at end of file diff --git a/subworkflows/local/vcf_phase_shapeit5/tests/main.nf.test b/subworkflows/local/vcf_phase_shapeit5/tests/main.nf.test index 4a95348f..4c1eed92 100644 --- a/subworkflows/local/vcf_phase_shapeit5/tests/main.nf.test +++ b/subworkflows/local/vcf_phase_shapeit5/tests/main.nf.test @@ -59,11 +59,17 @@ nextflow_workflow { then { assertAll( { assert workflow.success }, - { assert snapshot(workflow.out).match() }, - { assert snapshot(workflow.out.vcf_tbi.collect{ - path(it[1]).vcf.summary - }).match("Phasing content") - }, + { assert snapshot( + workflow.out.versions, + workflow.out.vcf_tbi.collect{[ + it[0], + path(it[1]).getFileName().toString(), + path(it[2]).getFileName().toString() + ] }, + workflow.out.vcf_tbi.collect{ + path(it[1]).vcf.summary + } + ).match() }, { workflow.out.vcf_tbi.collect{ assert path(it[1]).vcf.phased }} diff --git a/subworkflows/local/vcf_phase_shapeit5/tests/main.nf.test.snap b/subworkflows/local/vcf_phase_shapeit5/tests/main.nf.test.snap index b8071863..48c1ed08 100644 --- a/subworkflows/local/vcf_phase_shapeit5/tests/main.nf.test.snap +++ b/subworkflows/local/vcf_phase_shapeit5/tests/main.nf.test.snap @@ -1,76 +1,40 @@ { - "Phasing content": { + "Phase vcf with regions, no map, no ref, no scaffold": { "content": [ + [ + "versions.yml:md5,529c03b8d921c72026e91d71c0321811", + "versions.yml:md5,714bb0db6e2d39cf0042359a64915bc6", + "versions.yml:md5,8ffcda8a9d22f60c90d0e4276da3e714", + "versions.yml:md5,cab7592ebcb3d391afcd3191a175723b", + "versions.yml:md5,ed131d2608f28f8ada06ccc42717575e" + ], + [ + [ + { + "id": "1000GP", + "chr": "chr21" + }, + "1000GP.vcf.gz", + "1000GP.vcf.gz.csi" + ], + [ + { + "id": "1000GP", + "chr": "chr22" + }, + "1000GP.vcf.gz", + "1000GP.vcf.gz.csi" + ] + ], [ "VcfFile [chromosomes=[chr21], sampleCount=3196, variantCount=836, phased=true, phasedAutodetect=true]", "VcfFile [chromosomes=[chr22], sampleCount=3196, variantCount=903, phased=true, phasedAutodetect=true]" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-07-18T15:56:20.067633938" - }, - "Phase vcf with regions, no map, no ref, no scaffold": { - "content": [ - { - "0": [ - [ - { - "id": "1000GP", - "chr": "chr21" - }, - "1000GP.vcf.gz:md5,fa076304a5451d471c5714f173677431", - "1000GP.vcf.gz.csi:md5,20c7a75a26dc678f9ecc2ab989a3a942" - ], - [ - { - "id": "1000GP", - "chr": "chr22" - }, - "1000GP.vcf.gz:md5,13e3166bf4a0779c1c13bd87facc2297", - "1000GP.vcf.gz.csi:md5,ed1f6fd4d15139955d9d0e8bb6b2700f" - ] - ], - "1": [ - "versions.yml:md5,529c03b8d921c72026e91d71c0321811", - "versions.yml:md5,714bb0db6e2d39cf0042359a64915bc6", - "versions.yml:md5,8ffcda8a9d22f60c90d0e4276da3e714", - "versions.yml:md5,cab7592ebcb3d391afcd3191a175723b", - "versions.yml:md5,ed131d2608f28f8ada06ccc42717575e" - ], - "vcf_tbi": [ - [ - { - "id": "1000GP", - "chr": "chr21" - }, - "1000GP.vcf.gz:md5,fa076304a5451d471c5714f173677431", - "1000GP.vcf.gz.csi:md5,20c7a75a26dc678f9ecc2ab989a3a942" - ], - [ - { - "id": "1000GP", - "chr": "chr22" - }, - "1000GP.vcf.gz:md5,13e3166bf4a0779c1c13bd87facc2297", - "1000GP.vcf.gz.csi:md5,ed1f6fd4d15139955d9d0e8bb6b2700f" - ] - ], - "versions": [ - "versions.yml:md5,529c03b8d921c72026e91d71c0321811", - "versions.yml:md5,714bb0db6e2d39cf0042359a64915bc6", - "versions.yml:md5,8ffcda8a9d22f60c90d0e4276da3e714", - "versions.yml:md5,cab7592ebcb3d391afcd3191a175723b", - "versions.yml:md5,ed131d2608f28f8ada06ccc42717575e" - ] - } - ], - "meta": { - "nf-test": "0.9.2", + "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-06T15:36:12.498553422" + "timestamp": "2024-11-07T14:12:06.629168089" } } \ No newline at end of file diff --git a/subworkflows/local/vcf_split_bcftools/tests/main.nf.test b/subworkflows/local/vcf_split_bcftools/tests/main.nf.test index bcb0a9ed..46c09660 100644 --- a/subworkflows/local/vcf_split_bcftools/tests/main.nf.test +++ b/subworkflows/local/vcf_split_bcftools/tests/main.nf.test @@ -57,11 +57,17 @@ nextflow_workflow { then { assertAll( { assert workflow.success }, - { assert snapshot(workflow.out).match() }, - { assert snapshot(workflow.out.vcf_tbi.collect{ - path(it[1]).vcf.summary - }).match("Phasing content") - }, + { assert snapshot( + workflow.out.versions, + workflow.out.vcf_tbi.collect{[ + it[0], + path(it[1]).getFileName().toString(), + path(it[2]).getFileName().toString() + ] }, + workflow.out.vcf_tbi.collect{ + path(it[1]).vcf.summary + } + ).match() }, { workflow.out.vcf_tbi.collect{ assert path(it[1]).vcf.sampleCount == 1 }} diff --git a/subworkflows/local/vcf_split_bcftools/tests/main.nf.test.snap b/subworkflows/local/vcf_split_bcftools/tests/main.nf.test.snap index 2e8b257d..d3bd681e 100644 --- a/subworkflows/local/vcf_split_bcftools/tests/main.nf.test.snap +++ b/subworkflows/local/vcf_split_bcftools/tests/main.nf.test.snap @@ -1,69 +1,32 @@ { "Split vcf file": { "content": [ - { - "0": [ - [ - { - "id": "NA12878" - }, - "NA12878.vcf.gz:md5,0ba553f8ab7319a53d6dd2a275c5df7c", - "NA12878.vcf.gz.tbi:md5,31c12acb72d301cc69478c58b513d779" - ], - [ - { - "id": "NA19401" - }, - "NA19401.vcf.gz:md5,5f299ed6d9c5fb877e32786f41b1a762", - "NA19401.vcf.gz.tbi:md5,df50fdbb8acbbcdc2144b56cb5a946a8" - ], - [ - { - "id": "NA20359" - }, - "NA20359.vcf.gz:md5,9b4896c27ab986f3a8699dc8e11c4182", - "NA20359.vcf.gz.tbi:md5,9ba59a25c5a6c07a0896d57ecf3103bd" - ] - ], - "1": [ - "versions.yml:md5,6c3351d97e3a99f7a7a3231fc49f92e2" + [ + "versions.yml:md5,6c3351d97e3a99f7a7a3231fc49f92e2" + ], + [ + [ + { + "id": "NA12878" + }, + "NA12878.vcf.gz", + "NA12878.vcf.gz.tbi" ], - "vcf_tbi": [ - [ - { - "id": "NA12878" - }, - "NA12878.vcf.gz:md5,0ba553f8ab7319a53d6dd2a275c5df7c", - "NA12878.vcf.gz.tbi:md5,31c12acb72d301cc69478c58b513d779" - ], - [ - { - "id": "NA19401" - }, - "NA19401.vcf.gz:md5,5f299ed6d9c5fb877e32786f41b1a762", - "NA19401.vcf.gz.tbi:md5,df50fdbb8acbbcdc2144b56cb5a946a8" - ], - [ - { - "id": "NA20359" - }, - "NA20359.vcf.gz:md5,9b4896c27ab986f3a8699dc8e11c4182", - "NA20359.vcf.gz.tbi:md5,9ba59a25c5a6c07a0896d57ecf3103bd" - ] + [ + { + "id": "NA19401" + }, + "NA19401.vcf.gz", + "NA19401.vcf.gz.tbi" ], - "versions": [ - "versions.yml:md5,6c3351d97e3a99f7a7a3231fc49f92e2" + [ + { + "id": "NA20359" + }, + "NA20359.vcf.gz", + "NA20359.vcf.gz.tbi" ] - } - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.0" - }, - "timestamp": "2024-11-06T15:36:41.842146898" - }, - "Phasing content": { - "content": [ + ], [ "VcfFile [chromosomes=[chr21, chr22], sampleCount=1, variantCount=1739, phased=true, phasedAutodetect=true]", "VcfFile [chromosomes=[chr21, chr22], sampleCount=1, variantCount=1739, phased=true, phasedAutodetect=true]", @@ -71,9 +34,9 @@ ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.1", + "nextflow": "24.10.0" }, - "timestamp": "2024-07-18T17:13:33.060063904" + "timestamp": "2024-11-07T14:13:06.801872176" } } \ No newline at end of file From 9400b168298b77d63f52e2afe04a91bc3b8f4795 Mon Sep 17 00:00:00 2001 From: Louis Le Nezet Date: Thu, 7 Nov 2024 16:42:10 +0100 Subject: [PATCH 27/32] Fix function validateInputBatchTools --- .../utils_nfcore_phaseimpute_pipeline/main.nf | 1 + .../tests/function.nf.test | 39 ++++++++++++++++--- .../tests/function.nf.test.snap | 39 +++++++++++++------ 3 files changed, 61 insertions(+), 18 deletions(-) diff --git a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf index 8c59bdaa..2fd09c76 100644 --- a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf @@ -452,6 +452,7 @@ def validateInputBatchTools(ch_input, batch_size, extension, tools) { } } } + return null } // diff --git a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test index afc4d27a..1b8d3ae5 100644 --- a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test +++ b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test @@ -336,8 +336,10 @@ nextflow_function { } } then { - assert function.failed - assert snapshot(function.stdout).match() + assertAll ( + { assert function.failed }, + { assert snapshot(function.stdout).match() } + ) } } @@ -355,8 +357,10 @@ nextflow_function { } } then { - assert function.failed - assert snapshot(function.stdout).match() + assertAll ( + { assert function.failed }, + { assert snapshot(function.stdout).match() } + ) } } @@ -374,8 +378,31 @@ nextflow_function { } } then { - assert function.failed - assert snapshot(function.stdout).match() + assertAll ( + { assert function.failed }, + { assert snapshot(function.stdout).match() } + ) + } + } + + test ("Test validateInputBatchTools success batch") { + function "validateInputBatchTools" + tag "validateInputBatchTools" + when { + function { + """ + input[0] = Channel.of(0..150) + input[1] = 60 + input[2] = "cram" + input[3] = ["quilt", "glimpse2"] + """ + } + } + then { + assertAll ( + { assert function.success }, + { assert snapshot(function.stdout).match() } + ) } } } diff --git a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test.snap b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test.snap index cee01f80..a0aaa167 100644 --- a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test.snap +++ b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test.snap @@ -34,16 +34,16 @@ "Test validateInputBatchTools only one vcf": { "content": [ [ - "ERROR ~ Cannot invoke \"groovyx.gpars.serial.SerialContext.add(groovyx.gpars.serial.SerialHandle)\" because \"this.context\" is null", - "", - " -- Check script '/mnt/c/Users/llenezet/Documents/Repositories/phaseimpute/.nf-test-d46c3ae4355f57c428b5399cb25385a3.nf' at line: 38 or see '/mnt/c/Users/llenezet/Documents/Repositories/phaseimpute/.nf-test/tests/d46c3ae4355f57c428b5399cb25385a3/meta/nextflow.log' file for more details" + "N E X T F L O W ~ version 24.10.0", + "Launching `/mnt/c/Users/llenezet/Documents/Repositories/phaseimpute/.nf-test-d46c3ae4355f57c428b5399cb25385a3.nf` [deadly_lamarck] DSL2 - revision: 89cd7edbc5", + "When using a Variant Calling Format file as input, only one file can be provided. If you have multiple single-sample VCF files, please merge them into a single multisample VCF file." ] ], "meta": { "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-07T14:04:16.896325441" + "timestamp": "2024-11-07T16:40:38.015152671" }, "Test checkMetaChr warning": { "content": [ @@ -68,16 +68,30 @@ "Test validateInputBatchTools vcf only for glimpse": { "content": [ [ - "ERROR ~ Cannot invoke \"groovyx.gpars.serial.SerialContext.add(groovyx.gpars.serial.SerialHandle)\" because \"this.context\" is null", - "", - " -- Check script '/mnt/c/Users/llenezet/Documents/Repositories/phaseimpute/.nf-test-ee1562fb7668b97a4ee2fa78f0a93342.nf' at line: 38 or see '/mnt/c/Users/llenezet/Documents/Repositories/phaseimpute/.nf-test/tests/ee1562fb7668b97a4ee2fa78f0a93342/meta/nextflow.log' file for more details" + "N E X T F L O W ~ version 24.10.0", + "Launching `/mnt/c/Users/llenezet/Documents/Repositories/phaseimpute/.nf-test-ee1562fb7668b97a4ee2fa78f0a93342.nf` [stupefied_gautier] DSL2 - revision: 33e883fb97", + "Stitch or Quilt software cannot run with VCF or BCF files. Please provide alignment files (i.e. BAM or CRAM)." ] ], "meta": { "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-07T14:04:00.742774334" + "timestamp": "2024-11-07T16:40:24.343659957" + }, + "Test validateInputBatchTools success batch": { + "content": [ + [ + "N E X T F L O W ~ version 24.10.0", + "Launching `/mnt/c/Users/llenezet/Documents/Repositories/phaseimpute/.nf-test-a882e6f88e44c954568a3552c82f8d3c.nf` [compassionate_keller] DSL2 - revision: edfeedf8f1", + "WARN: Glimpse2 or Quilt software is selected and the number of input files (151) is less than the batch size (60). The input files will be processed in 3 batches." + ] + ], + "meta": { + "nf-test": "0.9.1", + "nextflow": "24.10.0" + }, + "timestamp": "2024-11-07T16:41:05.86605167" }, "Test getFileExtension non empty list": { "content": [ @@ -107,15 +121,16 @@ "Test validateInputBatchTools error batch": { "content": [ [ - "ERROR ~ Cannot invoke \"groovyx.gpars.serial.SerialContext.add(groovyx.gpars.serial.SerialHandle)\" because \"this.context\" is null", - "", - " -- Check script '/mnt/c/Users/llenezet/Documents/Repositories/phaseimpute/.nf-test-87470b2a8c60f98b5dc561cea5e9bc6f.nf' at line: 38 or see '/mnt/c/Users/llenezet/Documents/Repositories/phaseimpute/.nf-test/tests/87470b2a8c60f98b5dc561cea5e9bc6f/meta/nextflow.log' file for more details" + "N E X T F L O W ~ version 24.10.0", + "Launching `/mnt/c/Users/llenezet/Documents/Repositories/phaseimpute/.nf-test-87470b2a8c60f98b5dc561cea5e9bc6f.nf` [prickly_euclid] DSL2 - revision: 45ae3df33f", + "WARN: Glimpse2 or Quilt software is selected and the number of input files (151) is less than the batch size (60). The input files will be processed in 3 batches.", + "Stitch or Glimpse1 software is selected and the number of input files (151) is less than the batch size (60). Splitting the input files in batches would induce batch effect." ] ], "meta": { "nf-test": "0.9.1", "nextflow": "24.10.0" }, - "timestamp": "2024-11-07T14:04:30.351215657" + "timestamp": "2024-11-07T16:40:50.034843333" } } \ No newline at end of file From 55dc003314e498570eeb9c5994314fb4718b36a1 Mon Sep 17 00:00:00 2001 From: Louis Le Nezet Date: Thu, 7 Nov 2024 16:44:28 +0100 Subject: [PATCH 28/32] Add null return --- subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf index 2fd09c76..52215c6a 100644 --- a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf @@ -425,6 +425,8 @@ def validateInputParameters() { error("To use `--remove_samples` you need to include `--normalize`.") } } + + return null } // @@ -476,6 +478,7 @@ def validatePosfileTools(ch_posfile, tools, steps){ assert index : "Validation step needs an index file provided in the posfile for the allele frequency. This file can be created through the panelprep step." } } + return null } // From 15275917427cd955cc853a244e62cd7640c39561 Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Thu, 7 Nov 2024 18:21:59 +0100 Subject: [PATCH 29/32] Remove println --- .../utils_nfcore_phaseimpute_pipeline/tests/function.nf.test | 1 - 1 file changed, 1 deletion(-) diff --git a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test index 1b8d3ae5..bf8d7b2b 100644 --- a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test +++ b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/tests/function.nf.test @@ -277,7 +277,6 @@ nextflow_function { then { with(function) { - println result assert success assert snapshot(result).match() } From ca6c5a54d7fbfcffe3741c6017bd4db143e980cd Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Thu, 7 Nov 2024 18:26:14 +0100 Subject: [PATCH 30/32] Update CHANGELOG --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bee89a55..69c25dbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,7 +64,7 @@ Initial release of nf-core/phaseimpute, created with the [nf-core](https://nf-co - [#148](https://github.com/nf-core/phaseimpute/pull/148) - Fix awsfulltest github action for manual dispatch - [#149](https://github.com/nf-core/phaseimpute/pull/149) - Remove the map file from the awsfulltest - [#152](https://github.com/nf-core/phaseimpute/pull/152) - Fix URLs in the documentation and remove tools citation in the README, use a white background for all images in the documentation. -- [#153](https://github.com/nf-core/phaseimpute/pull/153) - Remove normalisation, frequency commputation and phasing from full test to reduce cost and computational time. Fix image in `usage.md`. Fix small warnings and errors with updated language server. `def` has been added when necesary, `:` use instead of `,` in assertions, `_` added to variables not used in closures, `for` loop replaced by `.each{}`, remove unused code / input. Fix getFileExtension function. +- [#153](https://github.com/nf-core/phaseimpute/pull/153) - Remove normalisation, frequency commputation and phasing from full test to reduce cost and computational time. Simplify subworkflows snapshot and check only for files names (no md5sum for bam and vcf files). ### `Fixed` @@ -74,7 +74,7 @@ Initial release of nf-core/phaseimpute, created with the [nf-core](https://nf-co - [#75](https://github.com/nf-core/phaseimpute/pull/75) - Set frequency computation with VCFFIXUP process as optional with `--compute_freq`. Use Glimpse_chunk on panel vcf to compute the chunk and not makewindows on fasta. - [#117](https://github.com/nf-core/phaseimpute/pull/117) - Fix directories in CSV. - [#151](https://github.com/nf-core/phaseimpute/pull/151) - Fix `Type not supported: class org.codehaus.groovy.runtime.GStringImpl` error due to `String` test in `getFileExtension()`. -- [#153](https://github.com/nf-core/phaseimpute/pull/153) - Fix contigs usage when regions is only a subset of the given contigs (e.g. if panel file has the 22 chr and the region file only 2 then only the 2 common will be processed). +- [#153](https://github.com/nf-core/phaseimpute/pull/153) - Fix contigs usage when regions is only a subset of the given contigs (e.g. if panel file has the 22 chr and the region file only 2 then only the 2 common will be processed). Fix getFileExtension function. Fix image in `usage.md`. Fix small warnings and errors with updated language server. `def` has been added when necesary, `:` use instead of `,` in assertions, `_` added to variables not used in closures, `for` loop replaced by `.each{}`, remove unused code / input. ### `Dependencies` From 53a71736d5e68d585f959c60c7f6d475f073a17a Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Fri, 8 Nov 2024 14:53:53 +0100 Subject: [PATCH 31/32] Set back fulltest to glimpse1 --- conf/test_full.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/test_full.config b/conf/test_full.config index c59b6791..f4048ae4 100644 --- a/conf/test_full.config +++ b/conf/test_full.config @@ -40,5 +40,5 @@ params { phase = false // Impute tools - tools = "glimpse2" + tools = "glimpse1" } From ee279817a772f5c124f3a996b339431a76134b06 Mon Sep 17 00:00:00 2001 From: LouisLeNezet Date: Sun, 10 Nov 2024 19:48:19 +0100 Subject: [PATCH 32/32] Reduce spec of PR --- CHANGELOG.md | 4 ++-- conf/test.config | 4 ++-- conf/test_all.config | 2 +- conf/test_full.config | 4 ++-- .../utils_nfcore_phaseimpute_pipeline/main.nf | 19 ------------------- 5 files changed, 7 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69c25dbf..afa92adc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,7 +64,7 @@ Initial release of nf-core/phaseimpute, created with the [nf-core](https://nf-co - [#148](https://github.com/nf-core/phaseimpute/pull/148) - Fix awsfulltest github action for manual dispatch - [#149](https://github.com/nf-core/phaseimpute/pull/149) - Remove the map file from the awsfulltest - [#152](https://github.com/nf-core/phaseimpute/pull/152) - Fix URLs in the documentation and remove tools citation in the README, use a white background for all images in the documentation. -- [#153](https://github.com/nf-core/phaseimpute/pull/153) - Remove normalisation, frequency commputation and phasing from full test to reduce cost and computational time. Simplify subworkflows snapshot and check only for files names (no md5sum for bam and vcf files). +- [#153](https://github.com/nf-core/phaseimpute/pull/153) - Update and simplify subworkflows snapshot and check only for files names (no md5sum for bam and vcf files due to timestamp). ### `Fixed` @@ -74,7 +74,7 @@ Initial release of nf-core/phaseimpute, created with the [nf-core](https://nf-co - [#75](https://github.com/nf-core/phaseimpute/pull/75) - Set frequency computation with VCFFIXUP process as optional with `--compute_freq`. Use Glimpse_chunk on panel vcf to compute the chunk and not makewindows on fasta. - [#117](https://github.com/nf-core/phaseimpute/pull/117) - Fix directories in CSV. - [#151](https://github.com/nf-core/phaseimpute/pull/151) - Fix `Type not supported: class org.codehaus.groovy.runtime.GStringImpl` error due to `String` test in `getFileExtension()`. -- [#153](https://github.com/nf-core/phaseimpute/pull/153) - Fix contigs usage when regions is only a subset of the given contigs (e.g. if panel file has the 22 chr and the region file only 2 then only the 2 common will be processed). Fix getFileExtension function. Fix image in `usage.md`. Fix small warnings and errors with updated language server. `def` has been added when necesary, `:` use instead of `,` in assertions, `_` added to variables not used in closures, `for` loop replaced by `.each{}`, remove unused code / input. +- [#153](https://github.com/nf-core/phaseimpute/pull/153) - Fix getFileExtension function. Fix image in `usage.md`. Fix small warnings and errors with updated language server. `def` has been added when necesary, `:` use instead of `,` in assertions, `_` added to variables not used in closures, `for` loop replaced by `.each{}`, remove unused code / input. ### `Dependencies` diff --git a/conf/test.config b/conf/test.config index 8a7c8c2b..f5c7b8dd 100644 --- a/conf/test.config +++ b/conf/test.config @@ -12,8 +12,8 @@ process { resourceLimits = [ - cpus: 2, - memory: '2.GB', + cpus: 4, + memory: '15.GB', time: '1.h' ] } diff --git a/conf/test_all.config b/conf/test_all.config index c1b0057f..854f8664 100644 --- a/conf/test_all.config +++ b/conf/test_all.config @@ -13,7 +13,7 @@ process { resourceLimits = [ cpus: 2, - memory: '7.GB', + memory: '10.GB', time: '1.h' ] } diff --git a/conf/test_full.config b/conf/test_full.config index f4048ae4..fa1e3475 100644 --- a/conf/test_full.config +++ b/conf/test_full.config @@ -36,8 +36,8 @@ params { // Panelprep optional args remove_samples = "NA12878,NA12891,NA12892" normalize = true - compute_freq = false - phase = false + compute_freq = true + phase = true // Impute tools tools = "glimpse1" diff --git a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf index 52215c6a..f48d3631 100644 --- a/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf @@ -275,25 +275,6 @@ workflow PIPELINE_INITIALISATION { .collect() .subscribe { log.info "The following contigs will be processed: ${it}" } - // Remove other contigs from panel and posfile files - ch_panel = ch_panel - .combine(ch_regions.collect{ it[0]["chr"]}.toList()) - .filter { meta, _vcf, _index, chrs -> - meta.chr in chrs - } - .map {meta, vcf, index, _chrs -> - [meta, vcf, index] - } - - ch_posfile = ch_posfile - .combine(ch_regions.collect{ it[0]["chr"]}.toList()) - .filter { meta, _vcf, _index, _hap, _legend, chrs -> - meta.chr in chrs - } - .map {meta, vcf, index, hap, legend, _chrs -> - [meta, vcf, index, hap, legend] - } - // Check that all input files have the correct index checkFileIndex(ch_input.mix(ch_input_truth, ch_ref_gen, ch_panel))