diff --git a/.github/workflows/R-CMD-chek.yaml b/.github/workflows/R-CMD-check.yaml similarity index 85% rename from .github/workflows/R-CMD-chek.yaml rename to .github/workflows/R-CMD-check.yaml index 1c42c80..02304c2 100644 --- a/.github/workflows/R-CMD-chek.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -55,4 +55,10 @@ jobs: uses: actions/upload-artifact@main with: name: ${{ runner.os }}-r${{ matrix.config.r }}-results - path: check \ No newline at end of file + path: check + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: Breeding-Insight/viewpoly \ No newline at end of file diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml new file mode 100644 index 0000000..be26c25 --- /dev/null +++ b/.github/workflows/test-coverage.yaml @@ -0,0 +1,46 @@ +on: + push: + branches: [main] + pull_request: + branches: [main] + +name: test-coverage + +jobs: + test-coverage: + runs-on: ubuntu-latest + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::covr, any::xml2, curl + needs: coverage + + - name: Test coverage + run: | + cov <- covr::package_coverage( + quiet = FALSE, + clean = FALSE, + install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package"), + type = "tests" + ) + covr::to_cobertura(cov) + shell: Rscript {0} + + - uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./cobertura.xml + fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }} + disable_search: true diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION index dea14f8..bde5e6b 100644 --- a/CRAN-SUBMISSION +++ b/CRAN-SUBMISSION @@ -1,3 +1,3 @@ -Version: 0.3.1 -Date: 2022-10-08 16:34:38 UTC -SHA: 954da88fde10c71e38f22e58e65fd96ce87fe738 +Version: 1.0.0 +Date: 2026-07-08 21:11:43 UTC +SHA: c8ca34ce12f527bb44f29e17d276d0d60065eda0 diff --git a/DESCRIPTION b/DESCRIPTION index 2d150a9..99d0ad6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -46,7 +46,7 @@ Description: Provides a graphical user interface to integrate, visualize and exp 'polymapR', 'diaQTL', 'QTLpoly', 'polyqtlR', 'GWASpoly', and 'HIDECAN' packages. License: GPL (>= 3) Depends: - R (>= 4.0) + R (>= 4.1.0) Imports: shiny (>= 1.6.0), shinyjs, @@ -80,6 +80,7 @@ Suggests: rlang, pkgload, vdiffr, - markdown + markdown, + shinytest Config/testthat/edition: 3 Language: en-US diff --git a/R/mod_genes_view.R b/R/mod_genes_view.R index 8fe79ce..dd9b84c 100644 --- a/R/mod_genes_view.R +++ b/R/mod_genes_view.R @@ -479,7 +479,7 @@ mod_genes_view_server <- function(input, output, session, path.gff <- loadJBrowse_gff3() if (grepl("^http", loadJBrowse_gff3())) { gff.dir <- tempfile() - if (havingIP()) { + if (curl::has_internet()) { download.file(loadJBrowse_gff3(), destfile = gff.dir) gff <- vroom(gff.dir, delim = "\t", skip = 3, col_names = F, progress = FALSE, show_col_types = FALSE) } else { diff --git a/R/mod_hidecan.R b/R/mod_hidecan.R index 18b0af5..3e994c3 100644 --- a/R/mod_hidecan.R +++ b/R/mod_hidecan.R @@ -290,7 +290,7 @@ mod_hidecan_view_server <- function(input, output, session, }) observe({ - if (!is.null(hidecan_data()) & input$width_hidecan > 1 & input$height_hidecan > 1 & input$dpi_hidecan > 1) { + if (!is.null(hidecan_data()) && isTRUE(input$width_hidecan > 1) && isTRUE(input$height_hidecan > 1) && isTRUE(input$dpi_hidecan > 1)) { Sys.sleep(1) # enable the download button shinyjs::enable("bn_download") @@ -306,6 +306,9 @@ mod_hidecan_view_server <- function(input, output, session, }) hidecan_data <- reactive({ + req(loadHidecan()) + # Guard against uninitialized slider inputs when tab hasn't been rendered yet + req(length(input$score_thr_gwas) > 0, length(input$score_thr_de) > 0) if (!is.null(loadHidecan()[["GWASpoly"]])) { x <- loadHidecan()[["GWASpoly"]]$gwas_data_thr_list } else { @@ -419,6 +422,7 @@ mod_hidecan_view_server <- function(input, output, session, } observe({ + req(hidecan_data()) updateTextInput( inputId = "data_names", label = paste0( @@ -566,7 +570,8 @@ mod_hidecan_view_server <- function(input, output, session, } observe({ - if (!is.null(hidecan_data()) & input$width_hidecan > 1 & input$height_hidecan > 1 & input$dpi_hidecan > 1) { + req(hidecan_data()) + if (!is.null(hidecan_data()) && isTRUE(input$width_hidecan > 1) && isTRUE(input$height_hidecan > 1) && isTRUE(input$dpi_hidecan > 1)) { Sys.sleep(1) # enable the download button shinyjs::enable("bn_download") diff --git a/R/mod_qtl_view.R b/R/mod_qtl_view.R index 2dee7c4..220d25d 100644 --- a/R/mod_qtl_view.R +++ b/R/mod_qtl_view.R @@ -167,7 +167,7 @@ mod_qtl_view_ui <- function(id) { hr(), uiOutput(ns("plot.ui")) ) - ), + ), box( id = ns("box_haplo"), width = 12, solidHeader = FALSE, collapsible = TRUE, collapsed = TRUE, status = "primary", title = "Progeny haplotypes", column( @@ -251,7 +251,7 @@ mod_qtl_view_ui <- function(id) { div( style = "border: 2px solid black; border-radius: 3px; padding: 15px; margin: 10px 0;", "* Select QTL/s (triangle/s at the bottom of QTL profile graphic)" - ), + ), ), column( 12, @@ -263,8 +263,9 @@ mod_qtl_view_ui <- function(id) { fluidRow( column( 3, - div(style = "text-align:center;", - downloadButton(ns("bn_download_breeding"), "Download", class = "butt") + div( + style = "text-align:center;", + downloadButton(ns("bn_download_breeding"), "Download", class = "butt") ) ), column( @@ -273,7 +274,7 @@ mod_qtl_view_ui <- function(id) { ) ) ) - ), + ), box( id = ns("box_summary"), width = 12, solidHeader = FALSE, collapsible = TRUE, collapsed = TRUE, status = "primary", title = "QTL summary", column( @@ -281,7 +282,7 @@ mod_qtl_view_ui <- function(id) { div( style = "border: 2px solid black; border-radius: 3px; padding: 15px; margin: 10px 0;", "* Select QTL/s (triangle/s at the bottom of QTL profile graphic)" - ), + ), ), column( 12, @@ -293,8 +294,9 @@ mod_qtl_view_ui <- function(id) { fluidRow( column( 3, - div(style = "text-align:center;", - downloadButton(ns("bn_download_summary"), "Download", class = "butt") + div( + style = "text-align:center;", + downloadButton(ns("bn_download_summary"), "Download", class = "butt") ) ), column( @@ -451,6 +453,7 @@ mod_qtl_view_server <- function(input, output, session, output$plot_qtl <- renderPlot({ withProgress(message = "Working:", value = 0, { incProgress(0.3, detail = paste("building graphic...")) + req(qtl.data()) only_plot_profile(pl.in = qtl.data()) }) }) @@ -853,7 +856,7 @@ mod_qtl_view_server <- function(input, output, session, } observe({ - if (input$haplo_submit & length(grep("Trait", input$haplo)) > 0 & !is.null(input$plot_brush) & input$height_haplo > 1 & input$width_haplo > 1 & input$dpi_haplo > 1) { + if (isTRUE(input$haplo_submit) && length(grep("Trait", input$haplo)) > 0 && !is.null(input$plot_brush) && isTRUE(input$height_haplo > 1) && isTRUE(input$width_haplo > 1) && isTRUE(input$dpi_haplo > 1)) { Sys.sleep(1) # enable the download button shinyjs::enable("bn_download_haplo") @@ -866,12 +869,13 @@ mod_qtl_view_server <- function(input, output, session, output$bn_download_haplo <- downloadHandler( filename = fn_downloadname_haplo, content = function(file) { + req(input$haplo_submit) fn_download_haplo() file.copy(fn_downloadname_haplo(), file, overwrite = T) file.remove(fn_downloadname_haplo()) } ) - + # Reactive data for QTL summary table qtl_summary_data <- reactive({ validate( @@ -893,7 +897,7 @@ mod_qtl_view_server <- function(input, output, session, } dframe }) - + # Reactive data for breeding values table breeding_values_data <- reactive({ validate( @@ -914,13 +918,14 @@ mod_qtl_view_server <- function(input, output, session, rownames(dt) <- NULL dt }) - + # Download handler for QTL summary output$bn_download_summary <- downloadHandler( filename = function() { ext <- switch(input$format_summary, - "csv" = ".csv", - "tsv" = ".tsv") + "csv" = ".csv", + "tsv" = ".tsv" + ) paste0("qtl_summary_", format(Sys.time(), "%Y%m%d_%H%M%S"), ext) }, content = function(file) { @@ -932,13 +937,14 @@ mod_qtl_view_server <- function(input, output, session, } } ) - + # Download handler for breeding values output$bn_download_breeding <- downloadHandler( filename = function() { ext <- switch(input$format_breeding, - "csv" = ".csv", - "tsv" = ".tsv") + "csv" = ".csv", + "tsv" = ".tsv" + ) paste0("breeding_values_", format(Sys.time(), "%Y%m%d_%H%M%S"), ext) }, content = function(file) { diff --git a/R/mod_upload.R b/R/mod_upload.R index e0f63b8..ff21a7c 100644 --- a/R/mod_upload.R +++ b/R/mod_upload.R @@ -896,6 +896,7 @@ mod_upload_server <- function(input, output, session, parent_session) { is.null(input$viewpoly_env)) { withProgress(message = "Working:", value = 0, { incProgress(0.5, detail = paste("Uploading example map data...")) + req(input$example_map) prepare_examples(input$example_map) }) } else { @@ -1211,15 +1212,17 @@ mod_upload_server <- function(input, output, session, parent_session) { }) loadMap <- reactive({ - if (is.null(loadExample()) & - is.null(loadMap_custom()) & - is.null(loadMap_mappoly()) & - is.null(loadMap_onemap()) & - is.null(loadMap_polymapR()) & - is.null(loadViewpoly())) { - warning("Select one of the options in `upload` session") - return(NULL) - } else if (!is.null(loadViewpoly())) { + + req( + !is.null(loadExample()) | + !is.null(loadMap_custom()) | + !is.null(loadMap_mappoly()) | + !is.null(loadMap_onemap()) | + !is.null(loadMap_polymapR()) | + !is.null(loadViewpoly()) + ) + + if (!is.null(loadViewpoly())) { return(loadViewpoly()$map) } else if (!is.null(loadMap_custom())) { return(loadMap_custom()) @@ -1235,15 +1238,16 @@ mod_upload_server <- function(input, output, session, parent_session) { }) loadQTL <- reactive({ - if (is.null(loadExample()) & - is.null(loadQTL_custom()) & - is.null(loadQTL_qtlpoly()) & - is.null(loadQTL_diaQTL()) & - is.null(loadQTL_polyqtlR()) & - is.null(loadViewpoly())) { - warning("Select one of the options in `upload` session") - return(NULL) - } else if (!is.null(loadViewpoly())) { + req( + !is.null(loadExample()) | + !is.null(loadQTL_custom()) | + !is.null(loadQTL_qtlpoly()) | + !is.null(loadQTL_diaQTL()) | + !is.null(loadQTL_polyqtlR()) | + !is.null(loadViewpoly()) + ) + + if (!is.null(loadViewpoly())) { return(loadViewpoly()$qtl) } else if (!is.null(loadQTL_custom())) { return(loadQTL_custom()) diff --git a/R/utils_helpers.R b/R/utils_helpers.R index 8df1bef..ba072ad 100644 --- a/R/utils_helpers.R +++ b/R/utils_helpers.R @@ -729,13 +729,4 @@ $('#' + boxid).closest('.box').find('[data-widget=collapse]').click(); # Global variables to avoid NOTE globalVariables("js") -# Check internet connection -havingIP <- function() { - if (.Platform$OS.type == "windows") { - ipmessage <- system("ipconfig", intern = TRUE) - } else { - ipmessage <- system("ifconfig", intern = TRUE) - } - validIP <- "((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)[.]){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)" - any(grep(validIP, ipmessage)) -} + diff --git a/README.md b/README.md index cc60825..864f1b7 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/viewpoly)](https://cran.r-project.org/package=viewpoly) [![R-universe PolyVerse Status Badge](https://polyploids.r-universe.dev/badges/viewpoly)](https://polyploids.r-universe.dev/badges/viewpoly) -[![codecov](https://codecov.io/github/mmollina/viewpoly/branch/main/graphs/badge.svg)](https://codecov.io/github/mmollina/viewpoly) +[![codecov](https://codecov.io/github/Breeding-Insight/viewpoly/branch/main/graphs/badge.svg)](https://app.codecov.io/github/Breeding-Insight/viewpoly) [![CRAN_monthly_downloads](https://cranlogs.r-pkg.org/badges/viewpoly)](https://cranlogs.r-pkg.org/badges/viewpoly) [![DOI](https://joss.theoj.org/papers/10.21105/joss.04242/status.svg)](https://doi.org/10.21105/joss.04242) @@ -11,7 +11,9 @@ # VIEWpoly `VIEWpoly` is a shiny app and R package for visualizing and exploring results from [polyploid computational tools](https://www.polyploids.org/) using an interactive graphical user interface. The package allows users to directly upload output files from [polymapR](https://CRAN.R-project.org/package=polymapR), [MAPpoly](https://CRAN.R-project.org/package=mappoly) , [OneMap](https://github.com/Cristianetaniguti/onemap), [polyqtlR](https://CRAN.R-project.org/package=polyqtlR), [QTLpoly](https://CRAN.R-project.org/package=qtlpoly), -[diaQTL](https://github.com/jendelman/diaQTL), [GWASpoly](https://github.com/jendelman/GWASpoly), [HIDECAN](https://cran.r-project.org/web/packages/hidecan/index.html), and genomic assembly, variants, annotation and alignment files. VIEWpoly uses [shiny](https://CRAN.R-project.org/package=shiny), [golem](https://CRAN.R-project.org/package=golem), [ggplot2](https://CRAN.R-project.org/package=ggplot2), [plotly](https://CRAN.R-project.org/package=plotly), and [JBrowseR]( https://CRAN.R-project.org/package=JBrowseR) libraries to graphically display the QTL profiles, positions, alleles estimated effects, progeny individuals containing specific haplotypes and their breeding values. It is also possible to access marker dosage and parental phase from the linkage map. If genomic information is available, the corresponding QTL positions are interactively explored using JBrowseR interface, allowing the search for candidate genes. It also provides features to download specific information into comprehensive tables and images for further analysis and presentation. +[diaQTL](https://github.com/jendelman/diaQTL), [GWASpoly](https://github.com/jendelman/GWASpoly), [HIDECAN](https://CRAN.R-project.org/package=hidecan), and genomic assembly, variants, annotation and alignment files. VIEWpoly uses [shiny](https://CRAN.R-project.org/package=shiny), [golem](https://CRAN.R-project.org/package=golem), [ggplot2](https://CRAN.R-project.org/package=ggplot2), [plotly](https://CRAN.R-project.org/package=plotly), and [JBrowseR]( https://CRAN.R-project.org/package=JBrowseR) libraries to graphically display the QTL profiles, positions, alleles estimated effects, progeny individuals containing specific haplotypes and their breeding values. It is also possible to access marker dosage and parental phase from the linkage map. If genomic information is available, the corresponding QTL positions are interactively explored using JBrowseR interface, allowing the search for candidate genes. It also provides features to download specific information into comprehensive tables and images for further analysis and presentation. + +VIEWpoly was developed during the Tools for Polyploid Project by researchers at Texas A&M University and North Carolina State University and is now updated and maintained by Breeding Insight. ### Quick Start @@ -34,7 +36,7 @@ If you want to use the latest development version, go ahead and install `VIEWpol ```{r} # install.packages("devtools") -devtools::install_github("mmollina/viewpoly") +devtools::install_github("Breeding-Insight/viewpoly") viewpoly::run_app() ``` @@ -51,6 +53,17 @@ docker run --rm -e USERID=$(id -u) -e GROUPID=$(id -g) -p 8085:80 -e DISABLE_AUT This will make the container available in port 8085 (choose other if you prefer). After, you just need to go to your favorite browser and search for :8085 (example: 127.0.0.1:8085). That is it! Everything you need is there. +* From Breedverse + +The advantage of using this method is that it also give you a portfolio of other tools developed/maintained by Breeding-Insight. + +```{r} +devtools::install_github("Breeding-Insight/Breedverse") +Breedverse::run_app() +``` + +Go to `Install Modules` and search for VIEWpoly installation button. Once the installation finish, restart the app to access its module on the left side menu. + ### Input data The `Input data` tab has options for several types of inputs. You can upload directly outputs from: @@ -104,4 +117,7 @@ Taniguti, C. H.; Taniguti, L. M.; Amadeu, R. R.; Lau, J.; de Siqueira Gesteira, ### Acknowledgment -VIEWpoly project is supported by the USDA, National Institute of Food and Agriculture (NIFA), Specialty Crop Research Initiative (SCRI) project [‘‘Tools for Genomics-Assisted Breeding in Polyploids: Development of a Community Resource’’](https://www.polyploids.org/) and by the Bill & Melinda Gates Foundation under the Genetic Advances and [Innovative Seed Systems for Sweetpotato project (SweetGAINS)](https://cgspace.cgiar.org/handle/10568/106838). +VIEWpoly before version 1.0.0 was supported by the USDA, National Institute of Food and Agriculture (NIFA), Specialty Crop Research Initiative (SCRI) project [‘‘Tools for Genomics-Assisted Breeding in Polyploids: Development of a Community Resource’’](https://www.polyploids.org/) and by the Bill & Melinda Gates Foundation under the Genetic Advances and [Innovative Seed Systems for Sweetpotato project (SweetGAINS)](https://cgspace.cgiar.org/handle/10568/106838). + +VIEWpoly versions 1.0.0 and above is supported by [Breeding-Insight](https://breedinginsight.org). Funded by USDA-ARS and housed at University of Florida (UF/IFAS). +(Formerly at Cornell University.) Breeding Insight and UF/IFAS are Equal Opportunity Institutions. \ No newline at end of file diff --git a/cran-comments.md b/cran-comments.md index 6e7d449..8f52d08 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,45 +1,21 @@ -# Re-submission of VIEWpoly (08-10-2022) +# Re-submission of VIEWpoly ## Maintainer comments Dear CRAN Team, -This is a re-submission of VIEWpoly package. In this version (0.3.1): +The maintainer email has been changed from chtaniguti@tamu.edu to ctaniguti@ufl.edu. -* Support for diaQTL multi-population evaluation -* User-defined parents names in effects graphics -* Download of plots with RData format -* Docker image available -* Allow to exclude haplotypes from haplotypes probability view in VIEWqtl module -* Bug fixed to upload genome through genome link -* Bug fixed to upload viewpoly object -* Avoid errors if user has not internet connection -* Inform number and ID of individuals selected by haplotypes -* README updated to include new vignette for server version (available at brach publishing_data) +This is a re-submission of VIEWpoly package. In this version (1.0.0): -Thank you for reviewing our re-submission! - -## Test environments +* Change Shiny design to be Breedverse compliant +* Add help materials +* Remove outdated links for QTLpoly on CRAN and datasets in server +* New maintainer email -The package passed through several checks (with the flag --as-cran) in the following systems: - -- Local (Windows 11 v10.0.22000 Build 22000) -- Winbuilder (Windows Server 2008 R2 SP1, R-devel, 32/64 bit) -- GitHub actions (windows-latest release) -- Github actions (macOS-latest release) -- Github actions (ubuntu-20.04 release) -- Github actions (ubuntu-20.04 devel) -- R-hub (Ubuntu Linux 20.04.1 LTS, R-release, GCC) -- R-hub (Fedora Linux, R-devel, clang, gfortran) +Thank you for reviewing our re-submission! ## R CMD check results -0 errors | 0 warnings | 1 note - -There are one NOTE that appeared when running some checks. One of the directories containing example files exceeds 1Mb. It has a total of 4.5Mb. The examples are important to users explore the app features and file format before input their own data. - -* This is a new release. - -## Downstream dependencies +0 errors | 0 warnings | 0 notes -There are currently no downstream dependencies for this package. \ No newline at end of file diff --git a/inst/app/.DS_Store b/inst/app/.DS_Store deleted file mode 100644 index 76934e2..0000000 Binary files a/inst/app/.DS_Store and /dev/null differ diff --git a/inst/tests/shinytest.R b/inst/tests/shinytest.R index 462059e..c46be4f 100644 --- a/inst/tests/shinytest.R +++ b/inst/tests/shinytest.R @@ -1,3 +1,7 @@ -library(shinytest) -shinytest::testApp("../", compareImages = FALSE) +if (isTRUE(as.logical(Sys.getenv("CI", "FALSE")))) { + message("Skipping shinytest on CI: PhantomJS not available.") +} else { + library(shinytest) + shinytest::testApp("../", compareImages = FALSE) +} diff --git a/tests/testthat/test-MAPpoly.R b/tests/testthat/test-MAPpoly.R index 0a4a15f..8905cd1 100644 --- a/tests/testthat/test-MAPpoly.R +++ b/tests/testthat/test-MAPpoly.R @@ -5,7 +5,7 @@ test_that("Tests uploaded MAPpoly files",{ # upload MAPpoly temp <- tempfile() - if(havingIP()){ + if(curl::has_internet()){ options(timeout=200) download.file("https://www.polyploids.org/sites/default/files/2022-04/tetra_MAPpoly_maps.RData", destfile = temp) temp.name <- load(temp) diff --git a/tests/testthat/test-QTLpoly.R b/tests/testthat/test-QTLpoly.R index d4ff55f..c3a713f 100644 --- a/tests/testthat/test-QTLpoly.R +++ b/tests/testthat/test-QTLpoly.R @@ -9,7 +9,7 @@ test_that("Tests uploaded QTLpoly files",{ est.effects$datapath <- tempfile() fitted.mod$datapath <- tempfile() - if(havingIP()){ + if(curl::has_internet()){ options(timeout=200) download.file("https://www.polyploids.org/sites/default/files/2022-04/tetra_QTLpoly_effects.RData", destfile = est.effects$datapath) download.file("https://www.polyploids.org/sites/default/files/2022-04/tetra_QTLpoly_data.RData", destfile = input.data$datapath) diff --git a/tests/testthat/test-diaQTL.R b/tests/testthat/test-diaQTL.R index 92b04e3..69ca0ad 100644 --- a/tests/testthat/test-diaQTL.R +++ b/tests/testthat/test-diaQTL.R @@ -9,7 +9,7 @@ test_that("Tests uploaded diaQTL files",{ fitQTL_list$datapath <- tempfile() BayesCI_list_temp$datapath <- tempfile() - if(havingIP()){ + if(curl::has_internet()){ options(timeout=200) download.file("https://www.polyploids.org/sites/default/files/2022-04/tetra_diaQTL_BayesCI_list_0.RData", destfile = BayesCI_list_temp$datapath) download.file("https://www.polyploids.org/sites/default/files/2022-04/tetra_diaQTL_scan1_list.RData", destfile = scan1_list$datapath) diff --git a/tests/testthat/test-polymapR.R b/tests/testthat/test-polymapR.R index 2a42fe9..b3530ab 100644 --- a/tests/testthat/test-polymapR.R +++ b/tests/testthat/test-polymapR.R @@ -8,7 +8,7 @@ test_that("Tests uploaded polymapR files",{ input.data$datapath <- tempfile() polymapR.map$datapath <- tempfile() - if(havingIP()){ + if(curl::has_internet()){ options(timeout=200) download.file("https://www.polyploids.org/sites/default/files/2022-04/tetra_polymapR_dataset.RData", destfile = input.data$datapath) download.file("https://www.polyploids.org/sites/default/files/2022-04/tetra_polymapR_map.RData", destfile = polymapR.map$datapath) diff --git a/tests/testthat/test-polyqtlR.R b/tests/testthat/test-polyqtlR.R index 5cd9e0a..4c706d8 100644 --- a/tests/testthat/test-polyqtlR.R +++ b/tests/testthat/test-polyqtlR.R @@ -9,7 +9,7 @@ test_that("Tests uploaded polyqtlR files",{ polyqtlR_qtl_info$datapath <- tempfile() polyqtlR_effects$datapath <- tempfile() - if(havingIP()){ + if(curl::has_internet()){ options(timeout=200) download.file("https://www.polyploids.org/sites/default/files/2022-04/tetra_polyqtlR_qtl_info.RData", destfile = polyqtlR_qtl_info$datapath) download.file("https://www.polyploids.org/sites/default/files/2022-04/tetra_polyqtlR_QTLscan.RData", destfile = polyqtlR_QTLscan_list$datapath)