From 37dff5ab02ec96df2bdbc7e37db6f665cab850ca Mon Sep 17 00:00:00 2001 From: Cristianetaniguti Date: Wed, 8 Jul 2026 13:21:12 -0400 Subject: [PATCH 01/12] update checks --- .github/workflows/{R-CMD-chek.yaml => R-CMD-check.yaml} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename .github/workflows/{R-CMD-chek.yaml => R-CMD-check.yaml} (92%) diff --git a/.github/workflows/R-CMD-chek.yaml b/.github/workflows/R-CMD-check.yaml similarity index 92% rename from .github/workflows/R-CMD-chek.yaml rename to .github/workflows/R-CMD-check.yaml index 1f8efa6..1c42c80 100644 --- a/.github/workflows/R-CMD-chek.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -2,9 +2,9 @@ # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: - branches: [main, add_hidecan] + branches: [main, development] pull_request: - branches: [main, add_hidecan] + branches: [main, development] name: R-CMD-check From 6bdc85746ae0e20702edefa7e0ad1e75e7a03bf0 Mon Sep 17 00:00:00 2001 From: Cristianetaniguti Date: Wed, 8 Jul 2026 13:40:13 -0400 Subject: [PATCH 02/12] SAT-108 update readme --- README.md | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cc60825..1255085 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://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) @@ -13,6 +13,8 @@ `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. +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 The quickest way of accessing `VIEWpoly` is [here](https://cris-taniguti.shinyapps.io/viewpoly/). However, our shinyapps.io does not upload files larger than 1GB. If you have larger datasets, you will need to install and run `VIEWpoly` locally. @@ -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 From 42f586bf5f60f4c2b9105d7cb9da373fe7bd105d Mon Sep 17 00:00:00 2001 From: Cristianetaniguti Date: Wed, 8 Jul 2026 13:42:27 -0400 Subject: [PATCH 03/12] fix typo --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1255085..b4905f7 100644 --- a/README.md +++ b/README.md @@ -58,8 +58,8 @@ This will make the container available in port 8085 (choose other if you prefer) 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() +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. From e948e080713fe6cf4b0b234b26192e57436f582b Mon Sep 17 00:00:00 2001 From: Cristianetaniguti Date: Wed, 8 Jul 2026 13:48:33 -0400 Subject: [PATCH 04/12] add codecov --- .github/workflows/R-CMD-check.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 1c42c80..02304c2 100644 --- a/.github/workflows/R-CMD-check.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 From b31c3df4e5b2aa3c43ff25ea353485df6dcc2075 Mon Sep 17 00:00:00 2001 From: Cristianetaniguti Date: Wed, 8 Jul 2026 16:52:04 -0400 Subject: [PATCH 05/12] added to Breedverse --- R/mod_hidecan.R | 9 +++++++-- R/mod_qtl_view.R | 40 +++++++++++++++++++++++----------------- R/mod_upload.R | 40 ++++++++++++++++++++++------------------ inst/app/.DS_Store | Bin 8196 -> 0 bytes 4 files changed, 52 insertions(+), 37 deletions(-) delete mode 100644 inst/app/.DS_Store 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/inst/app/.DS_Store b/inst/app/.DS_Store deleted file mode 100644 index 76934e2b2b01be46bc38d751abb9ee468abfe829..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmeHMTWl0n7(U;$z|54w6uER(p-VRifg;@s@LzY zX^fXdFg}U*M@@``2NNPZ7>!Swc!`D((8L#gFv^pO@}klI%$em<=#xZAnA6Pp&i|kP zpEKt_-#=&1lre_Zf|+KlmN6#N#ZjxG>NbV<^Xrx(MVd-NkU#UsbB>oI>3nYd7VB6M zM<9+s9Dz6jaRlNB+zk<+J)0MKhJ9c3#&sNlI0E-%1o-xv)|72*+ zkP#TyaRlNB+!_I%J{7FQ|8k`p&+m@y2aSyvAyrh)nmtFJBUi}>dk=f1-oOY7eyfq+ z&!s-kb8_Xjk=timrL4BF&2t08cCCEqV4D`192l@&(<`-l1=sXL-(JxnE3%T+^ofb4 zbh;s#Zr(iEkeom<+uD;o;*7c82{8jiZvj?4ZAK@rPsj0#ZQ^r8 z#p2w!n9im0bQHBp-#4HR4ca4~+iM@Uvf6x~=Cg~$?z~l`c?^trPGQXTvs%rF;fxd< zBd}T=ha3BYfpsk4tzqBG2W_EYR?`Z;)nk#JU9{TCnp_v~J9Ui*w&(i$th`T{$~20H zR?f^_w6y-gHH{m#>}cQF*?pmU-h8cQfvOHuVBEld(zf#bCEE-R4;lW5<(jrTI#9HI zJLgz^t}$lSNT(I$!r~>h)p|mIpxiaxMb=XCU?FE8E!e@+;TX&6boGEq54hJe`6#A# zR#w8ERGqHx=RIwCi)vGrL-op4y4vT{bTuO~Y*?$ReMe|THJ=`VKX|%H)%zVIXE~aw z2)E{qsy1=uHE4*`nHF6?#7FKl{Ge;xa_Ol)i-zx@zG45c zk+-@^M5;);i?rdYk)Atsn0Dat&M+W#dY3E@@f)_7re$8JUQ)aG@gDA>*>2G$64O!$ zE^FV)vYg7S7ON6QR#`ZWSA2WYSv_0Nwy|zD#7s(;wQY%V*%9ZHTopkhexsrJFF?HAfnk$#*itM;=;i6@!Rco7? zw`Q)fNYJj#v>W*wlJ+L5holYHcpBR{ZS=(b>e89=sGrzw9g{g_wK>8%sn*NHc5Rjr zSEwsx;<+|kh^rF~GG&$~g`&DHkya>wv;Qoi#UOoa0;*Db-WRg_I;cdgu6z= z-DLs_#7Ea@SnSQaj^~b&rcBzKjbrIfMxa96td^huJ7)g=ewlbal-I8PI&DfhSW}yDfh`lI3 Date: Wed, 8 Jul 2026 17:10:50 -0400 Subject: [PATCH 06/12] re-submitting to CRAN --- DESCRIPTION | 2 +- cran-comments.md | 42 +++++++++--------------------------------- 2 files changed, 10 insertions(+), 34 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 2d150a9..9da2983 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, 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 From 2d85ee4cea9552f13eba2ab0b86474270566657d Mon Sep 17 00:00:00 2001 From: Cristianetaniguti Date: Wed, 8 Jul 2026 17:26:02 -0400 Subject: [PATCH 07/12] fix codecov report --- .github/workflows/test-coverage.yaml | 47 ++++++++++++++++++++++++++++ CRAN-SUBMISSION | 6 ++-- 2 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/test-coverage.yaml diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml new file mode 100644 index 0000000..b8cd314 --- /dev/null +++ b/.github/workflows/test-coverage.yaml @@ -0,0 +1,47 @@ +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") + ) + covr::to_cobertura(cov) + shell: Rscript {0} + + - uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: Breeding-Insight/viewpoly + fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }} + files: ./cobertura.xml + plugins: noop + 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 From 8eaec9be8a265299328bde1336c540c67815e5cc Mon Sep 17 00:00:00 2001 From: Cristianetaniguti Date: Wed, 8 Jul 2026 17:28:33 -0400 Subject: [PATCH 08/12] add package for testing --- DESCRIPTION | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 9da2983..99d0ad6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -80,6 +80,7 @@ Suggests: rlang, pkgload, vdiffr, - markdown + markdown, + shinytest Config/testthat/edition: 3 Language: en-US From 046c25205872ac909fd910997ad2b88b1e723c09 Mon Sep 17 00:00:00 2001 From: Cristianetaniguti Date: Wed, 8 Jul 2026 17:34:46 -0400 Subject: [PATCH 09/12] fix covr --- .github/workflows/test-coverage.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index b8cd314..998be7e 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -32,7 +32,8 @@ jobs: cov <- covr::package_coverage( quiet = FALSE, clean = FALSE, - install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package") + install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package"), + type = "tests" ) covr::to_cobertura(cov) shell: Rscript {0} From fc13253cadec5b9e5fbb598baa701586f1f67037 Mon Sep 17 00:00:00 2001 From: Cristianetaniguti Date: Wed, 8 Jul 2026 17:39:07 -0400 Subject: [PATCH 10/12] trying again --- inst/tests/shinytest.R | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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) +} From 5420882fff756dd0937e2a63a7b8d826f2c40c55 Mon Sep 17 00:00:00 2001 From: Cristianetaniguti Date: Thu, 9 Jul 2026 08:14:37 -0400 Subject: [PATCH 11/12] fix cran notes and errors --- .github/workflows/test-coverage.yaml | 18 +----------------- R/mod_genes_view.R | 2 +- R/utils_helpers.R | 11 +---------- README.md | 4 ++-- tests/testthat/test-MAPpoly.R | 2 +- tests/testthat/test-QTLpoly.R | 2 +- tests/testthat/test-diaQTL.R | 2 +- tests/testthat/test-polymapR.R | 2 +- tests/testthat/test-polyqtlR.R | 2 +- 9 files changed, 10 insertions(+), 35 deletions(-) diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 998be7e..4e69dc4 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -27,22 +27,6 @@ jobs: 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@v5 + - uses: r-lib/actions/test-coverage@v2 with: token: ${{ secrets.CODECOV_TOKEN }} - slug: Breeding-Insight/viewpoly - fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }} - files: ./cobertura.xml - plugins: noop - disable_search: true 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/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 b4905f7..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/Breeding-Insight/viewpoly/branch/main/graphs/badge.svg)](https://codecov.io/github/Breeding-Insight/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,7 @@ # 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. 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) From 5247c0e0bde0e9fe9c4cfacf5ebdddbcde7d903d Mon Sep 17 00:00:00 2001 From: Cristianetaniguti Date: Thu, 9 Jul 2026 08:16:32 -0400 Subject: [PATCH 12/12] fix codecov --- .github/workflows/test-coverage.yaml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 4e69dc4..be26c25 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -27,6 +27,20 @@ jobs: extra-packages: any::covr, any::xml2, curl needs: coverage - - uses: r-lib/actions/test-coverage@v2 + - 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