diff --git a/cg/meta/workflow/rnafusion.py b/cg/meta/workflow/rnafusion.py index b40d1c3218..292b4f40bc 100644 --- a/cg/meta/workflow/rnafusion.py +++ b/cg/meta/workflow/rnafusion.py @@ -5,7 +5,7 @@ from cg.constants import Workflow from cg.constants.constants import GenomeVersion, Strandedness -from cg.constants.nf_analysis import MULTIQC_NEXFLOW_CONFIG, RNAFUSION_METRIC_CONDITIONS +from cg.constants.nf_analysis import RNAFUSION_METRIC_CONDITIONS from cg.constants.scout import RNAFUSION_CASE_TAGS from cg.exc import MissingMetrics from cg.meta.workflow.nf_analysis import NfAnalysisAPI @@ -34,6 +34,9 @@ def __init__( self.profile: str = config.rnafusion.profile self.conda_env: str = config.rnafusion.conda_env self.conda_binary: str = config.rnafusion.conda_binary + self.config_platform: str = config.rnafusion.config_platform + self.config_params: str = config.rnafusion.config_params + self.config_resources: str = config.rnafusion.config_resources self.tower_binary_path: str = config.tower_binary_path self.tower_workflow: str = config.rnafusion.tower_workflow self.account: str = config.rnafusion.slurm.account @@ -61,10 +64,6 @@ def get_genome_build(self, case_id: str) -> GenomeVersion: """Return reference genome for a case. Currently fixed for hg38.""" return GenomeVersion.HG38 - def get_nextflow_config_content(self, case_id: str) -> str: - """Return nextflow config content.""" - return MULTIQC_NEXFLOW_CONFIG - @staticmethod def get_bundle_filenames_path() -> Path: """Return Rnafusion bundle filenames path.""" @@ -88,11 +87,9 @@ def get_workflow_parameters( ) -> RnafusionParameters: """Get Rnafusion parameters.""" return RnafusionParameters( - cluster_options=f"--qos={self.get_slurm_qos_for_case(case_id=case_id)}", genomes_base=genomes_base or self.get_references_path(), input=self.get_sample_sheet_path(case_id=case_id), outdir=self.get_case_path(case_id=case_id), - priority=self.account, ) def get_references_path(self, genomes_base: Path | None = None) -> Path: diff --git a/cg/models/cg_config.py b/cg/models/cg_config.py index 10796ef8e7..3fab14bd92 100644 --- a/cg/models/cg_config.py +++ b/cg/models/cg_config.py @@ -258,6 +258,9 @@ class RnafusionConfig(CommonAppConfig): compute_env: str conda_binary: str | None = None conda_env: str + config_platform: str + config_params: str + config_resources: str launch_directory: str profile: str references: str diff --git a/cg/models/rnafusion/rnafusion.py b/cg/models/rnafusion/rnafusion.py index b481cc3798..6c4b1dcd1c 100644 --- a/cg/models/rnafusion/rnafusion.py +++ b/cg/models/rnafusion/rnafusion.py @@ -1,7 +1,5 @@ from pathlib import Path -from pydantic import Field - from cg.constants.constants import Strandedness from cg.models.nf_analysis import NextflowSampleSheetEntry, WorkflowParameters from cg.models.qc_metrics import QCMetrics @@ -29,15 +27,6 @@ class RnafusionParameters(WorkflowParameters): """Rnafusion parameters.""" genomes_base: Path - all: bool = False - arriba: bool = True - cram: str = "arriba,starfusion" - fastp_trim: bool = True - fusioncatcher: bool = True - starfusion: bool = True - trim_tail: int = 50 - clusterOptions: str = Field(str, alias="cluster_options") - priority: str class RnafusionSampleSheetEntry(NextflowSampleSheetEntry): diff --git a/tests/conftest.py b/tests/conftest.py index 238ed66908..3497af1605 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -12,8 +12,8 @@ from typing import Any, Generator import pytest -from pytest_mock import MockFixture from housekeeper.store.models import File, Version +from pytest_mock import MockFixture from requests import Response from cg.apps.crunchy import CrunchyAPI @@ -68,9 +68,7 @@ TaxprofilerSampleSheetEntry, ) from cg.models.tomte.tomte import TomteParameters, TomteSampleSheetHeaders -from cg.services.deliver_files.rsync.service import ( - DeliveryRsyncService, -) +from cg.services.deliver_files.rsync.service import DeliveryRsyncService from cg.services.illumina.backup.encrypt_service import IlluminaRunEncryptionService from cg.services.illumina.data_transfer.data_transfer_service import ( IlluminaDataTransferService, @@ -2139,6 +2137,9 @@ def context_config( "compute_env": "nf_tower_compute_env", "conda_binary": conda_binary.as_posix(), "conda_env": "S_RNAFUSION", + "config_platform": str(nf_analysis_platform_config_path), + "config_params": str(nf_analysis_pipeline_params_path), + "config_resources": str(nf_analysis_pipeline_resource_optimisation_path), "launch_directory": Path("path", "to", "launchdir").as_posix(), "workflow_path": Path("workflow", "path").as_posix(), "profile": "myprofile", @@ -2696,7 +2697,6 @@ def raredisease_context( mocker.patch.object(RarediseaseAnalysisAPI, "get_target_bed_from_lims") RarediseaseAnalysisAPI.get_target_bed_from_lims.return_value = "some_target_bed_file" - samples = [sample_enough_reads, another_sample_enough_reads] return cg_context