Skip to content

Commit

Permalink
Add GENS upload for TGA (#3361)
Browse files Browse the repository at this point in the history
GENS has previously only been activated for WGS in Balsamic, however with the inclusion of this PR into production Clinical-Genomics/BALSAMIC#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
  • Loading branch information
mathiasbio authored Sep 30, 2024
1 parent 6ca040c commit 4aa89ad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
6 changes: 2 additions & 4 deletions cg/meta/upload/balsamic/balsamic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
15 changes: 9 additions & 6 deletions cg/meta/workflow/balsamic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 4aa89ad

Please sign in to comment.