From 2ab32c3560bbce27bdcd7a281f68ff1bfecc9fba Mon Sep 17 00:00:00 2001 From: Sebastian Diaz Date: Wed, 4 Feb 2026 10:06:09 +0100 Subject: [PATCH 1/4] Initial commit dev branch --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 1ce3003cb2..a60c4aceb8 100644 --- a/README.md +++ b/README.md @@ -64,3 +64,5 @@ For development, use `poetry install --all-extras` to install development depend [codefactor-url]: https://www.codefactor.io/repository/github/clinical-genomics/cg [black-image]: https://img.shields.io/badge/code%20style-black-000000.svg [black-url]: https://github.com/psf/black + +Old codes find the light, Newer maps trace hidden flaws, Healing starts with data. \ No newline at end of file From ab67516257a6ee7c6ea0c4182ad1cd8930b8b0ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isak=20Ohlsson=20=C3=85ngnell?= <40887124+islean@users.noreply.github.com> Date: Wed, 4 Feb 2026 13:14:34 +0100 Subject: [PATCH 2/4] Update README.md Co-authored-by: Daniel Nilsson --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a60c4aceb8..0619e7ed6d 100644 --- a/README.md +++ b/README.md @@ -65,4 +65,4 @@ For development, use `poetry install --all-extras` to install development depend [black-image]: https://img.shields.io/badge/code%20style-black-000000.svg [black-url]: https://github.com/psf/black -Old codes find the light, Newer maps trace hidden flaws, Healing starts with data. \ No newline at end of file +Old codes find the light, Newer maps trace hidden flaws, Healing with data. \ No newline at end of file From 5f8a7bd4dc60826f986d3a903de252147d27881d Mon Sep 17 00:00:00 2001 From: Rasmus Burge <80392398+RasmusBurge-CG@users.noreply.github.com> Date: Tue, 10 Feb 2026 10:16:49 +0100 Subject: [PATCH 3/4] use-hg38-to-select-bed-version-for-rd (#4881) change raredisease genome version for bed version fetch to hg38 --------- Co-authored-by: kedhammar --- .../file_creators/nextflow/params_file/raredisease.py | 3 +-- .../file_creators/params_file/test_params_file_creator.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cg/services/analysis_starter/configurator/file_creators/nextflow/params_file/raredisease.py b/cg/services/analysis_starter/configurator/file_creators/nextflow/params_file/raredisease.py index f435346a82..2468352b76 100644 --- a/cg/services/analysis_starter/configurator/file_creators/nextflow/params_file/raredisease.py +++ b/cg/services/analysis_starter/configurator/file_creators/nextflow/params_file/raredisease.py @@ -24,7 +24,6 @@ class RarediseaseParamsFileCreator(ParamsFileCreator): - def __init__(self, store: Store, lims: LimsAPI, params: str): super().__init__(params) self.store = store @@ -91,7 +90,7 @@ def _get_target_bed_from_lims(self, case_id: str) -> str: if target_bed_shortname: bed_version: BedVersion = ( self.store.get_bed_version_by_short_name_and_genome_version_strict( - short_name=target_bed_shortname, genome_version=BedVersionGenomeVersion.HG19 + short_name=target_bed_shortname, genome_version=BedVersionGenomeVersion.HG38 ) ) return bed_version.filename diff --git a/tests/services/analysis_starter/file_creators/params_file/test_params_file_creator.py b/tests/services/analysis_starter/file_creators/params_file/test_params_file_creator.py index 237b1e72e8..40f1392513 100644 --- a/tests/services/analysis_starter/file_creators/params_file/test_params_file_creator.py +++ b/tests/services/analysis_starter/file_creators/params_file/test_params_file_creator.py @@ -51,7 +51,7 @@ def test_raredisease_params_file_creator( lambda short_name, genome_version: ( create_autospec(BedVersion, filename="bed_version.bed") if short_name == "target_bed_shortname_123" - and genome_version == BedVersionGenomeVersion.HG19 + and genome_version == BedVersionGenomeVersion.HG38 else create_autospec(BedVersion) ) ) From ae84464a7889459477b0d5ea38f3226910da8db0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linn=C3=A9a=20L=C3=B6fdahl?= Date: Tue, 10 Feb 2026 13:45:55 +0100 Subject: [PATCH 4/4] Switch scout37 -> scout38 for raredisease (#4882) Use Scout38 in the ConfiguratorFactory for the creation of managed_variants and gene_panel files for raredisease --------- Co-authored-by: Rasmus Burge <80392398+RasmusBurge-CG@users.noreply.github.com> Co-authored-by: Sebastian Diaz Co-authored-by: kedhammar --- .../file_creators/nextflow/utils.py | 2 +- .../factories/configurator_factory.py | 2 +- .../test_gene_panel_file_creator.py | 2 +- .../test_configurator_factory.py | 46 ++++++++++++++++++- 4 files changed, 47 insertions(+), 5 deletions(-) diff --git a/cg/services/analysis_starter/configurator/file_creators/nextflow/utils.py b/cg/services/analysis_starter/configurator/file_creators/nextflow/utils.py index 513bcaa640..23f1c32a10 100644 --- a/cg/services/analysis_starter/configurator/file_creators/nextflow/utils.py +++ b/cg/services/analysis_starter/configurator/file_creators/nextflow/utils.py @@ -7,7 +7,7 @@ def get_genome_build(workflow: Workflow) -> GenePanelGenomeBuild | None: workflow_to_genome_build: dict[Workflow, GenePanelGenomeBuild] = { Workflow.MIP_DNA: GenePanelGenomeBuild.hg19, Workflow.NALLO: GenePanelGenomeBuild.hg38, - Workflow.RAREDISEASE: GenePanelGenomeBuild.hg19, + Workflow.RAREDISEASE: GenePanelGenomeBuild.hg38, Workflow.TOMTE: GenePanelGenomeBuild.hg38, } return workflow_to_genome_build.get(workflow) diff --git a/cg/services/analysis_starter/factories/configurator_factory.py b/cg/services/analysis_starter/factories/configurator_factory.py index 5e92a7a34b..8df1f3a982 100644 --- a/cg/services/analysis_starter/factories/configurator_factory.py +++ b/cg/services/analysis_starter/factories/configurator_factory.py @@ -211,7 +211,7 @@ def _get_managed_variants_file_creator(self, workflow: Workflow) -> ManagedVaria def _get_scout_api(self, workflow: Workflow) -> ScoutAPI: return ( self.cg_config.scout_api_38 - if workflow == Workflow.NALLO + if workflow in [Workflow.NALLO, Workflow.RAREDISEASE] else self.cg_config.scout_api_37 ) diff --git a/tests/services/analysis_starter/file_creators/test_gene_panel_file_creator.py b/tests/services/analysis_starter/file_creators/test_gene_panel_file_creator.py index 7733a85f9c..968613c3e2 100644 --- a/tests/services/analysis_starter/file_creators/test_gene_panel_file_creator.py +++ b/tests/services/analysis_starter/file_creators/test_gene_panel_file_creator.py @@ -223,7 +223,7 @@ def test_add_gene_panels_in_combo( "case_id, expected_genome_build", [ (MIP_DNA_CASE_ID, GenePanelGenomeBuild.hg19), - (RAREDISEASE_CASE_ID, GenePanelGenomeBuild.hg19), + (RAREDISEASE_CASE_ID, GenePanelGenomeBuild.hg38), (NALLO_CASE_ID, GenePanelGenomeBuild.hg38), (TOMTE_CASE_ID, GenePanelGenomeBuild.hg38), ], diff --git a/tests/services/analysis_starter/test_configurator_factory.py b/tests/services/analysis_starter/test_configurator_factory.py index 0d6767494c..ab795d6e01 100644 --- a/tests/services/analysis_starter/test_configurator_factory.py +++ b/tests/services/analysis_starter/test_configurator_factory.py @@ -82,8 +82,6 @@ def test_get_microsalt_configurator(cg_context: CGConfig): @pytest.mark.parametrize( "workflow, pipeline_extension_class", [ - (Workflow.NALLO, NalloExtension), - (Workflow.RAREDISEASE, RarediseaseExtension), (Workflow.RNAFUSION, PipelineExtension), (Workflow.TAXPROFILER, PipelineExtension), (Workflow.TOMTE, TomteExtension), @@ -109,6 +107,50 @@ def test_nextflow_configurator_factory_success( assert isinstance(configurator.pipeline_extension, pipeline_extension_class) +def test_nextflow_configurator_factory_raredisease_success( + cg_context: CGConfig, +): + # GIVEN a configurator factory + configurator_factory = ConfiguratorFactory(cg_config=cg_context) + + # WHEN getting the configurator for the workflow + configurator = cast( + NextflowConfigurator, configurator_factory.get_configurator(Workflow.RAREDISEASE) + ) + + # THEN the configurator is of the expected type + assert isinstance(configurator, NextflowConfigurator) + assert isinstance(configurator.params_file_creator, ParamsFileCreator) + assert isinstance(configurator.sample_sheet_creator, SampleSheetCreator) + assert isinstance(configurator.pipeline_extension, RarediseaseExtension) + assert ( + configurator.pipeline_extension.gene_panel_file_creator.scout_api == cg_context.scout_api_38 + ) + assert ( + configurator.pipeline_extension.managed_variants_file_creator.scout_api + == cg_context.scout_api_38 + ) + + +def test_nextflow_configurator_factory_nallo_success( + cg_context: CGConfig, +): + # GIVEN a configurator factory + configurator_factory = ConfiguratorFactory(cg_config=cg_context) + + # WHEN getting the configurator for the workflow + configurator = cast(NextflowConfigurator, configurator_factory.get_configurator(Workflow.NALLO)) + + # THEN the configurator is of the expected type + assert isinstance(configurator, NextflowConfigurator) + assert isinstance(configurator.params_file_creator, ParamsFileCreator) + assert isinstance(configurator.sample_sheet_creator, SampleSheetCreator) + assert isinstance(configurator.pipeline_extension, NalloExtension) + assert ( + configurator.pipeline_extension.gene_panel_file_creator.scout_api == cg_context.scout_api_38 + ) + + def test_get_mip_dna_configurator(): # GIVEN a MIP-DNA config mip_config: MipConfig = create_autospec(