From f6bd3cac4e9e1de8b0ce3e06d9def3ff4130dee1 Mon Sep 17 00:00:00 2001 From: famosab Date: Fri, 29 Nov 2024 12:19:32 +0100 Subject: [PATCH] fix: snakefmt --- .../fp-fn-per-benchmark-config.yte.yaml | 49 ++++++++++--------- workflow/rules/common.smk | 2 +- workflow/rules/eval.smk | 9 ++-- 3 files changed, 32 insertions(+), 28 deletions(-) diff --git a/workflow/resources/datavzrd/fp-fn-per-benchmark-config.yte.yaml b/workflow/resources/datavzrd/fp-fn-per-benchmark-config.yte.yaml index d7c258f..426536f 100644 --- a/workflow/resources/datavzrd/fp-fn-per-benchmark-config.yte.yaml +++ b/workflow/resources/datavzrd/fp-fn-per-benchmark-config.yte.yaml @@ -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 \ No newline at end of file + true_genotype: + ?if params.somatic: + display-mode: hidden + ?else: + display-mode: normal + predicted_genotype: + ?if params.somatic: + display-mode: hidden + ?else: + display-mode: normal \ No newline at end of file diff --git a/workflow/rules/common.smk b/workflow/rules/common.smk index ce00afe..02d747d 100644 --- a/workflow/rules/common.smk +++ b/workflow/rules/common.smk @@ -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} diff --git a/workflow/rules/eval.smk b/workflow/rules/eval.smk index e6cfdb1..7cc29cf 100644 --- a/workflow/rules/eval.smk +++ b/workflow/rules/eval.smk @@ -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", @@ -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}",