diff --git a/CHANGELOG.md b/CHANGELOG.md index 2273ca3c..7804ed21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,12 +12,18 @@ * Update base images documentation (PR #342). -* Add foundation models benchmark page (PR #354) +* Add foundation models benchmark page (PR #354). + +* Add url to benchmark datasets to dataset page (PR #362). + +* Change "n x m" to "n cells × m genes" on dataset info (PR #362). ## BUG FIXES * Fix error in summary figure when not all method info ids are present in the results (PR #330). +* Fix "used in" section in dataset pages (PR #362). + # openproblems.bio v2.3.6 ## NEW CONTENT diff --git a/datasets/_include/_index_template.qmd b/datasets/_include/_index_template.qmd index d0587a3d..79dfdd6e 100644 --- a/datasets/_include/_index_template.qmd +++ b/datasets/_include/_index_template.qmd @@ -122,7 +122,7 @@ metadata <- tribble( "Reference", "bi bi-file-earmark-text", paste0("@", uns$dataset_reference), "Size", "bi bi-cloud-download", file_size_str, "Created", "bi bi-calendar", uns$date_created, - "Dimensions", "bi bi-box", shape_str + "Dimensions", "bi bi-box", glue::glue("{shape[[1]]} cells × {shape[[2]]} genes") ) metadata_lines <- paste0( " ", substitute_underscores(metadata$value), " \n" @@ -169,7 +169,8 @@ cat("#### Used in\n\n") if (nrow(related_tasks) == 0) { cat("No related benchmarks found.\n") } else { - links <- paste0("* [", related_tasks$task_name, "](/results/", related_tasks$task_id, ") ") + task_id <- gsub("task_", "", related_tasks$task_id) + links <- paste0("* [", related_tasks$task_name, "](/results/", task_id, ") ") cat(paste(links, collapse = "\n")) } diff --git a/results/_include/_dataset_descriptions.qmd b/results/_include/_dataset_descriptions.qmd index 0e270e1b..6c7fe8fc 100644 --- a/results/_include/_dataset_descriptions.qmd +++ b/results/_include/_dataset_descriptions.qmd @@ -2,10 +2,22 @@ #| echo: false lines <- pmap_chr(dataset_info, function(dataset_name, dataset_summary, dataset_description, data_reference, ...) { ref <- split_cite_fun(data_reference) + rest <- list(...) + source_dataset_id <- if ("source_dataset_id" %in% names(rest)) rest$source_dataset_id else NULL + dataset_link <- if (!is.null(source_dataset_id) && dir.exists(paste0("../../datasets/", source_dataset_id))) { + glue::glue("[{dataset_name}](/datasets/{source_dataset_id})") + } else if ("scPerturb" %in% dataset_name) { + dataset_name + } else if (dir.exists(paste0("../../datasets/", rest$dataset_id))) { + glue::glue("[{dataset_name}](/datasets/{rest$dataset_id})") + } else { + dataset_name + } if (ref != "") ref <- paste0(" ", ref) summ <- (dataset_summary %|% "Missing 'dataset_summary'") %>% str_replace_all("\\n", " ") %>% str_replace_all("\\. *$", "") + strip_margin(glue::glue(" - |### {dataset_name} + |### {dataset_link} | |{summ}{ref}. |