From 81a47ec0cc6e91e717f544ab5bdc466fbc6fe31c Mon Sep 17 00:00:00 2001 From: Kai Waldrant Date: Wed, 13 Nov 2024 11:12:22 +0100 Subject: [PATCH] Add metric info --- results/_include/_method_descriptions.qmd | 1 - results/_include/_metric_descriptions.qmd | 17 ++++++++++++++++- .../data/metric_info.json | 10 +++++----- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/results/_include/_method_descriptions.qmd b/results/_include/_method_descriptions.qmd index b489b60c..83125f88 100644 --- a/results/_include/_method_descriptions.qmd +++ b/results/_include/_method_descriptions.qmd @@ -31,7 +31,6 @@ lines <- pmap_chr(method_info %>% filter(!is_baseline), function(method_name, me "bi bi-tag", paste0(code_version), ) - meta_list <- paste( paste0(" ", method_meta$value), collapse = " · " diff --git a/results/_include/_metric_descriptions.qmd b/results/_include/_metric_descriptions.qmd index 9b9ac9d3..fb799a8b 100644 --- a/results/_include/_metric_descriptions.qmd +++ b/results/_include/_metric_descriptions.qmd @@ -1,12 +1,27 @@ ```{r} #| echo: false -lines <- pmap_chr(metric_info, function(metric_name, metric_summary, metric_description, paper_reference, ...) { +lines <- pmap_chr(metric_info, function(metric_name, metric_summary, metric_description, paper_reference, implementation_url, code_version, image, ...) { ref <- split_cite_fun(paper_reference) if (ref != "") ref <- paste0(" ", ref) summ <- (metric_summary %|% "Missing 'metric_summary'") %>% str_replace_all("\\n", " ") %>% str_replace_all("\\. *$", "") + + metric_meta <- tribble( + ~icon, ~value, + "bi bi-file-earmark-code", paste0("[implementation](", implementation_url, ")"), + "bi bi-box-seam", paste0("[container](", image, ")"), + "bi bi-tag", paste0(code_version), + ) + + meta_list <- paste( + paste0(" ", metric_meta$value), + collapse = " · " + ) + strip_margin(glue::glue(" |### {metric_name} | + |{meta_list} + | |{summ}{ref}. | |{metric_description %|% ''} diff --git a/results/perturbation_prediction/data/metric_info.json b/results/perturbation_prediction/data/metric_info.json index 5e02b470..784b2146 100644 --- a/results/perturbation_prediction/data/metric_info.json +++ b/results/perturbation_prediction/data/metric_info.json @@ -10,7 +10,7 @@ }, "implementation_url": "https://github.com/openproblems-bio/task_perturbation_prediction/blob/2fa44462b1e7d530bad703c4a20ed22b49d3705e/src/metrics/mean_rowwise_error", "image": "ghcr.io/openproblems-bio/task_perturbation_prediction/metrics/mean_rowwise_error:build_main", - "code_version": null, + "code_version": "build_main", "commit_sha": "2fa44462b1e7d530bad703c4a20ed22b49d3705e", "maximize": false }, @@ -25,7 +25,7 @@ }, "implementation_url": "https://github.com/openproblems-bio/task_perturbation_prediction/blob/2fa44462b1e7d530bad703c4a20ed22b49d3705e/src/metrics/mean_rowwise_error", "image": "ghcr.io/openproblems-bio/task_perturbation_prediction/metrics/mean_rowwise_error:build_main", - "code_version": null, + "code_version": "build_main", "commit_sha": "2fa44462b1e7d530bad703c4a20ed22b49d3705e", "maximize": false }, @@ -40,7 +40,7 @@ }, "implementation_url": "https://github.com/openproblems-bio/task_perturbation_prediction/blob/2fa44462b1e7d530bad703c4a20ed22b49d3705e/src/metrics/mean_rowwise_correlation", "image": "ghcr.io/openproblems-bio/task_perturbation_prediction/metrics/mean_rowwise_correlation:build_main", - "code_version": null, + "code_version": "build_main", "commit_sha": "2fa44462b1e7d530bad703c4a20ed22b49d3705e", "maximize": true }, @@ -55,7 +55,7 @@ }, "implementation_url": "https://github.com/openproblems-bio/task_perturbation_prediction/blob/2fa44462b1e7d530bad703c4a20ed22b49d3705e/src/metrics/mean_rowwise_correlation", "image": "ghcr.io/openproblems-bio/task_perturbation_prediction/metrics/mean_rowwise_correlation:build_main", - "code_version": null, + "code_version": "build_main", "commit_sha": "2fa44462b1e7d530bad703c4a20ed22b49d3705e", "maximize": true }, @@ -70,7 +70,7 @@ }, "implementation_url": "https://github.com/openproblems-bio/task_perturbation_prediction/blob/2fa44462b1e7d530bad703c4a20ed22b49d3705e/src/metrics/mean_rowwise_correlation", "image": "ghcr.io/openproblems-bio/task_perturbation_prediction/metrics/mean_rowwise_correlation:build_main", - "code_version": null, + "code_version": "build_main", "commit_sha": "2fa44462b1e7d530bad703c4a20ed22b49d3705e", "maximize": true }