diff --git a/cg/meta/workflow/taxprofiler.py b/cg/meta/workflow/taxprofiler.py index 8bcca36c50..bc7ea55b2a 100644 --- a/cg/meta/workflow/taxprofiler.py +++ b/cg/meta/workflow/taxprofiler.py @@ -5,7 +5,6 @@ from cg.constants import Workflow from cg.constants.constants import GenomeVersion -from cg.constants.nf_analysis import MULTIQC_NEXFLOW_CONFIG from cg.constants.sequencing import SequencingPlatform from cg.constants.symbols import EMPTY_STRING from cg.meta.workflow.nf_analysis import NfAnalysisAPI @@ -29,12 +28,14 @@ def __init__( super().__init__(config=config, workflow=workflow) self.root_dir: str = config.taxprofiler.root self.workflow_bin_path: str = config.taxprofiler.workflow_bin_path + self.profile: str = config.taxprofiler.profile self.conda_env: str = config.taxprofiler.conda_env self.conda_binary: str = config.taxprofiler.conda_binary - self.profile: str = config.taxprofiler.profile + self.platform: str = config.taxprofiler.platform + self.params: str = config.taxprofiler.params + self.workflow_config_path: str = config.taxprofiler.config + self.resources: str = config.taxprofiler.resources self.revision: str = config.taxprofiler.revision - self.hostremoval_reference: Path = Path(config.taxprofiler.hostremoval_reference) - self.databases: Path = Path(config.taxprofiler.databases) self.tower_binary_path: str = config.tower_binary_path self.tower_workflow: str = config.taxprofiler.tower_workflow self.account: str = config.taxprofiler.slurm.account @@ -52,10 +53,6 @@ def is_multiqc_pattern_search_exact(self) -> bool: """Only exact pattern search is allowed to collect metrics information from multiqc file.""" return True - 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 Taxprofiler bundle filenames path.""" @@ -80,12 +77,8 @@ def get_sample_sheet_content_per_sample(self, case_sample: CaseSample) -> list[l def get_built_workflow_parameters(self, case_id: str) -> TaxprofilerParameters: """Return Taxprofiler parameters.""" return TaxprofilerParameters( - cluster_options=f"--qos={self.get_slurm_qos_for_case(case_id=case_id)}", input=self.get_sample_sheet_path(case_id=case_id), outdir=self.get_case_path(case_id=case_id), - databases=self.databases, - hostremoval_reference=self.hostremoval_reference, - priority=self.account, ) def get_multiqc_search_patterns(self, case_id: str) -> dict: diff --git a/cg/models/cg_config.py b/cg/models/cg_config.py index bab7e52a26..0c905dfcfc 100644 --- a/cg/models/cg_config.py +++ b/cg/models/cg_config.py @@ -269,8 +269,10 @@ class TaxprofilerConfig(CommonAppConfig): conda_binary: str | None = None conda_env: str compute_env: str - databases: str - hostremoval_reference: str + platform: str + params: str + config: str + resources: str workflow_bin_path: str profile: str revision: str diff --git a/cg/models/taxprofiler/taxprofiler.py b/cg/models/taxprofiler/taxprofiler.py index fbf585a27a..e4b61706eb 100644 --- a/cg/models/taxprofiler/taxprofiler.py +++ b/cg/models/taxprofiler/taxprofiler.py @@ -20,29 +20,7 @@ class TaxprofilerQCMetrics(BaseModel): class TaxprofilerParameters(WorkflowParameters): - """Model for Taxprofiler parameters.""" - - databases: Path - save_preprocessed_reads: bool = True - perform_shortread_qc: bool = True - perform_shortread_complexityfilter: bool = True - save_complexityfiltered_reads: bool = True - perform_shortread_hostremoval: bool = True - hostremoval_reference: Path - save_hostremoval_index: bool = True - save_hostremoval_mapped: bool = True - save_hostremoval_unmapped: bool = True - perform_runmerging: bool = True - run_kraken2: bool = True - kraken2_save_reads: bool = True - kraken2_save_readclassifications: bool = True - run_bracken: bool = True - run_centrifuge: bool = True - centrifuge_save_reads: bool = True - run_krona: bool = True - run_profile_standardisation: bool = True - clusterOptions: str = Field(alias="cluster_options") - priority: str + """Taxprofiler parameters.""" class TaxprofilerSampleSheetEntry(NextflowSampleSheetEntry): diff --git a/tests/conftest.py b/tests/conftest.py index 8d2b9210fe..8242beb922 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2161,11 +2161,13 @@ def context_config( "root": str(taxprofiler_dir), "conda_binary": conda_binary.as_posix(), "conda_env": "S_taxprofiler", + "platform": str(nf_analysis_platform_config_path), + "params": str(nf_analysis_pipeline_params_path), + "config": str(nf_analysis_pipeline_config_path), + "resources": str(nf_analysis_pipeline_resource_optimisation_path), "launch_directory": Path("path", "to", "launchdir").as_posix(), "workflow_bin_path": Path("workflow", "path").as_posix(), - "databases": Path("path", "to", "databases").as_posix(), "profile": "myprofile", - "hostremoval_reference": Path("path", "to", "hostremoval_reference").as_posix(), "revision": "2.2.0", "slurm": { "account": "development",