Skip to content

Commit

Permalink
Merge branch 'master' into parse-concentration
Browse files Browse the repository at this point in the history
  • Loading branch information
islean authored Dec 14, 2023
2 parents 1166284 + 562eeeb commit 7bae2a9
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 54.4.0
current_version = 54.4.1
commit = True
tag = True
tag_name = v{new_version}
Expand Down
2 changes: 1 addition & 1 deletion cg/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__title__ = "cg"
__version__ = "54.4.0"
__version__ = "54.4.1"
2 changes: 1 addition & 1 deletion cg/cli/workflow/rnafusion/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def run(
case_id=case_id, params_file=params_file
),
"name": case_id,
"compute_env": compute_env or analysis_api.compute_env,
"compute_env": compute_env or analysis_api.get_compute_env(case_id=case_id),
"revision": revision or analysis_api.revision,
"wait": "SUBMITTED",
"id": nf_tower_id,
Expand Down
2 changes: 1 addition & 1 deletion cg/cli/workflow/taxprofiler/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def run(
case_id=case_id, params_file=params_file
),
"name": case_id,
"compute_env": compute_env or analysis_api.compute_env,
"compute_env": compute_env or analysis_api.get_compute_env(case_id=case_id),
"revision": revision or analysis_api.revision,
"wait": NfTowerStatus.SUBMITTED,
"id": nf_tower_id,
Expand Down
9 changes: 6 additions & 3 deletions cg/meta/workflow/nf_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
from pathlib import Path
from typing import Any

from cg.store.models import Sample

from cg.constants import Pipeline
from cg.constants.constants import FileExtensions, FileFormat, WorkflowManager
from cg.constants.nextflow import NFX_WORK_DIR
Expand All @@ -17,6 +15,7 @@
from cg.models.cg_config import CGConfig
from cg.models.nf_analysis import FileDeliverable, PipelineDeliverables
from cg.models.rnafusion.rnafusion import CommandArgs
from cg.store.models import Sample
from cg.utils import Process

LOG = logging.getLogger(__name__)
Expand All @@ -38,7 +37,7 @@ def __init__(self, config: CGConfig, pipeline: Pipeline):
self.tower_pipeline: str | None = None
self.account: str | None = None
self.email: str | None = None
self.compute_env: str | None = None
self.compute_env_base: str | None = None
self.revision: str | None = None
self.nextflow_binary_path: str | None = None

Expand Down Expand Up @@ -80,6 +79,10 @@ def get_sample_sheet_path(self, case_id: str) -> Path:
FileExtensions.CSV
)

def get_compute_env(self, case_id: str) -> str:
"""Get the compute environment for the head job based on the case priority."""
return f"{self.compute_env_base}-{self.get_slurm_qos_for_case(case_id=case_id)}"

@staticmethod
def get_nextflow_config_path(nextflow_config: str | None = None) -> Path | None:
"""Path to Nextflow config file."""
Expand Down
2 changes: 1 addition & 1 deletion cg/meta/workflow/rnafusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __init__(
self.tower_pipeline: str = config.rnafusion.tower_pipeline
self.account: str = config.rnafusion.slurm.account
self.email: str = config.rnafusion.slurm.mail_user
self.compute_env: str = config.rnafusion.compute_env
self.compute_env_base: str = config.rnafusion.compute_env
self.revision: str = config.rnafusion.revision
self.nextflow_binary_path: str = config.rnafusion.binary_path

Expand Down
1 change: 1 addition & 0 deletions cg/meta/workflow/taxprofiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def __init__(
self.account: str = config.taxprofiler.slurm.account
self.email: str = config.taxprofiler.slurm.mail_user
self.nextflow_binary_path: str = config.taxprofiler.binary_path
self.compute_env_base: str = config.taxprofiler.compute_env

def get_sample_sheet_content_per_sample(
self, sample: Sample, instrument_platform: SequencingPlatform.ILLUMINA, fasta: str = ""
Expand Down
11 changes: 6 additions & 5 deletions cg/models/cg_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,16 @@ class RnafusionConfig(CommonAppConfig):


class TaxprofilerConfig(CommonAppConfig):
root: str
binary_path: str
conda_binary: str | None = None
conda_env: str
profile: str
compute_env: str
databases: str
hostremoval_reference: str
pipeline_path: str
profile: str
revision: str
conda_binary: str | None = None
hostremoval_reference: str
databases: str
root: str
slurm: SlurmConfig
tower_binary_path: str
tower_pipeline: str
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "cg"
version = "54.4.0"
version = "54.4.1"
description = "Clinical Genomics command center"
authors = ["Clinical Genomics <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 7bae2a9

Please sign in to comment.