From 4aa89ad0fc2b6565305f7a931d11ce2c48c97578 Mon Sep 17 00:00:00 2001 From: Mathias Johansson Date: Mon, 30 Sep 2024 10:57:04 +0200 Subject: [PATCH] Add GENS upload for TGA (#3361) GENS has previously only been activated for WGS in Balsamic, however with the inclusion of this PR into production https://github.com/Clinical-Genomics/BALSAMIC/pull/1448 CNV and BAF profiles from TGA samples can be uploaded as well. This feature is planned for release 16.0.0 of Balsamic (somewhere around **August maybe**) and requires a couple of small changes in CG. ### Added - gnomad-af argument to TGA samples ### Changed - gens upload no longer filters out TGA samples --- cg/meta/upload/balsamic/balsamic.py | 6 ++---- cg/meta/workflow/balsamic.py | 15 +++++++++------ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/cg/meta/upload/balsamic/balsamic.py b/cg/meta/upload/balsamic/balsamic.py index 649bfbae32..26168cb01e 100644 --- a/cg/meta/upload/balsamic/balsamic.py +++ b/cg/meta/upload/balsamic/balsamic.py @@ -40,10 +40,8 @@ def upload(self, ctx: click.Context, case: Case, restart: bool) -> None: self.upload_files_to_customer_inbox(case) - if GensAPI.is_suitable_for_upload(case): - ctx.invoke(upload_to_gens, case_id=case.internal_id) - else: - LOG.info(f"Balsamic case {case.internal_id} is not compatible for Gens upload") + # Upload CNV and BAF profile to GENS + ctx.invoke(upload_to_gens, case_id=case.internal_id) # Scout specific upload if DataDelivery.SCOUT in case.data_delivery: diff --git a/cg/meta/workflow/balsamic.py b/cg/meta/workflow/balsamic.py index 66e039011b..fc193c96e4 100644 --- a/cg/meta/workflow/balsamic.py +++ b/cg/meta/workflow/balsamic.py @@ -399,8 +399,12 @@ def get_parsed_observation_file_paths(self, observations: list[str]) -> dict: return verified_observations - def get_verified_gens_file_paths(self, sex: Sex) -> dict[str, str] | None: + def get_verified_gens_file_paths(self, sex: Sex, panel_bed: str) -> dict[str, str] | None: """Return a list of file path arguments for Gens.""" + if panel_bed: + return { + "gnomad_min_af5": self.gnomad_af5_path, + } return { "genome_interval": self.genome_interval_path, "gnomad_min_af5": self.gnomad_af5_path, @@ -460,11 +464,10 @@ def get_verified_config_case_arguments( config_case.update(self.get_verified_samples(case_id=case_id)) config_case.update(self.get_parsed_observation_file_paths(observations)) - ( - config_case.update(self.get_verified_gens_file_paths(sex=verified_sex)) - if not verified_panel_bed and genome_version == GenomeVersion.HG19 - else None - ) + if genome_version == GenomeVersion.HG19: + config_case.update( + self.get_verified_gens_file_paths(sex=verified_sex, panel_bed=verified_panel_bed) + ) return config_case