From 24156659d894a6ce4c8f4383f48560f45e5f62d7 Mon Sep 17 00:00:00 2001 From: nschcolnicov Date: Wed, 16 Oct 2024 19:43:57 +0000 Subject: [PATCH] Installed samshee from nf-core --- modules.json | 5 +++++ modules/nf-core/samshee/environment.yml | 6 ++--- modules/nf-core/samshee/main.nf | 1 + modules/nf-core/samshee/tests/main.nf.test | 22 ++++++++++++++++--- .../nf-core/samshee/tests/main.nf.test.snap | 6 ++--- modules/nf-core/samshee/tests/nextflow.config | 6 ++++- 6 files changed, 35 insertions(+), 11 deletions(-) diff --git a/modules.json b/modules.json index 91bf80bf..ae24885e 100644 --- a/modules.json +++ b/modules.json @@ -65,6 +65,11 @@ "git_sha": "b8d36829fa84b6e404364abff787e8b07f6d058c", "installed_by": ["modules"] }, + "samshee": { + "branch": "master", + "git_sha": "3c464e75051db485c1b37ab9f1ea2182fb3d3533", + "installed_by": ["modules"] + }, "seqtk/sample": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", diff --git a/modules/nf-core/samshee/environment.yml b/modules/nf-core/samshee/environment.yml index b46b46a6..35a8e2e7 100644 --- a/modules/nf-core/samshee/environment.yml +++ b/modules/nf-core/samshee/environment.yml @@ -2,7 +2,5 @@ channels: - conda-forge - bioconda dependencies: - - python>=3.9 - - pip - - pip: # FIXME https://github.com/nf-core/modules/issues/5814 - - samshee==0.2.1 + - bioconda::samshee=0.2.1 + - python=3.13.0 diff --git a/modules/nf-core/samshee/main.nf b/modules/nf-core/samshee/main.nf index 70bbd690..6d7ba2e6 100644 --- a/modules/nf-core/samshee/main.nf +++ b/modules/nf-core/samshee/main.nf @@ -25,6 +25,7 @@ process SAMSHEE { # Run validation command and capture output python -m samshee $samplesheet \ $args \ + $arg_file_schema_validator \ > ${samplesheet.baseName}_formatted.csv cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/samshee/tests/main.nf.test b/modules/nf-core/samshee/tests/main.nf.test index 62c8994e..5bec682f 100644 --- a/modules/nf-core/samshee/tests/main.nf.test +++ b/modules/nf-core/samshee/tests/main.nf.test @@ -12,12 +12,18 @@ nextflow_process { when { params { - v1_schema = true + v1_schema = true + json_schema_validator = '{"required": ["Data"]}' + name_schema_validator = null } process { """ input[0] = [ [ id: 'test', lane:1 ], file("https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/testdata/miseq_35147139/miseq_35147139_samplesheet.csv", checkIfExists: true) ] - input[1] = [] + input[1] = file("schema.json") + new File("schema.json").text = '''{ + "\$schema": "https://json-schema.org/draft/2020-12/schema", + "required": ["Settings"] + }''' """ } } @@ -31,6 +37,11 @@ nextflow_process { test("test samplesheet_v2") { when { + params { + v1_schema = null + json_schema_validator = null + name_schema_validator = '{"$ref": "urn:samshee:illuminav2/v1"}' + } process { """ input[0] = [ [ id: 'test', lane:1 ], file("https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/testdata/NextSeq2000/SampleSheet.csv", checkIfExists: true) ] @@ -51,9 +62,14 @@ nextflow_process { options "-stub" when { + params { + v1_schema = null + json_schema_validator = null + name_schema_validator = null + } process { """ - input[0] = [ [ id: 'test', lane:1 ], file("https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/testdata/NextSeq2000/SampleSheet.csv", checkIfExists: true), [] ] + input[0] = [ [ id: 'test', lane:1 ], file("https://raw.githubusercontent.com/nf-core/test-datasets/demultiplex/testdata/NextSeq2000/SampleSheet.csv", checkIfExists: true) ] input[1] = [] """ } diff --git a/modules/nf-core/samshee/tests/main.nf.test.snap b/modules/nf-core/samshee/tests/main.nf.test.snap index e00d8af0..b3729eba 100644 --- a/modules/nf-core/samshee/tests/main.nf.test.snap +++ b/modules/nf-core/samshee/tests/main.nf.test.snap @@ -32,7 +32,7 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-10-15T12:33:58.766224702" + "timestamp": "2024-10-16T15:25:40.722007136" }, "test samplesheet_v1": { "content": [ @@ -67,7 +67,7 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-10-15T12:30:57.470221349" + "timestamp": "2024-10-16T15:25:02.353128191" }, "test samplesheet_v2": { "content": [ @@ -102,6 +102,6 @@ "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-10-15T12:31:16.99133356" + "timestamp": "2024-10-16T15:25:24.540910786" } } \ No newline at end of file diff --git a/modules/nf-core/samshee/tests/nextflow.config b/modules/nf-core/samshee/tests/nextflow.config index aa0e36ad..ecf1ff66 100644 --- a/modules/nf-core/samshee/tests/nextflow.config +++ b/modules/nf-core/samshee/tests/nextflow.config @@ -1,5 +1,9 @@ process { withName: SAMSHEE { - ext.args = { params.v1_schema ? "--output-format sectioned" : "" } + ext.args = [ + params.json_schema_validator ? "--schema '${params.json_schema_validator}'" : "", + params.name_schema_validator ? "--schema '${params.name_schema_validator}'" : "", + params.v1_schema ? "--output-format sectioned" : "", + ].join(" ").trim() } }