Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GENS upload for TGA #3361

Merged
merged 9 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
12 changes: 9 additions & 3 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 @@ -461,8 +465,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
config_case.update(
self.get_verified_gens_file_paths(sex=verified_sex, panel_bed=verified_panel_bed)
)
if genome_version == GenomeVersion.HG19
else None
mathiasbio marked this conversation as resolved.
Show resolved Hide resolved
)

Expand Down
Loading