Skip to content

Commit

Permalink
add soft filter argument
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasbio committed Jan 27, 2025
1 parent 0f04812 commit 5f10606
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions cg/meta/workflow/balsamic.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,18 @@ def get_swegen_verified_path(self, variants: Variants) -> str | None:
)
return swegen_file

def should_soft_filter_normal(
self, config_case: dict, verified_panel_bed: bool
) -> dict[str, bool]:
"""Sets soft_filter_normal to True for all TGA tumor normal paired analyses."""
return {
"soft_filter_normal": bool(
config_case["tumor_sample_name"]
and config_case["normal_sample_name"]
and verified_panel_bed
)
}

def get_verified_config_case_arguments(
self,
case_id: str,
Expand Down Expand Up @@ -463,6 +475,13 @@ def get_verified_config_case_arguments(
}

config_case.update(self.get_verified_samples(case_id=case_id))

config_case.update(
self.should_soft_filter_normal(
config_case=config_case, verified_panel_bed=verified_panel_bed
)
)

config_case.update(self.get_parsed_observation_file_paths(observations))
if genome_version == GenomeVersion.HG19:
config_case.update(
Expand Down Expand Up @@ -573,6 +592,7 @@ def config_case(
"--exome": arguments.get("exome"),
"--sentieon-install-dir": self.sentieon_licence_path,
"--sentieon-license": self.sentieon_licence_server,
"--soft-filter-normal": arguments.get("soft_filter_normal"),
"--swegen-snv": arguments.get("swegen_snv"),
"--swegen-sv": arguments.get("swegen_sv"),
"--tumor-sample-name": arguments.get("tumor_sample_name"),
Expand Down

0 comments on commit 5f10606

Please sign in to comment.