4
4
from pathlib import Path
5
5
from typing import Any
6
6
7
- from cg .store .models import Sample
8
-
9
7
from cg .constants import Pipeline
10
8
from cg .constants .constants import FileExtensions , FileFormat , WorkflowManager
11
9
from cg .constants .nextflow import NFX_WORK_DIR
17
15
from cg .models .cg_config import CGConfig
18
16
from cg .models .nf_analysis import FileDeliverable , PipelineDeliverables
19
17
from cg .models .rnafusion .rnafusion import CommandArgs
18
+ from cg .store .models import Sample
20
19
from cg .utils import Process
21
20
22
21
LOG = logging .getLogger (__name__ )
@@ -38,7 +37,7 @@ def __init__(self, config: CGConfig, pipeline: Pipeline):
38
37
self .tower_pipeline : str | None = None
39
38
self .account : str | None = None
40
39
self .email : str | None = None
41
- self .compute_env : str | None = None
40
+ self .compute_env_base : str | None = None
42
41
self .revision : str | None = None
43
42
self .nextflow_binary_path : str | None = None
44
43
@@ -80,6 +79,10 @@ def get_sample_sheet_path(self, case_id: str) -> Path:
80
79
FileExtensions .CSV
81
80
)
82
81
82
+ def get_compute_env (self , case_id : str ) -> str :
83
+ """Get the compute environment for the head job based on the case priority."""
84
+ return f"{ self .compute_env_base } -{ self .get_slurm_qos_for_case (case_id = case_id )} "
85
+
83
86
@staticmethod
84
87
def get_nextflow_config_path (nextflow_config : str | None = None ) -> Path | None :
85
88
"""Path to Nextflow config file."""
0 commit comments