Skip to content

Commit

Permalink
fix: general genome build
Browse files Browse the repository at this point in the history
  • Loading branch information
famosab committed Jan 24, 2025
1 parent 77f354f commit 2a31ecb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions workflow/rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def get_plot_cov_labels(): # TODO check if ever used anywhere

def get_truth_url(wildcards, input):
genome = genomes[wildcards.genome]
truth = genome["truth"][get_genome_build(wildcards)]
truth = genome["truth"][get_genome_build()]
if isinstance(truth, dict):
truth = truth[wildcards.truthset]
if input.archive:
Expand All @@ -116,7 +116,7 @@ def get_truth_url(wildcards, input):
def get_truthsets(csi=False):
def inner(wildcards):
genome = genomes[wildcards.genome]
truthsets = genome["truth"][get_genome_build(wildcards)]
truthsets = genome["truth"][get_genome_build()]
if csi:
return expand(
"resources/variants/{genome}/{truthset}.truth.bcf.csi",
Expand Down Expand Up @@ -147,8 +147,11 @@ def get_confidence_bed_cmd(wildcards, input):
return f"curl --insecure -L {bed} {unpack_cmd}"


def get_genome_build(wildcards):
return config["variant-calls"][wildcards.callset]["genome-build"]
def get_genome_build():
if config.get("grch37"):
return "grch37"
else:
return "grch38"


def get_io_prefix(getter):
Expand Down

0 comments on commit 2a31ecb

Please # to comment.