From 9eb362d29cc3e6ea679981b6f806cf4c69c549be Mon Sep 17 00:00:00 2001 From: Cristianetaniguti Date: Mon, 4 Dec 2023 15:53:42 -0600 Subject: [PATCH] avoiding largeList error --- R/graphics_simu.R | 11 ++++++++++- R/mod_emp_maps.R | 3 +-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/R/graphics_simu.R b/R/graphics_simu.R index e230715..fb19136 100644 --- a/R/graphics_simu.R +++ b/R/graphics_simu.R @@ -23,9 +23,12 @@ prepare_datas_simu <- function(x=NULL, example_simu=NULL){ } } + is_largeList_available <- require("largeList") + is_GUSMap_available <- require("GUSMap") + if(data.gz == "Wait"){ cat("Waiting...\n") - } else { + } else if(is_largeList_available & is_GUSMap_available){ list_files <- list() for(i in 1:length(data.gz)){ @@ -132,6 +135,12 @@ prepare_datas_simu <- function(x=NULL, example_simu=NULL){ system(paste("rm -r", paste(for_rm, collapse = " "))) result_list + } else { + cat("Install LargeList:\n devtools::install_github('Yuchun-Zhang/R_largeList', ref = 'v0.3.1', subdir = 'largeList') \n + and GUSMap: \n + devtools::install_github('tpbilton/GUSbase', ref = '92119b9c57faa7abeede8236d24a4a8e85fb3df7') \n + devtools::install_github('tpbilton/GUSMap@4d7d4057049819d045750d760a45976c8f30dac6') \n + packages to visualize these results.") } } diff --git a/R/mod_emp_maps.R b/R/mod_emp_maps.R index 476a481..010dd92 100644 --- a/R/mod_emp_maps.R +++ b/R/mod_emp_maps.R @@ -91,8 +91,7 @@ mod_emp_maps_server <- function(input, output, session, datas_emp){ stop_bam(input$CountsFrom, input$ErrorProb) incProgress(0.25, detail = paste("Doing part", 2)) - print(head(datas_emp()[[2]])) - + data <- datas_emp()[[2]] %>% filter(GenoCall %in% input$ErrorProb) %>% filter(SNPCall %in% input$SNPCall) %>% filter(CountsFrom == input$CountsFrom)