From ed33120ed075693b5bab1d68f7b70bfb7adc6618 Mon Sep 17 00:00:00 2001 From: "Brian M. Schilder" <34280215+bschilder@users.noreply.github.com> Date: Sat, 4 Nov 2023 14:50:30 +0000 Subject: [PATCH] allow caching in gen_results. speed up examples --- .github/workflows/rworkflows.yml | 1 - DESCRIPTION | 2 +- NAMESPACE | 1 + NEWS.md | 21 ++++++++++++++++ R/correlation_heatmap.R | 2 +- R/frequency_barplot.R | 3 ++- R/frequency_histogram.R | 5 ++-- R/gen_overlap.R | 22 +++++++++++++--- R/gen_results.R | 18 ++++++++++--- R/gen_results_save_path.R | 10 ++++++++ R/load_hpo_graph.R | 5 ++-- R/ontology_plot.R | 32 ++++++++++++++---------- R/prioritise_targets.R | 3 ++- R/save_results.R | 13 +++------- man/correlation_heatmap.Rd | 2 +- man/frequency_barplot.Rd | 3 ++- man/frequency_histogram.Rd | 3 ++- man/gen_overlap.Rd | 4 +++ man/gen_results.Rd | 10 ++++---- man/load_hpo_graph.Rd | 3 +-- man/ontology_plot.Rd | 6 ++++- man/prioritise_targets.Rd | 3 ++- tests/testthat/test-ewce_para.R | 10 ++++---- tests/testthat/test-gen_results.R | 4 +-- tests/testthat/test-load_hpo_graph.R | 5 ++++ tests/testthat/test-ontology_plot.R | 6 +++++ tests/testthat/test-prioritise_targets.R | 8 +++--- 27 files changed, 142 insertions(+), 63 deletions(-) create mode 100644 R/gen_results_save_path.R create mode 100644 tests/testthat/test-load_hpo_graph.R create mode 100644 tests/testthat/test-ontology_plot.R diff --git a/.github/workflows/rworkflows.yml b/.github/workflows/rworkflows.yml index 3c624b6..75a40a5 100644 --- a/.github/workflows/rworkflows.yml +++ b/.github/workflows/rworkflows.yml @@ -54,4 +54,3 @@ jobs: DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} runner_os: ${{ runner.os }} cache_version: cache-v1 - docker_registry: ghcr.io diff --git a/DESCRIPTION b/DESCRIPTION index 6cc019e..6938d4d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: MultiEWCE Title: EWCE for Multiple Gene Lists -Version: 0.1.7 +Version: 0.1.8 Authors@R: c(person(given = "Robert", family = "Gordon-Smith", diff --git a/NAMESPACE b/NAMESPACE index 003e607..f291377 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -14,6 +14,7 @@ export(get_unfinished_list_names) export(ggnetwork_plot_full) export(load_example_ctd) export(load_example_results) +export(load_hpo_graph) export(map_tissues) export(merge_results) export(ontology_plot) diff --git a/NEWS.md b/NEWS.md index 9c3a477..4bdf439 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,24 @@ +# MultiEWCE 0.1.8 + +## New features + +* `MultiEWCE` finally gets a hex sticker! +* `gen_results` / `gen_overlap` + - Check for existing results and import if already there. + - Name all results "gen_results.rds" or "gen_overlap.rds" to avoid + rerunning duplicate analyses on HPC. +* Update *rworkflows.yml* + +## Bug fixes + +* Fix unit tests and examples to use "hpo_id" instead of "hpo_name". +* `load_hpo_graph`: + - export + - Regenerate and update "hpo_graph.rds" file. +* Drastically reduce time to run examples. +* `ontology_plot` + - Fix function and add test. + # MultiEWCE 0.1.7 ## New features diff --git a/R/correlation_heatmap.R b/R/correlation_heatmap.R index a415430..e99acf8 100644 --- a/R/correlation_heatmap.R +++ b/R/correlation_heatmap.R @@ -24,7 +24,7 @@ #' @importFrom data.table := dcast.data.table setnafill #' @importFrom stats cor #' @examples -#' top_targets <- example_targets$top_targets +#' top_targets <- example_targets$top_targets[seq(100),] #' hm <- correlation_heatmap(top_targets = top_targets) correlation_heatmap <- function(top_targets, row_side_vars = c("ancestor_name", diff --git a/R/frequency_barplot.R b/R/frequency_barplot.R index 4ca1e6c..b9b8dc6 100644 --- a/R/frequency_barplot.R +++ b/R/frequency_barplot.R @@ -8,7 +8,8 @@ #' @export #' @importFrom HPOExplorer load_phenotype_to_genes #' @examples -#' fp_res <- frequency_barplot() +#' results <- load_example_results()[seq(5000),] +#' fp_res <- frequency_barplot(results=results) frequency_barplot <- function(results = load_example_results(), phenotype_to_genes = load_phenotype_to_genes(), show_plot = TRUE, diff --git a/R/frequency_histogram.R b/R/frequency_histogram.R index a916c6c..decd81b 100644 --- a/R/frequency_histogram.R +++ b/R/frequency_histogram.R @@ -10,7 +10,8 @@ #' @importFrom HPOExplorer load_phenotype_to_genes #' @importFrom HPOExplorer add_gene_frequency add_ancestor #' @examples -#' fp_res <- frequency_histogram() +#' results <- load_example_results()[seq(5000),] +#' fp_res <- frequency_histogram(results=results) frequency_histogram <- function(results = load_example_results(), phenotype_to_genes = load_phenotype_to_genes(), show_plot = TRUE, @@ -35,7 +36,7 @@ frequency_histogram <- function(results = load_example_results(), measure.vars = measure.vars ) g1 <- ggplot2::ggplot(d1, ggplot2::aes(x=value, fill=variable)) + - ggplot2::geom_histogram(stat = "count") + + ggplot2::geom_histogram(stat = "count", na.rm = TRUE) + ggplot2::scale_fill_manual(values = pals::viridis(4)) + ggplot2::facet_wrap(facets = "variable ~.") + ggplot2::theme_bw() + diff --git a/R/gen_overlap.R b/R/gen_overlap.R index b22a6ab..49401cf 100644 --- a/R/gen_overlap.R +++ b/R/gen_overlap.R @@ -35,13 +35,26 @@ gen_overlap <- function(gene_data = top_n = NULL, long_format = FALSE, save_dir = tempdir(), + force_new = FALSE, cores = 1, verbose = TRUE){ # o <- devoptera::args2vars(gen_overlap); list_name_column="hpo_id.disease_id"; # gene_data[,hpo_id.disease_id:=paste(hpo_id,disease_id,sep=".")] - qval <- pval <- gene_symbol <- NULL; + qval <- pval <- NULL; + #### Create save path #### + save_path <- gen_results_save_path(save_dir = save_dir, + prefix = "gen_overlap") + #### Check if results already exist #### + if(file.exists(save_path) && + isFALSE(force_new)) { + messager("Results already exist at:",save_path, + "Use `force_new=TRUE` to overwrite.",v=verbose) + results_final <- readRDS(save_path) + return(results_final) + } + #### Run new analysis #### t1 <- Sys.time() ct_genes <- apply(ctd[[annotLevel]]$specificity_quantiles, 2, @@ -64,10 +77,12 @@ gen_overlap <- function(gene_data = # bg = bg), # by=list_name_column] - split.data.table <- utils::getFromNamespace("split.data.table","data.table") #### Remove all unnecessary columns to save memory #### gene_data <- gene_data[,c(list_name_column,gene_column), with=FALSE] + #### Subset data to only the list_names #### + gene_data <- gene_data[get(list_name_column) %in% list_names,] messager("Splitting data.",v=verbose) + split.data.table <- utils::getFromNamespace("split.data.table","data.table") gene_data_split <- split.data.table(x = gene_data, by = list_name_column, keep.by = FALSE) @@ -97,8 +112,7 @@ gen_overlap <- function(gene_data = messager(difftime(Sys.time(),t1),v = TRUE) #### Save results #### save_path <- save_results(results = overlap, - save_dir = save_dir, - prefix = "gen_overlap_", + save_path = save_path, verbose = verbose) return(overlap) } diff --git a/R/gen_results.R b/R/gen_results.R index 557b2e0..aa1b97f 100644 --- a/R/gen_results.R +++ b/R/gen_results.R @@ -33,7 +33,7 @@ #' @importFrom stringr str_replace_all #' @examples #' gene_data <- HPOExplorer::load_phenotype_to_genes() -#' list_names <- unique(gene_data$hpo_name)[seq(5)] +#' list_names <- unique(gene_data$hpo_id)[seq(5)] #' ctd <- load_example_ctd() #' all_results <- gen_results(ctd = ctd, #' gene_data = gene_data, @@ -45,7 +45,6 @@ gen_results <- function(ctd, gene_column = "gene_symbol", list_names = unique(gene_data[[list_name_column]]), bg = unique(gene_data[[gene_column]]), - force_new = FALSE, reps = 100, annotLevel = 1, genelistSpecies = "human", @@ -54,10 +53,22 @@ gen_results <- function(ctd, parallel_boot = FALSE, save_dir_tmp = NULL, save_dir = tempdir(), + force_new = FALSE, verbose = 1) { # devoptera::args2vars(gen_results) + #### Create save path #### + save_path <- gen_results_save_path(save_dir = save_dir, + prefix = "gen_results") + #### Check if results already exist #### + if(file.exists(save_path) && + isFALSE(force_new)) { + messager("Results already exist at:",save_path, + "Use `force_new=TRUE` to overwrite.",v=verbose) + results_final <- readRDS(save_path) + return(results_final) + } start <- Sys.time() #### Run analysis #### res_files <- ewce_para(ctd = ctd, @@ -83,8 +94,7 @@ gen_results <- function(ctd, "seconds.",v=verbose) #### Save merged results #### save_path <- save_results(results = results_final, - save_dir = save_dir, - prefix = "gen_results", + save_path = save_path, verbose = verbose) return(results_final) } diff --git a/R/gen_results_save_path.R b/R/gen_results_save_path.R new file mode 100644 index 0000000..cc0e1ab --- /dev/null +++ b/R/gen_results_save_path.R @@ -0,0 +1,10 @@ +gen_results_save_path <- function(save_dir, + prefix="gen_results", + suffix=NULL){ + save_path <- file.path( + save_dir, + gsub(" ","_",paste0(prefix,suffix,".rds")) + ) + dir.create(save_dir, showWarnings = FALSE, recursive = TRUE) + return(save_path) +} diff --git a/R/load_hpo_graph.R b/R/load_hpo_graph.R index 944366c..e0143a7 100644 --- a/R/load_hpo_graph.R +++ b/R/load_hpo_graph.R @@ -11,11 +11,11 @@ #' f <- file.path(tempdir(),"hpo_igraph.rds") #' saveRDS(g,file = f) #' piggyback::pb_upload(file = f, -#' tag = "v0.0.1", repo = "neurogenomics/MultiEWCE") +#' tag = "latest", repo = "neurogenomics/MultiEWCE") #' } #' @returns graph object #' -#' @keywords internal +#' @export #' @importFrom piggyback pb_download #' @importFrom tools R_user_dir #' @examples @@ -37,5 +37,6 @@ load_hpo_graph <- function(file="hpo_igraph.rds", overwrite = TRUE) } g <- readRDS(save_path) + g <- igraph::upgrade_graph(g) return(g) } diff --git a/R/ontology_plot.R b/R/ontology_plot.R index 2dfd8ee..ba17fa2 100644 --- a/R/ontology_plot.R +++ b/R/ontology_plot.R @@ -26,7 +26,8 @@ #' @importFrom ontologyPlot onto_plot #' @importFrom HPOExplorer get_hpo load_phenotype_to_genes #' @examples -#' plt <- ontology_plot(cell_type="Amacrine cells") +#' results = load_example_results()[seq(100000)] +#' plt <- ontology_plot(cell_type="ENS_glia", results=results) ontology_plot <- function(cell_type, results = load_example_results(), color_var = c("fold_change","q","p"), @@ -37,21 +38,21 @@ ontology_plot <- function(cell_type, HPOExplorer::load_phenotype_to_genes(), palette = "Spectral", shape = "rect", + verbose=TRUE, ... ){ - # templateR:::source_all() # devoptera::args2vars(ontology_plot) - HPO_term_valid <- NULL; - - message("Generating ontology plot.") + color <- hpo_id <- NULL; + messager("Generating ontology plot.",v=verbose) + #### Prepare data #### cells <- subset_results(cell_type = cell_type, - results = results, - q_threshold = q_threshold, - fold_threshold = fold_threshold, - phenotype_to_genes = phenotype_to_genes, - hpo = hpo) - ### Check color_var #### + results = results, + q_threshold = q_threshold, + fold_threshold = fold_threshold, + phenotype_to_genes = phenotype_to_genes, + hpo = hpo) + #### Prepare colors #### color_var <- color_var[[1]] val_opts <- eval(formals(ontology_plot)$color_var) if(!color_var %in% val_opts){ @@ -63,10 +64,15 @@ ontology_plot <- function(cell_type, cells[[color_var]], reverse = color_var == "fold change") } + cols <- c("hpo_id",color_var) + color_dat <- unique( + cells[hpo_id %in% unique(cells$hpo_id),][,cols, with=FALSE] + ) + color_dat[,color:=color_func(get(color_var))] #### Create plot #### plt <- ontologyPlot::onto_plot(ontology = hpo, - terms = cells$hpo_id, - fillcolor = color_func(cells[[color_var]]), + terms = color_dat$hpo_id, + fillcolor = color_dat$color, shape = shape, ...) return(plt) diff --git a/R/prioritise_targets.R b/R/prioritise_targets.R index 8903bb2..42179c1 100644 --- a/R/prioritise_targets.R +++ b/R/prioritise_targets.R @@ -122,7 +122,8 @@ #' @import data.table #' @importFrom utils head #' @examples -#' res <- prioritise_targets() +#' results = load_example_results()[seq(5000),] +#' res <- prioritise_targets(results=results) prioritise_targets <- function(#### Input data #### results = load_example_results(), ctd = load_example_ctd(), diff --git a/R/save_results.R b/R/save_results.R index 7a5196c..3b9d39a 100644 --- a/R/save_results.R +++ b/R/save_results.R @@ -1,16 +1,9 @@ save_results <- function(results, - save_dir, - prefix="results_", - suffix=NULL, - # suffix=stringr::str_replace_all(Sys.time(),":","-"), + save_path, verbose=TRUE){ - if (!is.null(save_dir) && + + if (!is.null(save_path) && nrow(results)>0) { - save_path <- file.path( - save_dir, - gsub(" ","_",paste0(prefix,suffix,".rds")) - ) - dir.create(save_dir, showWarnings = FALSE, recursive = TRUE) messager("\nSaving results ==>",save_path,v=verbose) saveRDS(results,save_path) return(save_path) diff --git a/man/correlation_heatmap.Rd b/man/correlation_heatmap.Rd index 3ebe570..47668b0 100644 --- a/man/correlation_heatmap.Rd +++ b/man/correlation_heatmap.Rd @@ -71,6 +71,6 @@ Plot Plot a phenotype x phenotype correlation matrix based on genetic overlap. } \examples{ -top_targets <- example_targets$top_targets +top_targets <- example_targets$top_targets[seq(100),] hm <- correlation_heatmap(top_targets = top_targets) } diff --git a/man/frequency_barplot.Rd b/man/frequency_barplot.Rd index c5e1708..653ac7c 100644 --- a/man/frequency_barplot.Rd +++ b/man/frequency_barplot.Rd @@ -31,5 +31,6 @@ ggplot object Plot the frequency of gene-phenotype and phenotype-disease associations. } \examples{ -fp_res <- frequency_barplot() +results <- load_example_results()[seq(5000),] +fp_res <- frequency_barplot(results=results) } diff --git a/man/frequency_histogram.Rd b/man/frequency_histogram.Rd index 4469578..b3a08e8 100644 --- a/man/frequency_histogram.Rd +++ b/man/frequency_histogram.Rd @@ -31,5 +31,6 @@ ggplot object Plot the frequency of gene-phenotype and phenotype-disease associations. } \examples{ -fp_res <- frequency_histogram() +results <- load_example_results()[seq(5000),] +fp_res <- frequency_histogram(results=results) } diff --git a/man/gen_overlap.Rd b/man/gen_overlap.Rd index 8bd3057..10a502d 100644 --- a/man/gen_overlap.Rd +++ b/man/gen_overlap.Rd @@ -15,6 +15,7 @@ gen_overlap( top_n = NULL, long_format = FALSE, save_dir = tempdir(), + force_new = FALSE, cores = 1, verbose = TRUE ) @@ -47,6 +48,9 @@ Otherwise, genes will be collapsed into a list column (\code{TRUE}).} \item{save_dir}{Directory to save results to.} +\item{force_new}{Overwrite previous results +in the \code{save_dir_tmp}.} + \item{cores}{The number of cores to run in parallel (e.g. 8) \code{int}.} \item{verbose}{Print messages.} diff --git a/man/gen_results.Rd b/man/gen_results.Rd index 9c734e7..ad57c63 100644 --- a/man/gen_results.Rd +++ b/man/gen_results.Rd @@ -11,7 +11,6 @@ gen_results( gene_column = "gene_symbol", list_names = unique(gene_data[[list_name_column]]), bg = unique(gene_data[[gene_column]]), - force_new = FALSE, reps = 100, annotLevel = 1, genelistSpecies = "human", @@ -20,6 +19,7 @@ gen_results( parallel_boot = FALSE, save_dir_tmp = NULL, save_dir = tempdir(), + force_new = FALSE, verbose = 1 ) } @@ -41,9 +41,6 @@ that has the gene list names.} (including hit genes). If \code{bg=NULL}, an appropriate gene background will be created automatically.} -\item{force_new}{Overwrite previous results -in the \code{save_dir_tmp}.} - \item{reps}{Number of random gene lists to generate (\emph{Default: 100}, but should be >=10,000 for publication-quality results).} @@ -68,6 +65,9 @@ rather than across gene lists.} \item{save_dir}{Folder to save merged results in.} +\item{force_new}{Overwrite previous results +in the \code{save_dir_tmp}.} + \item{verbose}{Print messages.} } \value{ @@ -99,7 +99,7 @@ For more information on this see docs for get_gene_list } \examples{ gene_data <- HPOExplorer::load_phenotype_to_genes() -list_names <- unique(gene_data$hpo_name)[seq(5)] +list_names <- unique(gene_data$hpo_id)[seq(5)] ctd <- load_example_ctd() all_results <- gen_results(ctd = ctd, gene_data = gene_data, diff --git a/man/load_hpo_graph.Rd b/man/load_hpo_graph.Rd index 117df28..f305260 100644 --- a/man/load_hpo_graph.Rd +++ b/man/load_hpo_graph.Rd @@ -10,7 +10,7 @@ g <- HPOExplorer::make_igraph_object(phenos = phenos) f <- file.path(tempdir(),"hpo_igraph.rds") saveRDS(g,file = f) piggyback::pb_upload(file = f, - tag = "v0.0.1", repo = "neurogenomics/MultiEWCE") + tag = "latest", repo = "neurogenomics/MultiEWCE") } } \usage{ @@ -36,4 +36,3 @@ Load the HPO as a precomputed graph. \examples{ g <- load_hpo_graph() } -\keyword{internal} diff --git a/man/ontology_plot.Rd b/man/ontology_plot.Rd index 2ab2e5f..9114997 100644 --- a/man/ontology_plot.Rd +++ b/man/ontology_plot.Rd @@ -14,6 +14,7 @@ ontology_plot( phenotype_to_genes = HPOExplorer::load_phenotype_to_genes(), palette = "Spectral", shape = "rect", + verbose = TRUE, ... ) } @@ -48,6 +49,8 @@ to gene annotations.} \item{shape}{Character vector of shape names for nodes (or function to set them). Defaults to \code{"circle"}.} +\item{verbose}{Print messages.} + \item{...}{ Arguments passed on to \code{\link[ontologyPlot:onto_plot]{ontologyPlot::onto_plot}} \describe{ @@ -84,5 +87,6 @@ so the colours are assigned manually to each phenotype in this function. There must be a more efficient way to do this. } \examples{ -plt <- ontology_plot(cell_type="Amacrine cells") +results = load_example_results()[seq(100000)] +plt <- ontology_plot(cell_type="ENS_glia", results=results) } diff --git a/man/prioritise_targets.Rd b/man/prioritise_targets.Rd index 4e8ce1d..8807c9e 100644 --- a/man/prioritise_targets.Rd +++ b/man/prioritise_targets.Rd @@ -239,5 +239,6 @@ at the disease-level, phenotype-level, or symptom-level.} } } \examples{ -res <- prioritise_targets() +results = load_example_results()[seq(5000),] +res <- prioritise_targets(results=results) } diff --git a/tests/testthat/test-ewce_para.R b/tests/testthat/test-ewce_para.R index a12740d..d9e0a93 100644 --- a/tests/testthat/test-ewce_para.R +++ b/tests/testthat/test-ewce_para.R @@ -4,7 +4,7 @@ test_that("ewce_para works", { gene_data <- HPOExplorer::load_phenotype_to_genes() ctd <- MultiEWCE::load_example_ctd() - list_names <- unique(gene_data$hpo_name)[seq(3)] + list_names <- unique(gene_data$hpo_id)[seq(3)] #### Return results directly #### res_files <- ewce_para(ctd = ctd, @@ -18,10 +18,10 @@ test_that("ewce_para works", { #### Return paths to saved results #### save_dir_tmp <- file.path(tempdir(),"results") res_files2 <- ewce_para(ctd = ctd, - gene_data = gene_data, - list_names = list_names, - reps = 10, - save_dir_tmp = save_dir_tmp) + gene_data = gene_data, + list_names = list_names, + reps = 10, + save_dir_tmp = save_dir_tmp) files <- list.files(save_dir_tmp, full.names = TRUE) testthat::expect_lte(length(files), length(list_names)) for (f in res_files2) { diff --git a/tests/testthat/test-gen_results.R b/tests/testthat/test-gen_results.R index b713598..95bd1f9 100644 --- a/tests/testthat/test-gen_results.R +++ b/tests/testthat/test-gen_results.R @@ -4,13 +4,13 @@ test_that("gen_results works", { gene_data <- HPOExplorer::load_phenotype_to_genes() ctd <- load_example_ctd() - list_names <- unique(gene_data$hpo_name)[seq(3)] + list_names <- unique(gene_data$hpo_id)[seq(3)] all_results <- gen_results(ctd = ctd, gene_data = gene_data, list_names = list_names, reps = 10) testthat::expect_true(methods::is(all_results,"data.table")) - testthat::expect_gte(sum(list_names %in% unique(all_results$hpo_name)), + testthat::expect_gte(sum(list_names %in% unique(all_results$hpo_id)), length(list_names)-1) testthat::expect_gte(nrow(all_results[q<=0.05,]),10) }) diff --git a/tests/testthat/test-load_hpo_graph.R b/tests/testthat/test-load_hpo_graph.R new file mode 100644 index 0000000..20edd54 --- /dev/null +++ b/tests/testthat/test-load_hpo_graph.R @@ -0,0 +1,5 @@ +test_that("load_hpo_graph works", { + + g <- load_hpo_graph() + testthat::expect_true(methods::is(g,"igraph")) +}) diff --git a/tests/testthat/test-ontology_plot.R b/tests/testthat/test-ontology_plot.R new file mode 100644 index 0000000..d92bcdd --- /dev/null +++ b/tests/testthat/test-ontology_plot.R @@ -0,0 +1,6 @@ +test_that("ontology_plot works", { + + results = load_example_results()[seq(100000)] + plt <- ontology_plot(cell_type="ENS_glia", results=results) + testthat::expect_true(methods::is(plt,"ontology_plot")) +}) diff --git a/tests/testthat/test-prioritise_targets.R b/tests/testthat/test-prioritise_targets.R index e87b7d3..ad9dba3 100644 --- a/tests/testthat/test-prioritise_targets.R +++ b/tests/testthat/test-prioritise_targets.R @@ -1,18 +1,18 @@ test_that("prioritise_targets works", { - results <- load_example_results() + results <- load_example_results()[seq(50000),] ctd <- load_example_ctd() #### Top only #### res1 <- prioritise_targets(results = results, ctd = ctd) - testthat::expect_gte(nrow(res1$top_targets), 300) + testthat::expect_gte(nrow(res1$top_targets), 6) #### All results #### res2 <- prioritise_targets(results = results, ctd = ctd, top_n = 2) - testthat::expect_gte(nrow(res2$top_targets), 200) + testthat::expect_gte(nrow(res2$top_targets), 6) #### Plot evidence score vs. specificity #### res3 <- prioritise_targets(results = results, @@ -43,5 +43,5 @@ test_that("prioritise_targets works", { keep_specificity_quantiles = NULL, keep_mean_exp_quantiles = seq(1,40), symptom_gene_overlap = TRUE) - testthat::expect_gte(nrow(res3$top_targets), 200) + testthat::expect_gte(nrow(res3$top_targets), 60000) })