Skip to content

Commit

Permalink
fix: snakefmt
Browse files Browse the repository at this point in the history
  • Loading branch information
famosab committed Nov 29, 2024
1 parent e4c2eaa commit f6bd3ca
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 28 deletions.
49 changes: 25 additions & 24 deletions workflow/resources/datavzrd/fp-fn-per-benchmark-config.yte.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,29 @@ datasets:
table-row: results-table/callset

views:
results-table:
dataset: results
# desc: |
# ?f"""
# Benchmark version: {params.genome} {params.version}
# """
page-size: 12
render-table:
columns:
coverage:
plot:
heatmap:
scale: ordinal
sort_index:
display-mode: hidden
true_genotype:
?if params.somatic:
?for view in ["main", "coverage"]:
results-table:
dataset: results
# desc: |
# ?f"""
# Benchmark version: {params.genome} {params.version}
# """
page-size: 12
render-table:
columns:
coverage:
plot:
heatmap:
scale: ordinal
sort_index:
display-mode: hidden
?else:
display-mode: normal
predicted_genotype:
?if params.somatic:
display-mode: hidden
?else:
display-mode: normal
true_genotype:
?if params.somatic:
display-mode: hidden
?else:
display-mode: normal
predicted_genotype:
?if params.somatic:
display-mode: hidden
?else:
display-mode: normal
2 changes: 1 addition & 1 deletion workflow/rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def get_plot_cov_labels(): # TODO check if ever used anywhere
def label(name):
lower, upper = get_cov_interval(name)
if upper:
return f"{lower}-{upper-1}"
return f"{lower}-{upper - 1}"
return f"≥{lower}"

return {name: label(name) for name in low_coverages}
Expand Down
9 changes: 6 additions & 3 deletions workflow/rules/eval.smk
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,11 @@ rule report_fp_fn:
directory("results/report/fp-fn/genomes/{genome}/{cov}/{classification}"),
htmlindex="index.html",
category="{classification} variants",
subcategory=lambda w: w.genome,
labels=lambda w: {"coverage": w.cov},
subcategory="per genome",
labels=lambda w: {
"coverage": w.cov,
"genome": w.genome,
},
),
log:
"logs/datavzrd/fp-fn/{genome}/{cov}/{classification}.log",
Expand All @@ -441,7 +444,7 @@ rule report_fp_fn_benchmark:
directory("results/report/fp-fn/benchmarks/{benchmark}/{classification}"),
htmlindex="index.html",
category="{classification} variants",
# subcategory=lambda w: w.benchmark,
subcategory="per benchmark",
labels={
"benchmark": "{benchmark}",
"classification": "{classification}",
Expand Down

0 comments on commit f6bd3ca

Please sign in to comment.