diff --git a/DESCRIPTION b/DESCRIPTION
index 5a3d0fb..33109ed 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
Package: Breedverse
Title: Collection of R Shiny Packages From Breeding Insight
-Version: 0.3.1
+Version: 0.4.0
Authors@R: c(person(given='Cristiane',
family='Taniguti',
email = 'ctaniguti@ufl.edu',
@@ -18,8 +18,8 @@ Authors@R: c(person(given='Cristiane',
family='Insight',
role = 'aut')
)
-Description: Provides an interface for users to add modules from BIGapp, Qploidy, familia, GenoBrew and AlloMate packages.
-License: Apache License 2.0
+Description: Provides an interface for users to add modules from BIGapp, familia, GenoBrew, AlloMate, and VIEWpoly packages.
+License: Apache License 2.0 | file LICENSE
Depends: R (>= 3.6.0)
biocViews:
Imports:
@@ -28,7 +28,6 @@ Imports:
config,
golem,
shinyWidgets,
- shinydisconnect,
curl,
httr,
utils
@@ -40,16 +39,17 @@ Suggests:
rmarkdown,
testthat (>= 3.0.0),
remotes,
- Qploidy,
+ AlloMate,
BIGapp,
- familia,
- GenoBrew
+ Familia,
+ GenoBrew,
+ viewpoly
Remotes:
- Cristianetaniguti/Qploidy,
+ Breeding-Insight/AlloMate@development,
Breeding-Insight/BIGapp,
Breeding-Insight/familia,
- Breeding-Insight/AlloMate@development,
- Breeding-Insight/GenoBrew@development
+ Breeding-Insight/GenoBrew@development,
+ Breeding-Insight/viewpoly
URL: https://github.com/Breeding-Insight/Breedverse
BugReports: https://github.com/Breeding-Insight/Breedverse/issues
LazyData: true
diff --git a/NAMESPACE b/NAMESPACE
index 1980203..cb91001 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -37,7 +37,6 @@ importFrom(shiny,NS)
importFrom(shiny,includeMarkdown)
importFrom(shiny,shinyApp)
importFrom(shiny,tagList)
-importFrom(shinydisconnect,disconnectMessage)
importFrom(stats,dbinom)
importFrom(utils,capture.output)
importFrom(utils,getFromNamespace)
diff --git a/NEWS.md b/NEWS.md
index 0a03a90..2ce2529 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,11 @@
# breedverse NEWS
+## breedverse 0.4.0
+
+* Add VIEWpoly
+* Add VIEWpoly and GenoBrew help materials
+* Update CSS style file
+
## breedverse 0.3.2
* Add styles to CSS
diff --git a/R/app_server.R b/R/app_server.R
index ce59be8..7f00c4d 100644
--- a/R/app_server.R
+++ b/R/app_server.R
@@ -10,20 +10,16 @@
app_server <- function(input, output, session) {
# Your application server logic
- ##Add server configurations
- options(shiny.maxRequestSize = 1000000 * 1024^2) # Set maximum upload size to 1000GB
- #shiny.maxRequestSize = 10000 * 1024^2; # 10 GB <- This is for a future limit when using BI's server remotely
-
- # output$qploidyInstalled <- reactive({
- # "Qploidy" %in% rownames(installed.packages())
- # })
+ ## Add server configurations
+ options(shiny.maxRequestSize = 1000000 * 1024^2) # Set maximum upload size to 1000GB
+ # shiny.maxRequestSize = 10000 * 1024^2; # 10 GB <- This is for a future limit when using BI's server remotely
output$BIGappInstalled <- reactive({
"BIGapp" %in% rownames(installed.packages())
})
- output$familiaInstalled <- reactive({
- "familia" %in% rownames(installed.packages())
+ output$FamiliaInstalled <- reactive({
+ "Familia" %in% rownames(installed.packages())
})
output$allomateInstalled <- reactive({
@@ -34,78 +30,86 @@ app_server <- function(input, output, session) {
"GenoBrew" %in% rownames(installed.packages())
})
+ output$viewpolyInstalled <- reactive({
+ "viewpoly" %in% rownames(installed.packages())
+ })
+
# Expose the value to JS even when panel is hidden
# outputOptions(output, "qploidyInstalled", suspendWhenHidden = FALSE)
outputOptions(output, "BIGappInstalled", suspendWhenHidden = FALSE)
- outputOptions(output, "familiaInstalled", suspendWhenHidden = FALSE)
+ outputOptions(output, "FamiliaInstalled", suspendWhenHidden = FALSE)
outputOptions(output, "allomateInstalled", suspendWhenHidden = FALSE)
outputOptions(output, "genobrewInstalled", suspendWhenHidden = FALSE)
-
+ outputOptions(output, "viewpolyInstalled", suspendWhenHidden = FALSE)
## Modules
## Home Module
callModule(mod_Home_server,
- "Home_1",
- parent_session = session)
+ "Home_1",
+ parent_session = session
+ )
## Install Module
callModule(mod_install_server,
- "install_1",
- parent_session = session)
-
- ## Qploidy
- # if(isTRUE(requireNamespace("Qploidy", quietly = TRUE))) {
- # do.call("library", list("Qploidy"))
- # callModule(getFromNamespace("mod_qploidy_server", "Qploidy"),
- # "qploidy_1",
- # parent_session = session)
- # }
+ "install_1",
+ parent_session = session
+ )
## BIGapp
- if(isTRUE(requireNamespace("BIGapp", quietly = TRUE))) {
+ if (isTRUE(requireNamespace("BIGapp", quietly = TRUE))) {
do.call("library", list("BIGapp"))
callModule(getFromNamespace("mod_DosageCall_server", "BIGapp"),
- "DosageCall_1",
- parent_session = session)
+ "DosageCall_1",
+ parent_session = session
+ )
callModule(getFromNamespace("mod_dosage2vcf_server", "BIGapp"),
- "dosage2vcf_1",
- parent_session = session)
+ "dosage2vcf_1",
+ parent_session = session
+ )
callModule(getFromNamespace("mod_PCA_server", "BIGapp"),
- "PCA_1",
- parent_session = session)
+ "PCA_1",
+ parent_session = session
+ )
callModule(getFromNamespace("mod_dapc_server", "BIGapp"),
- "dapc_1",
- parent_session = session)
+ "dapc_1",
+ parent_session = session
+ )
callModule(getFromNamespace("mod_gwas_server", "BIGapp"),
- "gwas_1",
- parent_session = session)
+ "gwas_1",
+ parent_session = session
+ )
callModule(getFromNamespace("mod_diversity_server", "BIGapp"),
- "diversity_1",
- parent_session = session)
+ "diversity_1",
+ parent_session = session
+ )
callModule(getFromNamespace("mod_GSAcc_server", "BIGapp"),
- "GSAcc_1",
- parent_session = session)
+ "GSAcc_1",
+ parent_session = session
+ )
callModule(getFromNamespace("mod_GS_server", "BIGapp"),
- "GS_1",
- parent_session = session)
+ "GS_1",
+ parent_session = session
+ )
}
- ##familia
+ ## Familia
- if(isTRUE(requireNamespace("familia", quietly = TRUE))) {
- do.call("library", list("familia"))
- callModule(getFromNamespace("mod_SNMF_server", "familia"),
- "SNMF_1",
- parent_session = session)
- callModule(getFromNamespace("mod_polybreedtools_server", "familia"),
- "PolyBreedTools_1",
- parent_session = session)
+ if (isTRUE(requireNamespace("Familia", quietly = TRUE))) {
+ do.call("library", list("Familia"))
+ callModule(getFromNamespace("mod_SNMF_server", "Familia"),
+ "SNMF_1",
+ parent_session = session
+ )
+ callModule(getFromNamespace("mod_polybreedtools_server", "Familia"),
+ "PolyBreedTools_1",
+ parent_session = session
+ )
}
## AlloMate
- if(isTRUE(requireNamespace("AlloMate", quietly = TRUE))) {
+ if (isTRUE(requireNamespace("AlloMate", quietly = TRUE))) {
do.call("library", list("AlloMate"))
getFromNamespace("mod_allomate_server", "AlloMate")(
"allomate_1",
@@ -114,17 +118,64 @@ app_server <- function(input, output, session) {
}
## GenoBrew
- if(isTRUE(requireNamespace("GenoBrew", quietly = TRUE))) {
+ if (isTRUE(requireNamespace("GenoBrew", quietly = TRUE))) {
do.call("library", list("GenoBrew"))
callModule(getFromNamespace("mod_mk_select_server", "GenoBrew"),
- "mk_select_1",
- parent_session = session)
+ "mk_select_1",
+ parent_session = session
+ )
callModule(getFromNamespace("mod_cnv_server", "GenoBrew"),
- "cnv_1",
- parent_session = session)
+ "cnv_1",
+ parent_session = session
+ )
+ }
+
+ ## VIEWpoly
+ if (isTRUE(requireNamespace("viewpoly", quietly = TRUE))) {
+ do.call("library", list("viewpoly"))
+ datas <- callModule(getFromNamespace("mod_upload_server", "viewpoly"),
+ "upload_1",
+ parent_session = session
+ )
+
+ # QTL view
+ callModule(getFromNamespace("mod_qtl_view_server", "viewpoly"),
+ "qtl_1",
+ loadMap = datas$loadMap,
+ loadQTL = datas$loadQTL,
+ parent_session = session
+ )
+
+ # Genes view
+ callModule(getFromNamespace("mod_genes_view_server", "viewpoly"),
+ "genes_1",
+ loadMap = datas$loadMap,
+ loadQTL = datas$loadQTL,
+ loadJBrowse_fasta = datas$loadJBrowse_fasta,
+ loadJBrowse_gff3 = datas$loadJBrowse_gff3,
+ loadJBrowse_vcf = datas$loadJBrowse_vcf,
+ loadJBrowse_align = datas$loadJBrowse_align,
+ loadJBrowse_wig = datas$loadJBrowse_wig,
+ parent_session = session
+ )
+
+ # Map view
+ callModule(getFromNamespace("mod_map_view_server", "viewpoly"),
+ "map_1",
+ loadMap = datas$loadMap,
+ loadQTL = datas$loadQTL,
+ parent_session = session
+ )
+
+ # Hidecan view
+ callModule(getFromNamespace("mod_hidecan_view_server", "viewpoly"),
+ "hidecan_1",
+ loadHidecan = datas$loadHidecan,
+ parent_session = session
+ )
}
- #Session info popup
+ # Session info popup
observeEvent(input$session_info_button, {
showModal(modalDialog(
title = "Session Information",
@@ -140,7 +191,7 @@ app_server <- function(input, output, session) {
))
})
- #Check for updates from GitHub for Breedverse
+ # Check for updates from GitHub for Breedverse
get_latest_github_commit <- function(repo, owner) {
url <- paste0("https://api.github.com/repos/", owner, "/", repo, "/releases/latest")
response <- GET(url)
@@ -158,12 +209,15 @@ app_server <- function(input, output, session) {
is_internet_connected <- function() {
handle <- new_handle()
- success <- tryCatch({
- curl_fetch_memory("https://www.google.com", handle = handle)
- TRUE
- }, error = function(e) {
- FALSE
- })
+ success <- tryCatch(
+ {
+ curl_fetch_memory("https://www.google.com", handle = handle)
+ TRUE
+ },
+ error = function(e) {
+ FALSE
+ }
+ )
return(success)
}
@@ -198,7 +252,7 @@ app_server <- function(input, output, session) {
# Prepare styled HTML text for the modal
message_html <- paste(
"Installed version:", installed_version, "
",
- #"Latest version commit SHA:", latest_commit, "
",
+ # "Latest version commit SHA:", latest_commit, "
",
"A new version is available on GitHub!
",
"Please update your package."
)
@@ -207,7 +261,7 @@ app_server <- function(input, output, session) {
# Prepare non-styled text for no update needed
message_html <- paste(
"Installed version:", installed_version, "
",
- #"Latest version commit SHA:", latest_commit, "
",
+ # "Latest version commit SHA:", latest_commit, "
",
update_status
)
}
@@ -225,7 +279,7 @@ app_server <- function(input, output, session) {
))
})
- #Download Session Info
+ # Download Session Info
output$download_session_info <- downloadHandler(
filename = function() {
paste("session_info_", Sys.Date(), ".txt", sep = "")
@@ -234,5 +288,4 @@ app_server <- function(input, output, session) {
writeLines(paste(capture.output(sessionInfo()), collapse = "\n"), file)
}
)
-
}
diff --git a/R/app_ui.R b/R/app_ui.R
index b5a6252..9e0ac8e 100644
--- a/R/app_ui.R
+++ b/R/app_ui.R
@@ -4,7 +4,6 @@
#' DO NOT REMOVE.
#' @import shiny
#' @importFrom bs4Dash bs4Badge bs4DashSidebar bs4DashNavbar bs4DashPage sidebarMenu menuItem menuSubItem dashboardBody tabItems tabItem box dashboardFooter
-#' @importFrom shinydisconnect disconnectMessage
#' @import shinyWidgets
#' @importFrom utils getFromNamespace
#'
@@ -27,7 +26,7 @@ app_ui <- function(request) {
skin = "black",
bs4DashNavbar(
title = tagList(
- tags$img(src = 'www/breedverse_logo.png', height = '40', width = '35'),
+ tags$img(src = "www/breedverse_logo.png", height = "40", width = "35"),
),
rightUi = tags$li(
class = "dropdown",
@@ -54,81 +53,84 @@ app_ui <- function(request) {
)
)
),
- help = NULL, #This is the default bs4Dash button to control the presence of tooltips and popovers, which can be added as a user help/info feature.
+ help = NULL, # This is the default bs4Dash button to control the presence of tooltips and popovers, which can be added as a user help/info feature.
bs4DashSidebar(
- skin="light",
+ skin = "light",
status = "info",
- fixed=TRUE,
- #minified = F,
+ fixed = TRUE,
+ # minified = F,
expandOnHover = TRUE,
- sidebarMenu(id = "MainMenu",
- flat = FALSE,
- tags$li(class = "header","Menu"),
- menuItem("Home", tabName = "welcome", icon = icon("house"),startExpanded = FALSE),
- menuItem("Install modules", tabName = "install", icon = icon("share-from-square")),
- tags$li(class = "header", "Available Modules"),
-
-
- # conditionalPanel(
- # condition = "output.qploidyInstalled == true",
- # tags$li(class = "header", style = "color: grey; margin-top: 18px; margin-bottom: 10px; padding-left: 15px;", "Ploidy Estimation"),
- # menuItem("Qploidy", tabName = "qploidy", icon = icon("dna")),
- # ),
-
- conditionalPanel(
- condition = "output.familiaInstalled == true",
- menuItem(
- "familia",
- icon = icon("seedling"),
- startExpanded = FALSE,
- menuSubItem("Supervised", tabName = "snmf", icon = icon("list-ol")),
- menuSubItem("Unsupervised", tabName = "polybreedtools", icon = icon("share-from-square"))
- )
- ),
-
- conditionalPanel(
- condition = "output.allomateInstalled == true",
- menuItem("AlloMate", tabName = "allomate", icon = icon("diagram-project"))
- ),
-
- conditionalPanel(
- condition = "output.BIGappInstalled == true",
- menuItem(
- "BIGapp",
- icon = icon("dna"),
- startExpanded = FALSE,
- menuSubItem("Convert to VCF", tabName = "dosage2vcf", icon = icon("share-from-square")),
- menuSubItem("Dosage Calling", tabName = "updog", icon = icon("list-ol")),
- menuSubItem("VCF Filtering", tabName = "filtering", icon = icon("filter")),
- menuSubItem("Genomic Diversity", tabName = "diversity", icon = icon("chart-pie")),
- menuSubItem("PCA", tabName = "pca", icon = icon("chart-simple")),
- menuSubItem("DAPC", tabName = "dapc", icon = icon("circle-nodes")),
- menuSubItem("GWASpoly", tabName = "gwas", icon = icon("think-peaks")),
- menuSubItem("Predictive Ability", tabName = "prediction_accuracy", icon = icon("right-left")),
- menuSubItem("Genomic Prediction", tabName = "prediction", icon = icon("angles-right"))
- )
- ),
- conditionalPanel(
- condition = "output.genobrewInstalled == true",
- menuItem(
- "GenoBrew",
- icon = icon("dna"),
- startExpanded = FALSE,
- menuSubItem("Select Markers", tabName = "mk_select", icon = icon("magnifying-glass")),
- menuSubItem("CNV profiles", tabName = "cnv", icon = icon("dna"))
- )
- ),
-
- tags$li(class = "header", style = "color: grey; margin-top: 18px; margin-bottom: 10px; padding-left: 15px;", "Information"),
- menuItem("Source Code", icon = icon("circle-info"), href = "https://www.github.com/Breeding-Insight/Genomics_Shiny_App"),
- menuItem("Help", tabName = "help", icon = icon("circle-question"))
+ sidebarMenu(
+ id = "MainMenu",
+ flat = FALSE,
+ tags$li(class = "header", "Menu"),
+ menuItem("Home", tabName = "welcome", icon = icon("house"), startExpanded = FALSE),
+ menuItem("Install modules", tabName = "install", icon = icon("share-from-square")),
+ tags$li(class = "header", "Available Modules"),
+ conditionalPanel(
+ condition = "output.FamiliaInstalled == true",
+ menuItem(
+ "Familia",
+ icon = icon("seedling"),
+ startExpanded = FALSE,
+ menuSubItem("Supervised", tabName = "snmf", icon = icon("list-ol")),
+ menuSubItem("Unsupervised", tabName = "polybreedtools", icon = icon("share-from-square"))
+ )
+ ),
+ conditionalPanel(
+ condition = "output.allomateInstalled == true",
+ menuItem("AlloMate", tabName = "allomate", icon = icon("diagram-project"))
+ ),
+ conditionalPanel(
+ condition = "output.BIGappInstalled == true",
+ menuItem(
+ "BIGapp",
+ icon = icon("dna"),
+ startExpanded = FALSE,
+ menuSubItem("Convert to VCF", tabName = "dosage2vcf", icon = icon("share-from-square")),
+ menuSubItem("Dosage Calling", tabName = "updog", icon = icon("list-ol")),
+ menuSubItem("VCF Filtering", tabName = "filtering", icon = icon("filter")),
+ menuSubItem("Genomic Diversity", tabName = "diversity", icon = icon("chart-pie")),
+ menuSubItem("PCA", tabName = "pca", icon = icon("chart-simple")),
+ menuSubItem("DAPC", tabName = "dapc", icon = icon("circle-nodes")),
+ menuSubItem("GWASpoly", tabName = "gwas", icon = icon("think-peaks")),
+ menuSubItem("Predictive Ability", tabName = "prediction_accuracy", icon = icon("right-left")),
+ menuSubItem("Genomic Prediction", tabName = "prediction", icon = icon("angles-right"))
+ )
+ ),
+ conditionalPanel(
+ condition = "output.genobrewInstalled == true",
+ menuItem(
+ "GenoBrew",
+ icon = icon("dna"),
+ startExpanded = FALSE,
+ menuSubItem("Select Markers", tabName = "mk_select", icon = icon("magnifying-glass")),
+ menuSubItem("CNV profiles", tabName = "cnv", icon = icon("dna"))
+ )
+ ),
+ conditionalPanel(
+ condition = "output.viewpolyInstalled == true",
+ menuItem(
+ "VIEWpoly",
+ icon = icon("dna"),
+ startExpanded = FALSE,
+ menuSubItem("Input Data", tabName = "upload", icon = icon("chart-pie")),
+ menuSubItem("QTL", tabName = "qtl", icon = icon("dna")),
+ menuSubItem("Genome", tabName = "genes", icon = icon("globe")),
+ menuSubItem("Map", tabName = "map", icon = icon("map")),
+ menuSubItem("Hidecan", tabName = "hidecan", icon = icon("eye-slash"))
+ )
+ ),
+ tags$li(class = "header", style = "color: grey; margin-top: 18px; margin-bottom: 10px; padding-left: 15px;", "Information"),
+ menuItem("Source Code", icon = icon("circle-info"), href = "https://www.github.com/Breeding-Insight/Genomics_Shiny_App"),
+ menuItem("Help", tabName = "help", icon = icon("circle-question"))
)
),
footer = dashboardFooter(
right = div(
- class = "dashboard-footer-right", # Align text and images horizontally
+ class = "dashboard-footer-right", # Align text and images horizontally
div(
- class = "dashboard-footer-text", # Style the text
+ class = "dashboard-footer-text", # Style the text
div("2026 Breeding Insight"),
div("Funded by USDA through UF|IFAS")
),
@@ -147,10 +149,10 @@ app_ui <- function(request) {
),
left = div(
class = "dashboard-footer-left",
- sprintf("v%s", as.character(utils::packageVersion("Breedverse"))))
+ sprintf("v%s", as.character(utils::packageVersion("Breedverse")))
+ )
),
dashboardBody(
- disconnectMessage(), #Adds generic error message for any error if not already accounted for
tabItems(
tabItem(
tabName = "welcome", mod_Home_ui("Home_1")
@@ -158,81 +160,120 @@ app_ui <- function(request) {
tabItem(
tabName = "install", mod_install_ui("install_1")
),
- # tabItem(
- # tabName = "qploidy",
- # if(isTRUE(requireNamespace("Qploidy", quietly = TRUE)))
- # getFromNamespace("mod_qploidy_ui", "Qploidy")("qploidy_1")
- # ),
tabItem(
tabName = "snmf",
- if(isTRUE(requireNamespace("familia", quietly = TRUE)))
- getFromNamespace("mod_SNMF_ui", "familia")("SNMF_1")
+ if (isTRUE(requireNamespace("Familia", quietly = TRUE))) {
+ getFromNamespace("mod_SNMF_ui", "Familia")("SNMF_1")
+ }
),
tabItem(
tabName = "polybreedtools",
- if(isTRUE(requireNamespace("familia", quietly = TRUE)))
- getFromNamespace("mod_polybreedtools_ui", "familia")("PolyBreedTools_1")
+ if (isTRUE(requireNamespace("Familia", quietly = TRUE))) {
+ getFromNamespace("mod_polybreedtools_ui", "Familia")("PolyBreedTools_1")
+ }
),
tabItem(
tabName = "allomate",
- if(isTRUE(requireNamespace("AlloMate", quietly = TRUE)))
+ if (isTRUE(requireNamespace("AlloMate", quietly = TRUE))) {
getFromNamespace("mod_allomate_ui", "AlloMate")("allomate_1")
+ }
),
tabItem(
tabName = "filtering",
- if(isTRUE(requireNamespace("BIGapp", quietly = TRUE)))
+ if (isTRUE(requireNamespace("BIGapp", quietly = TRUE))) {
getFromNamespace("mod_Filtering_ui", "BIGapp")("Filtering_1")
+ }
),
tabItem(
tabName = "updog",
- if(isTRUE(requireNamespace("BIGapp", quietly = TRUE)))
+ if (isTRUE(requireNamespace("BIGapp", quietly = TRUE))) {
getFromNamespace("mod_DosageCall_ui", "BIGapp")("DosageCall_1")
+ }
),
tabItem(
tabName = "dosage2vcf",
- if(isTRUE(requireNamespace("BIGapp", quietly = TRUE)))
+ if (isTRUE(requireNamespace("BIGapp", quietly = TRUE))) {
getFromNamespace("mod_dosage2vcf_ui", "BIGapp")("dosage2vcf_1")
+ }
),
tabItem(
tabName = "pca",
- if(isTRUE(requireNamespace("BIGapp", quietly = TRUE)))
+ if (isTRUE(requireNamespace("BIGapp", quietly = TRUE))) {
getFromNamespace("mod_PCA_ui", "BIGapp")("PCA_1")
+ }
),
tabItem(
tabName = "dapc",
- if(isTRUE(requireNamespace("BIGapp", quietly = TRUE)))
+ if (isTRUE(requireNamespace("BIGapp", quietly = TRUE))) {
getFromNamespace("mod_dapc_ui", "BIGapp")("dapc_1")
+ }
),
tabItem(
tabName = "gwas",
- if(isTRUE(requireNamespace("BIGapp", quietly = TRUE)))
+ if (isTRUE(requireNamespace("BIGapp", quietly = TRUE))) {
getFromNamespace("mod_gwas_ui", "BIGapp")("gwas_1")
+ }
),
tabItem(
tabName = "diversity",
- if(isTRUE(requireNamespace("BIGapp", quietly = TRUE)))
+ if (isTRUE(requireNamespace("BIGapp", quietly = TRUE))) {
getFromNamespace("mod_diversity_ui", "BIGapp")("diversity_1")
+ }
),
tabItem(
tabName = "prediction_accuracy",
- if(isTRUE(requireNamespace("BIGapp", quietly = TRUE)))
+ if (isTRUE(requireNamespace("BIGapp", quietly = TRUE))) {
getFromNamespace("mod_GSAcc_ui", "BIGapp")("GSAcc_1")
+ }
),
tabItem(
tabName = "prediction",
- if(isTRUE(requireNamespace("BIGapp", quietly = TRUE)))
+ if (isTRUE(requireNamespace("BIGapp", quietly = TRUE))) {
getFromNamespace("mod_GS_ui", "BIGapp")("GS_1")
+ }
),
tabItem(
tabName = "mk_select",
- if(isTRUE(requireNamespace("GenoBrew", quietly = TRUE)))
+ if (isTRUE(requireNamespace("GenoBrew", quietly = TRUE))) {
getFromNamespace("mod_mk_select_ui", "GenoBrew")("mk_select_1")
+ }
),
tabItem(
tabName = "cnv",
- if(isTRUE(requireNamespace("GenoBrew", quietly = TRUE)))
+ if (isTRUE(requireNamespace("GenoBrew", quietly = TRUE))) {
getFromNamespace("mod_cnv_ui", "GenoBrew")("cnv_1")
+ }
+ ),
+ tabItem(
+ tabName = "upload",
+ if (isTRUE(requireNamespace("viewpoly", quietly = TRUE))) {
+ getFromNamespace("mod_upload_ui", "viewpoly")("upload_1")
+ }
),
+ tabItem(
+ tabName = "qtl",
+ if (isTRUE(requireNamespace("viewpoly", quietly = TRUE))) {
+ getFromNamespace("mod_qtl_view_ui", "viewpoly")("qtl_1")
+ }
+ ),
+ tabItem(
+ tabName = "genes",
+ if (isTRUE(requireNamespace("viewpoly", quietly = TRUE))) {
+ getFromNamespace("mod_genes_view_ui", "viewpoly")("genes_1")
+ }
+ ),
+ tabItem(
+ tabName = "map",
+ if (isTRUE(requireNamespace("viewpoly", quietly = TRUE))) {
+ getFromNamespace("mod_map_view_ui", "viewpoly")("map_1")
+ }
+ ),
+ tabItem(
+ tabName = "hidecan",
+ if (isTRUE(requireNamespace("viewpoly", quietly = TRUE))) {
+ getFromNamespace("mod_hidecan_view_ui", "viewpoly")("hidecan_1")
+ }
+ ),
tabItem(
tabName = "help", mod_help_ui("help_1")
)
diff --git a/R/mod_help.R b/R/mod_help.R
index d53e368..cca3d5e 100644
--- a/R/mod_help.R
+++ b/R/mod_help.R
@@ -8,169 +8,355 @@
#'
#' @importFrom shiny NS tagList includeMarkdown
#'
-mod_help_ui <- function(id){
+mod_help_ui <- function(id) {
ns <- NS(id)
tagList(
fluidPage(
- column(width=12),
- column(width=12,
- div(
- style = "padding: 20px;",
- div(
- style = "text-align: center; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 2px solid #17a2b8;",
- tags$h2("Help Documentation", style = "color: #17a2b8; margin-bottom: 10px;"),
- tags$p("Click a module to expand its help section.",
- style = "color: #666; font-size: 16px;")
- )),
-
- # conditionalPanel(
- # condition = "output.qploidyInstalled == true",
- # box(title="Ploidy Estimation", id = "Qploidy_box",width = 12, collapsible = TRUE, collapsed = TRUE, status = "info", solidHeader = TRUE,
- # "This tab uses Qploidy package to standardize marker allele counts to estimate ploidy or aneuploidy.",
- # br(), br(),
- # bs4Dash::tabsetPanel(id = "Qploidy_tabset",
- # tabPanel("Parameters description", value = "Qploidy_par", br(),
- # includeMarkdown(system.file("help_files/Qploidy_par.Rmd", package = "Qploidy"))
- # ),
- # tabPanel("Results description", value = "Qploidy_results", br(),
- # includeMarkdown(system.file("help_files/Qploidy_res.Rmd", package = "Qploidy"))
- # ),
- # tabPanel("How to cite", value = "Qploidy_cite", br(),
- # includeMarkdown(system.file("help_files/Qploidy_cite.Rmd", package = "Qploidy"))
- # ))
- # )
- # ),
- conditionalPanel(
- condition = "output.BIGappInstalled == true",
- box(title="Convert to VCF", id = "DArT_Report2VCF_box",width = 12, collapsible = TRUE, collapsed = TRUE, status = "info", solidHeader = TRUE,
- "This tab converts the processed genotype and counts files from DArT into a VCF file (v4.3). This file can then be used as the genotype input for the analyses within BIGapp or used with other genomics applications.",
- br(), br(),
- bs4Dash::tabsetPanel(id = "DArT_Report2VCF_tabset",
- tabPanel("Parameters description", value = "DArT_Report2VCF_par", br(),
- includeMarkdown(system.file("help_files/DArT_Report2VCF_par.Rmd", package = "BIGapp"))
- ),
- tabPanel("Results description", value = "DArT_Report2VCF_results", br(),
- includeMarkdown(system.file("help_files/DArT_Report2VCF_res.Rmd", package = "BIGapp"))
- ),
- tabPanel("How to cite", value = "DArT_Report2VCF_cite", br(),
- includeMarkdown(system.file("help_files/DArT_Report2VCF_cite.Rmd", package = "BIGapp"))
- ))
- ),
- box(title="Dosage Calling", id = "Updog_Dosage_Calling_box",width = 12, collapsible = TRUE, collapsed = TRUE, status = "info", solidHeader = TRUE,
- "This tab is designed to handle the process of dosage calling in genomic data. Dosage calling is essential for determining the number of copies of a particular allele at each genomic location.",
- br(), br(),
- bs4Dash::tabsetPanel(id = "Updog_Dosage_Calling_tabset",
- tabPanel("Parameters description", value = "Updog_Dosage_Calling_par", br(),
- includeMarkdown(system.file("help_files/Updog_Dosage_Calling_par.Rmd", package = "BIGapp"))
- ),
- tabPanel("Results description", value = "Updog_Dosage_Calling_results", br(),
- includeMarkdown(system.file("help_files/Updog_Dosage_Calling_res.Rmd", package = "BIGapp"))
- ),
- tabPanel("How to cite", value = "Updog_Dosage_Calling_cite", br(),
- includeMarkdown(system.file("help_files/Updog_Dosage_Calling_cite.Rmd", package = "BIGapp"))
- ))
- ),
- box(title="VCF Filtering", id = "VCF_Filtering_box",width = 12, collapsible = TRUE, collapsed = TRUE, status = "info", solidHeader = TRUE,
- "Filter SNPs and samples in a VCF file based on missing data, minor allele frequency, read depth, and Updog dosage calling metrics",
- br(), br(),
- bs4Dash::tabsetPanel(id = "VCF_Filtering_tabset",
- tabPanel("Parameters description", value = "VCF_Filtering_par", br(),
- includeMarkdown(system.file("help_files/VCF_Filtering_par.Rmd", package = "BIGapp"))
- ),
- tabPanel("Results description", value = "VCF_Filtering_results", br(),
- includeMarkdown(system.file("help_files/VCF_Filtering_res.Rmd", package = "BIGapp"))
- ),
- tabPanel("How to cite", value = "VCF_Filtering_cite", br(),
- includeMarkdown(system.file("help_files/VCF_Filtering_cite.Rmd", package = "BIGapp"))
- ))
- ),
- box(title="PCA", id = "PCA_box",width = 12, collapsible = TRUE, collapsed = TRUE, status = "info", solidHeader = TRUE,
- "This tab is used to perform a PCA to visualize the genomic relationships between samples (population structure)",
- br(), br(),
- bs4Dash::tabsetPanel(id = "PCA_tabset",
- tabPanel("Parameters description", value = "PCA_par", br(),
- includeMarkdown(system.file("help_files/PCA_par.Rmd", package = "BIGapp"))
- ),
- tabPanel("Results description", value = "PCA_results", br(),
- includeMarkdown(system.file("help_files/PCA_res.Rmd", package = "BIGapp"))
- ),
- tabPanel("How to cite", value = "PCA_cite", br(),
- includeMarkdown(system.file("help_files/PCA_cite.Rmd", package = "BIGapp"))
- ))
- ),
- box(title="DAPC", id = "DAPC_box",width = 12, collapsible = TRUE, collapsed = TRUE, status = "info", solidHeader = TRUE,
- "This tab group estimates the number of distinct groups that are present within the genomic dataset, and classifies each sample into a distinct group.",
- br(), br(),
- bs4Dash::tabsetPanel(id = "DAPC_tabset",
- tabPanel("Parameters description", value = "DAPC_par", br(),
- includeMarkdown(system.file("help_files/DAPC_par.Rmd", package = "BIGapp"))
- ),
- tabPanel("Results description", value = "DAPC_results", br(),
- includeMarkdown(system.file("help_files/DAPC_res.Rmd", package = "BIGapp"))
- ),
- tabPanel("How to cite", value = "DAPC_cite", br(),
- includeMarkdown(system.file("help_files/DAPC_cite.Rmd", package = "BIGapp"))
- ))
- ),
- box(title="Genomic Diversity", id = "Genomic_Diversity_box",width = 12, collapsible = TRUE, collapsed = TRUE, status = "info", solidHeader = TRUE,
- "This tab estimates summary metrics for the samples and SNPs within a genomic dataset and produces figures and tables.",
- br(), br(),
- bs4Dash::tabsetPanel(id = "Genomic_Diversity_tabset",
- tabPanel("Parameters description", value = "Genomic_Diversity_par", br(),
- includeMarkdown(system.file("help_files/Genomic_Diversity_par.Rmd", package = "BIGapp"))
- ),
- tabPanel("Results description", value = "Genomic_Diversity_results", br(),
- includeMarkdown(system.file("help_files/Genomic_Diversity_res.Rmd", package = "BIGapp"))
- ),
- tabPanel("How to cite", value = "Genomic_Diversity_cite", br(),
- includeMarkdown(system.file("help_files/Genomic_Diversity_cite.Rmd", package = "BIGapp"))
- ))
- ),
- box(title="GWAS", id = "GWAS_box",width = 12, collapsible = TRUE, collapsed = TRUE, status = "info", solidHeader = TRUE,
- "The tab is for conducting Genome-Wide Association Studies (GWAS) to identify associations between genetic variants and traits of interest. Users can input phenotypic data and specify parameters for the GWAS analysis. The app performs statistical tests to identify significant associations between SNPs and traits, and visualizes the results using Manhattan plots and Q-Q plots. The tab helps in identifying potential genetic markers linked to specific traits. GWASpoly package is used to perform the analysis.",
- br(), br(),
- bs4Dash::tabsetPanel(id = "GWAS_tabset",
- tabPanel("Parameters description", value = "GWAS_par", br(),
- includeMarkdown(system.file("help_files/GWAS_par.Rmd", package = "BIGapp"))
- ),
- tabPanel("Results description", value = "GWAS_results", br(),
- includeMarkdown(system.file("help_files/GWAS_res.Rmd", package = "BIGapp"))
- ),
- tabPanel("How to cite", value = "GWAS_cite", br(),
- includeMarkdown(system.file("help_files/GWAS_cite.Rmd", package = "BIGapp"))
- ))
- ),
- box(title="Predictive Ability", id = "Predictive_Ability_box",width = 12, collapsible = TRUE, collapsed = TRUE, status = "info", solidHeader = TRUE,
- "This tab provides the predictive ability of a GBLUP model for each trait across all samples within a genomic dataset",
- br(), br(),
- bs4Dash::tabsetPanel(id = "Predictive_Ability_tabset",
- tabPanel("Parameters description", value = "Predictive_Ability_par", br(),
- includeMarkdown(system.file("help_files/Predictive_Ability_par.Rmd", package = "BIGapp"))
- ),
- tabPanel("Results description", value = "Predictive_Ability_results", br(),
- includeMarkdown(system.file("help_files/Predictive_Ability_res.Rmd", package = "BIGapp"))
- ),
- tabPanel("How to cite", value = "Predictive_Ability_cite", br(),
- includeMarkdown(system.file("help_files/Predictive_Ability_cite.Rmd", package = "BIGapp"))
- ))
- ),
- box(title="Genomic Prediction", id = "Genomic_Prediction_box",width = 12, collapsible = TRUE, collapsed = TRUE, status = "info", solidHeader = TRUE,
- "his tab estimates the trait and estimated-breeding-values (EBVs) for either all individuals in a genomic dataset, or by training the model with one genomic dataset to predict the values in another.",
- br(), br(),
- bs4Dash::tabsetPanel(id = "Genomic_Prediction_tabset",
- tabPanel("Parameters description", value = "Genomic_Prediction_par", br(),
- includeMarkdown(system.file("help_files/Genomic_Prediction_par.Rmd", package = "BIGapp"))
- ),
- tabPanel("Results description", value = "Genomic_Prediction_results", br(),
- includeMarkdown(system.file("help_files/Genomic_Prediction_res.Rmd", package = "BIGapp"))
- ),
- tabPanel("How to cite", value = "Genomic_Prediction_cite", br(),
- includeMarkdown(system.file("help_files/Genomic_Prediction_cite.Rmd", package = "BIGapp"))
- ))
- )
- ),
+ column(width = 12),
+ column(
+ width = 12,
+ div(
+ style = "padding: 20px;",
+ div(
+ style = "text-align: center; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 2px solid #17a2b8;",
+ tags$h2("Help Documentation", style = "color: #17a2b8; margin-bottom: 10px;"),
+ tags$p("Click a module to expand its help section.",
+ style = "color: #666; font-size: 16px;"
+ )
+ )
+ ),
+ conditionalPanel(
+ condition = "output.BIGappInstalled == true",
+ box(
+ title = "Convert to VCF", id = "DArT_Report2VCF_box", width = 12, collapsible = TRUE, collapsed = TRUE, status = "info", solidHeader = TRUE,
+ "This tab converts the processed genotype and counts files from DArT into a VCF file (v4.3). This file can then be used as the genotype input for the analyses within BIGapp or used with other genomics applications.",
+ br(), br(),
+ bs4Dash::tabsetPanel(
+ id = "DArT_Report2VCF_tabset",
+ tabPanel("Parameters description",
+ value = "DArT_Report2VCF_par", br(),
+ includeMarkdown(system.file("help_files/DArT_Report2VCF_par.Rmd", package = "BIGapp"))
+ ),
+ tabPanel("Results description",
+ value = "DArT_Report2VCF_results", br(),
+ includeMarkdown(system.file("help_files/DArT_Report2VCF_res.Rmd", package = "BIGapp"))
+ ),
+ tabPanel("How to cite",
+ value = "DArT_Report2VCF_cite", br(),
+ includeMarkdown(system.file("help_files/DArT_Report2VCF_cite.Rmd", package = "BIGapp"))
+ )
+ )
+ ),
+ box(
+ title = "Dosage Calling", id = "Updog_Dosage_Calling_box", width = 12, collapsible = TRUE, collapsed = TRUE, status = "info", solidHeader = TRUE,
+ "This tab is designed to handle the process of dosage calling in genomic data. Dosage calling is essential for determining the number of copies of a particular allele at each genomic location.",
+ br(), br(),
+ bs4Dash::tabsetPanel(
+ id = "Updog_Dosage_Calling_tabset",
+ tabPanel("Parameters description",
+ value = "Updog_Dosage_Calling_par", br(),
+ includeMarkdown(system.file("help_files/Updog_Dosage_Calling_par.Rmd", package = "BIGapp"))
+ ),
+ tabPanel("Results description",
+ value = "Updog_Dosage_Calling_results", br(),
+ includeMarkdown(system.file("help_files/Updog_Dosage_Calling_res.Rmd", package = "BIGapp"))
+ ),
+ tabPanel("How to cite",
+ value = "Updog_Dosage_Calling_cite", br(),
+ includeMarkdown(system.file("help_files/Updog_Dosage_Calling_cite.Rmd", package = "BIGapp"))
+ )
+ )
+ ),
+ box(
+ title = "VCF Filtering", id = "VCF_Filtering_box", width = 12, collapsible = TRUE, collapsed = TRUE, status = "info", solidHeader = TRUE,
+ "Filter SNPs and samples in a VCF file based on missing data, minor allele frequency, read depth, and Updog dosage calling metrics",
+ br(), br(),
+ bs4Dash::tabsetPanel(
+ id = "VCF_Filtering_tabset",
+ tabPanel("Parameters description",
+ value = "VCF_Filtering_par", br(),
+ includeMarkdown(system.file("help_files/VCF_Filtering_par.Rmd", package = "BIGapp"))
+ ),
+ tabPanel("Results description",
+ value = "VCF_Filtering_results", br(),
+ includeMarkdown(system.file("help_files/VCF_Filtering_res.Rmd", package = "BIGapp"))
+ ),
+ tabPanel("How to cite",
+ value = "VCF_Filtering_cite", br(),
+ includeMarkdown(system.file("help_files/VCF_Filtering_cite.Rmd", package = "BIGapp"))
+ )
+ )
+ ),
+ box(
+ title = "PCA", id = "PCA_box", width = 12, collapsible = TRUE, collapsed = TRUE, status = "info", solidHeader = TRUE,
+ "This tab is used to perform a PCA to visualize the genomic relationships between samples (population structure)",
+ br(), br(),
+ bs4Dash::tabsetPanel(
+ id = "PCA_tabset",
+ tabPanel("Parameters description",
+ value = "PCA_par", br(),
+ includeMarkdown(system.file("help_files/PCA_par.Rmd", package = "BIGapp"))
+ ),
+ tabPanel("Results description",
+ value = "PCA_results", br(),
+ includeMarkdown(system.file("help_files/PCA_res.Rmd", package = "BIGapp"))
+ ),
+ tabPanel("How to cite",
+ value = "PCA_cite", br(),
+ includeMarkdown(system.file("help_files/PCA_cite.Rmd", package = "BIGapp"))
+ )
+ )
+ ),
+ box(
+ title = "DAPC", id = "DAPC_box", width = 12, collapsible = TRUE, collapsed = TRUE, status = "info", solidHeader = TRUE,
+ "This tab group estimates the number of distinct groups that are present within the genomic dataset, and classifies each sample into a distinct group.",
+ br(), br(),
+ bs4Dash::tabsetPanel(
+ id = "DAPC_tabset",
+ tabPanel("Parameters description",
+ value = "DAPC_par", br(),
+ includeMarkdown(system.file("help_files/DAPC_par.Rmd", package = "BIGapp"))
+ ),
+ tabPanel("Results description",
+ value = "DAPC_results", br(),
+ includeMarkdown(system.file("help_files/DAPC_res.Rmd", package = "BIGapp"))
+ ),
+ tabPanel("How to cite",
+ value = "DAPC_cite", br(),
+ includeMarkdown(system.file("help_files/DAPC_cite.Rmd", package = "BIGapp"))
+ )
+ )
+ ),
+ box(
+ title = "Genomic Diversity", id = "Genomic_Diversity_box", width = 12, collapsible = TRUE, collapsed = TRUE, status = "info", solidHeader = TRUE,
+ "This tab estimates summary metrics for the samples and SNPs within a genomic dataset and produces figures and tables.",
+ br(), br(),
+ bs4Dash::tabsetPanel(
+ id = "Genomic_Diversity_tabset",
+ tabPanel("Parameters description",
+ value = "Genomic_Diversity_par", br(),
+ includeMarkdown(system.file("help_files/Genomic_Diversity_par.Rmd", package = "BIGapp"))
+ ),
+ tabPanel("Results description",
+ value = "Genomic_Diversity_results", br(),
+ includeMarkdown(system.file("help_files/Genomic_Diversity_res.Rmd", package = "BIGapp"))
+ ),
+ tabPanel("How to cite",
+ value = "Genomic_Diversity_cite", br(),
+ includeMarkdown(system.file("help_files/Genomic_Diversity_cite.Rmd", package = "BIGapp"))
+ )
+ )
+ ),
+ box(
+ title = "GWAS", id = "GWAS_box", width = 12, collapsible = TRUE, collapsed = TRUE, status = "info", solidHeader = TRUE,
+ "The tab is for conducting Genome-Wide Association Studies (GWAS) to identify associations between genetic variants and traits of interest. Users can input phenotypic data and specify parameters for the GWAS analysis. The app performs statistical tests to identify significant associations between SNPs and traits, and visualizes the results using Manhattan plots and Q-Q plots. The tab helps in identifying potential genetic markers linked to specific traits. GWASpoly package is used to perform the analysis.",
+ br(), br(),
+ bs4Dash::tabsetPanel(
+ id = "GWAS_tabset",
+ tabPanel("Parameters description",
+ value = "GWAS_par", br(),
+ includeMarkdown(system.file("help_files/GWAS_par.Rmd", package = "BIGapp"))
+ ),
+ tabPanel("Results description",
+ value = "GWAS_results", br(),
+ includeMarkdown(system.file("help_files/GWAS_res.Rmd", package = "BIGapp"))
+ ),
+ tabPanel("How to cite",
+ value = "GWAS_cite", br(),
+ includeMarkdown(system.file("help_files/GWAS_cite.Rmd", package = "BIGapp"))
+ )
+ )
+ ),
+ box(
+ title = "Predictive Ability", id = "Predictive_Ability_box", width = 12, collapsible = TRUE, collapsed = TRUE, status = "info", solidHeader = TRUE,
+ "This tab provides the predictive ability of a GBLUP model for each trait across all samples within a genomic dataset",
+ br(), br(),
+ bs4Dash::tabsetPanel(
+ id = "Predictive_Ability_tabset",
+ tabPanel("Parameters description",
+ value = "Predictive_Ability_par", br(),
+ includeMarkdown(system.file("help_files/Predictive_Ability_par.Rmd", package = "BIGapp"))
+ ),
+ tabPanel("Results description",
+ value = "Predictive_Ability_results", br(),
+ includeMarkdown(system.file("help_files/Predictive_Ability_res.Rmd", package = "BIGapp"))
+ ),
+ tabPanel("How to cite",
+ value = "Predictive_Ability_cite", br(),
+ includeMarkdown(system.file("help_files/Predictive_Ability_cite.Rmd", package = "BIGapp"))
+ )
+ )
+ ),
+ box(
+ title = "Genomic Prediction", id = "Genomic_Prediction_box", width = 12, collapsible = TRUE, collapsed = TRUE, status = "info", solidHeader = TRUE,
+ "his tab estimates the trait and estimated-breeding-values (EBVs) for either all individuals in a genomic dataset, or by training the model with one genomic dataset to predict the values in another.",
+ br(), br(),
+ bs4Dash::tabsetPanel(
+ id = "Genomic_Prediction_tabset",
+ tabPanel("Parameters description",
+ value = "Genomic_Prediction_par", br(),
+ includeMarkdown(system.file("help_files/Genomic_Prediction_par.Rmd", package = "BIGapp"))
+ ),
+ tabPanel("Results description",
+ value = "Genomic_Prediction_results", br(),
+ includeMarkdown(system.file("help_files/Genomic_Prediction_res.Rmd", package = "BIGapp"))
+ ),
+ tabPanel("How to cite",
+ value = "Genomic_Prediction_cite", br(),
+ includeMarkdown(system.file("help_files/Genomic_Prediction_cite.Rmd", package = "BIGapp"))
+ )
+ )
+ )
+ ),
+ ### GenoBrew
+ conditionalPanel(
+ condition = "output.genobrewInstalled == true",
+ box(
+ title = "Select Markers", id = "Inputs_box", width = 12, collapsible = TRUE, collapsed = TRUE, status = "info", solidHeader = TRUE,
+ "Here you will find detailed description of the Select Markers module inputs and outputs. Please access the tutorial for a step-by-step guide:",
+ br(), br(),
+ tabsetPanel(
+ id = "Select_markers_tabset",
+ tabPanel("Parameters description",
+ value = "Select_markers_par", br(),
+ includeMarkdown(system.file("help_files/GenoBrew_select_markers_par.Rmd", package = "GenoBrew"))
+ ),
+ tabPanel("Results description",
+ value = "Select_markers_results", br(),
+ includeMarkdown(system.file("help_files/GenoBrew_select_markers_res.Rmd", package = "GenoBrew"))
+ ),
+ tabPanel("How to cite",
+ value = "Select_markers_cite", br(),
+ includeMarkdown(system.file("help_files/GenoBrew_select_markers_cite.Rmd", package = "GenoBrew"))
+ )
+ )
+ ),
+ box(
+ title = "CNV Profiles", id = "QTL_box", width = 12, collapsible = TRUE, collapsed = TRUE, status = "info", solidHeader = TRUE,
+ "Here you will find detailed description of the CNV Profiles module inputs and outputs. Please access the tutorial for a step-by-step guide:",
+ br(), br(),
+ tabsetPanel(
+ id = "CNV_profiles_tabset",
+ tabPanel("Parameters description",
+ value = "CNV_profiles_par", br(),
+ includeMarkdown(system.file("help_files/GenoBrew_CNV_profile_par.Rmd", package = "GenoBrew"))
+ ),
+ tabPanel("Results description",
+ value = "CNV_profiles_results", br(),
+ includeMarkdown(system.file("help_files/GenoBrew_CNV_profile_res.Rmd", package = "GenoBrew"))
+ ),
+ tabPanel("How to cite",
+ value = "CNV_profiles_cite", br(),
+ includeMarkdown(system.file("help_files/GenoBrew_CNV_profile_cite.Rmd", package = "GenoBrew"))
+ )
+ )
+ )
+ ),
+ conditionalPanel(
+ condition = "output.viewpolyInstalled == true",
+ box(
+ title = "Input Data", id = "Inputs_box", width = 12, collapsible = TRUE, collapsed = TRUE, status = "info", solidHeader = TRUE,
+ "This tab allows users to upload and manage input data for analysis.",
+ br(), br(),
+ tabsetPanel(
+ id = "Inputs_tabset",
+ tabPanel("Parameters description",
+ value = "Inputs_par", br(),
+ includeMarkdown(system.file("help_files/Inputs_par.Rmd", package = "viewpoly"))
+ ),
+ tabPanel("Results description",
+ value = "Inputs_results", br(),
+ includeMarkdown(system.file("help_files/Inputs_res.Rmd", package = "viewpoly"))
+ ),
+ tabPanel("How to cite",
+ value = "Inputs_cite", br(),
+ includeMarkdown(system.file("help_files/Inputs_cite.Rmd", package = "viewpoly"))
+ )
+ )
+ ),
+ box(
+ title = "ViewQTL", id = "QTL_box", width = 12, collapsible = TRUE, collapsed = TRUE, status = "info", solidHeader = TRUE,
+ "This tab allows users to upload and manage input data for analysis.",
+ br(), br(),
+ tabsetPanel(
+ id = "QTL_tabset",
+ tabPanel("Parameters description",
+ value = "QTL_par", br(),
+ includeMarkdown(system.file("help_files/QTL_par.Rmd", package = "viewpoly"))
+ ),
+ tabPanel("Results description",
+ value = "QTL_results", br(),
+ includeMarkdown(system.file("help_files/QTL_res.Rmd", package = "viewpoly"))
+ ),
+ tabPanel("How to cite",
+ value = "QTL_cite", br(),
+ includeMarkdown(system.file("help_files/QTL_cite.Rmd", package = "viewpoly"))
+ )
+ )
+ ),
+ box(
+ title = "ViewGenome", id = "Genome_box", width = 12, collapsible = TRUE, collapsed = TRUE, status = "info", solidHeader = TRUE,
+ "This tab allows users to upload and manage input data for analysis.",
+ br(), br(),
+ tabsetPanel(
+ id = "Genome_tabset",
+ tabPanel("Parameters description",
+ value = "Genome_par", br(),
+ includeMarkdown(system.file("help_files/Genome_par.Rmd", package = "viewpoly"))
+ ),
+ tabPanel("Results description",
+ value = "Genome_results", br(),
+ includeMarkdown(system.file("help_files/Genome_res.Rmd", package = "viewpoly"))
+ ),
+ tabPanel("How to cite",
+ value = "Genome_cite", br(),
+ includeMarkdown(system.file("help_files/Genome_cite.Rmd", package = "viewpoly"))
+ )
+ )
+ ),
+ box(
+ title = "ViewMap", id = "Map_box", width = 12, collapsible = TRUE, collapsed = TRUE, status = "info", solidHeader = TRUE,
+ "This tab allows users to upload and manage input data for analysis.",
+ br(), br(),
+ tabsetPanel(
+ id = "Map_tabset",
+ tabPanel("Parameters description",
+ value = "Map_par", br(),
+ includeMarkdown(system.file("help_files/Map_par.Rmd", package = "viewpoly"))
+ ),
+ tabPanel("Results description",
+ value = "Map_results", br(),
+ includeMarkdown(system.file("help_files/Map_res.Rmd", package = "viewpoly"))
+ ),
+ tabPanel("How to cite",
+ value = "Map_cite", br(),
+ includeMarkdown(system.file("help_files/Map_cite.Rmd", package = "viewpoly"))
+ )
+ )
+ ),
+ box(
+ title = "HIDECAN", id = "Hidecan_box", width = 12, collapsible = TRUE, collapsed = TRUE, status = "info", solidHeader = TRUE,
+ "This tab allows users to upload and manage input data for analysis.",
+ br(), br(),
+ tabsetPanel(
+ id = "Hidecan_tabset",
+ tabPanel("Parameters description",
+ value = "Hidecan_par", br(),
+ includeMarkdown(system.file("help_files/Hidecan_par.Rmd", package = "viewpoly"))
+ ),
+ tabPanel("Results description",
+ value = "Hidecan_results", br(),
+ includeMarkdown(system.file("help_files/Hidecan_res.Rmd", package = "viewpoly"))
+ ),
+ tabPanel("How to cite",
+ value = "Hidecan_cite", br(),
+ includeMarkdown(system.file("help_files/Hidecan_cite.Rmd", package = "viewpoly"))
+ )
+ )
+ )
+ )
),
- column(width=2)
+ column(width = 2)
# Add Help content here
)
)
@@ -179,10 +365,8 @@ mod_help_ui <- function(id){
#' help Server Functions
#'
#' @noRd
-mod_help_server <- function(input, output, session, parent_session){
-
+mod_help_server <- function(input, output, session, parent_session) {
ns <- session$ns
-
}
## To be copied in the UI
diff --git a/R/mod_install.R b/R/mod_install.R
index 301f845..51393d0 100644
--- a/R/mod_install.R
+++ b/R/mod_install.R
@@ -1,4 +1,4 @@
-#' qploidy placeholder UI Function
+#' UI Function
#'
#' @description A shiny Module.
#'
@@ -67,7 +67,6 @@ mod_install_ui <- function(id) {
border-radius: 4px;
}
")),
-
fluidPage(
fluidRow(
class = "install-row",
@@ -96,19 +95,21 @@ mod_install_ui <- function(id) {
)),
span("Installed", class = "install-status-badge install-status-ok")
),
- p(tags$a(href = "https://github.com/Breeding-Insight/GenoBrew", target = "_blank",
- icon("github"), " GitHub Repository")),
+ p(tags$a(
+ href = "https://github.com/Breeding-Insight/GenoBrew", target = "_blank",
+ icon("github"), " GitHub Repository"
+ )),
tagList(
p("Features:"),
tags$ul(
- tags$li("Allele intensities/read counts standardization"),
- tags$li("Sample ploidy estimation"),
- tags$li("Aneuploidy detection"),
- tags$li("Multipoint (HMM) copy number estimation (beta)")
+ tags$li("Test marker panel performance with historical data"),
+ tags$li("Markers basic filters"),
+ tags$li("Interactive visualization of Qploidy2 CNV profiles results"),
+ tags$li("Find copy number variation hostspots in the genome")
),
br()
),
- p("GenoBrew is installed. You can access ploidy estimation features in the app.")
+ p("GenoBrew is installed. You can access marker panel tests and CNV visualization workflows.")
),
# Not installed
@@ -130,8 +131,10 @@ mod_install_ui <- function(id) {
)),
span("Not installed", class = "install-status-badge install-status-missing")
),
- p(tags$a(href = "https://github.com/Breeding-Insight/GenoBrew", target = "_blank",
- icon("github"), " GitHub Repository")),
+ p(tags$a(
+ href = "https://github.com/Breeding-Insight/GenoBrew", target = "_blank",
+ icon("github"), " GitHub Repository"
+ )),
tagList(
p("Features:"),
tags$ul(
@@ -161,96 +164,6 @@ mod_install_ui <- function(id) {
)
)
),
- # --- Qploidy card ----------------------------------------------------
- # column(
- # width = 6,
- # div(
- # class = "install-card",
- #
- # # Already installed
- # conditionalPanel(
- # condition = sprintf("output['%s'] == true", ns("qploidyInstalled")),
- # div(
- # class = "install-header",
- # h3(class = "install-title", div(
- # class = "install-header",
- # tags$div(
- # style = "display:flex; align-items:center;",
- # tags$img(
- # src = "www/Qploidy_logo.png",
- # height = "100px",
- # style = "margin-right:8px;"
- # ),
- # h3(class = "install-title", "Qploidy")
- # ),
- # )),
- # span("Installed", class = "install-status-badge install-status-ok")
- # ),
- # p(tags$a(href = "https://github.com/Cristianetaniguti/Qploidy", target = "_blank",
- # icon("github"), " GitHub Repository")),
- # tagList(
- # p("Features:"),
- # tags$ul(
- # tags$li("Allele intensities/read counts standardization"),
- # tags$li("Sample ploidy estimation"),
- # tags$li("Aneuploidy detection"),
- # tags$li("Multipoint (HMM) copy number estimation (beta)")
- # ),
- # br()
- # ),
- # p("Qploidy is installed. You can access ploidy estimation features in the app.")
- # ),
- #
- # # Not installed
- # conditionalPanel(
- # condition = sprintf("output['%s'] == false", ns("qploidyInstalled")),
- # div(
- # class = "install-header",
- # h3(class = "install-title", div(
- # class = "install-header",
- # tags$div(
- # style = "display:flex; align-items:center;",
- # tags$img(
- # src = "www/Qploidy_logo.png",
- # height = "100px",
- # style = "margin-right:8px;"
- # ),
- # h3(class = "install-title", "Qploidy")
- # ),
- # )),
- # span("Not installed", class = "install-status-badge install-status-missing")
- # ),
- # p(tags$a(href = "https://github.com/Cristianetaniguti/Qploidy", target = "_blank",
- # icon("github"), " GitHub Repository")),
- # tagList(
- # p("Features:"),
- # tags$ul(
- # tags$li("Allele intensities/read counts standardization"),
- # tags$li("Sample ploidy estimation"),
- # tags$li("Aneuploidy detection"),
- # tags$li("Multipoint (HMM) copy number estimation (beta)")
- # ),
- # br()
- # ),
- # p("Install the Qploidy package to enable ploidy estimation workflows."),
- # div(
- # style = "margin-top: 12px; margin-bottom: 10px;",
- # actionButton(
- # ns("install_qploidy"),
- # "Install Qploidy",
- # icon = icon("download")
- # )
- # )
- # ),
- #
- # # Log (always visible)
- # tags$label("Installation log"),
- # div(
- # class = "install-log",
- # uiOutput(ns("install_log_qploidy"))
- # )
- # )
- # ),
# --- BIGapp card -----------------------------------------------------
column(
@@ -277,8 +190,10 @@ mod_install_ui <- function(id) {
)),
span("Installed", class = "install-status-badge install-status-ok")
),
- p(tags$a(href = "https://github.com/Breeding-Insight/BIGapp", target = "_blank",
- icon("github"), " GitHub Repository")),
+ p(tags$a(
+ href = "https://github.com/Breeding-Insight/BIGapp", target = "_blank",
+ icon("github"), " GitHub Repository"
+ )),
tagList(
p("Features:"),
tags$ul(
@@ -312,8 +227,10 @@ mod_install_ui <- function(id) {
)),
span("Not installed", class = "install-status-badge install-status-missing")
),
- p(tags$a(href = "https://github.com/Breeding-Insight/BIGapp", target = "_blank",
- icon("github"), " GitHub Repository")),
+ p(tags$a(
+ href = "https://github.com/Breeding-Insight/BIGapp", target = "_blank",
+ icon("github"), " GitHub Repository"
+ )),
tagList(
p("Features:"),
tags$ul(
@@ -372,8 +289,10 @@ mod_install_ui <- function(id) {
)),
span("Installed", class = "install-status-badge install-status-ok")
),
- p(tags$a(href = "https://github.com/Breeding-Insight/familia", target = "_blank",
- icon("github"), " GitHub Repository")),
+ p(tags$a(
+ href = "https://github.com/Breeding-Insight/familia", target = "_blank",
+ icon("github"), " GitHub Repository"
+ )),
tagList(
p("Features:"),
tags$ul(
@@ -406,8 +325,10 @@ mod_install_ui <- function(id) {
)),
span("Not installed", class = "install-status-badge install-status-missing")
),
- p(tags$a(href = "https://github.com/Breeding-Insight/familia", target = "_blank",
- icon("github"), " GitHub Repository")),
+ p(tags$a(
+ href = "https://github.com/Breeding-Insight/familia", target = "_blank",
+ icon("github"), " GitHub Repository"
+ )),
tagList(
p("Features:"),
tags$ul(
@@ -462,8 +383,10 @@ mod_install_ui <- function(id) {
)),
span("Installed", class = "install-status-badge install-status-ok")
),
- p(tags$a(href = "https://github.com/Breeding-Insight/AlloMate", target = "_blank",
- icon("github"), " GitHub Repository")),
+ p(tags$a(
+ href = "https://github.com/Breeding-Insight/AlloMate", target = "_blank",
+ icon("github"), " GitHub Repository"
+ )),
tagList(
p("Features:"),
tags$ul(
@@ -496,8 +419,10 @@ mod_install_ui <- function(id) {
)),
span("Not installed", class = "install-status-badge install-status-missing")
),
- p(tags$a(href = "https://github.com/Breeding-Insight/AlloMate", target = "_blank",
- icon("github"), " GitHub Repository")),
+ p(tags$a(
+ href = "https://github.com/Breeding-Insight/AlloMate", target = "_blank",
+ icon("github"), " GitHub Repository"
+ )),
tagList(
p("Features:"),
tags$ul(
@@ -527,7 +452,122 @@ mod_install_ui <- function(id) {
)
)
)
- ) #Closing fluidrow parentheses
+ ), # Closing fluidrow parentheses
+ #--- VIEWpoly card ----------------------------------------------------
+ fluidRow(
+ class = "install-row",
+ column(
+ width = 6,
+ div(
+ class = "install-card",
+
+ # Already installed
+ conditionalPanel(
+ condition = sprintf("output['%s'] == true", ns("viewpolyInstalled")),
+ div(
+ class = "install-header",
+ h3(class = "install-title", div(
+ class = "install-header",
+ tags$div(
+ style = "display:flex; align-items:center;",
+ tags$img(
+ src = "www/viewpoly_logo.png",
+ height = "100px",
+ style = "margin-right:8px;"
+ ),
+ h3(class = "install-title", "VIEWpoly")
+ ),
+ )),
+ span("Installed", class = "install-status-badge install-status-ok")
+ ),
+ div(
+ style = "display: flex; gap: 16px;",
+ tags$a(
+ href = "https://github.com/Breeding-Insight/viewpoly", target = "_blank",
+ icon("github"), " GitHub Repository"
+ ),
+ tags$a(
+ href = "https://CRAN.R-project.org/package=viewpoly", target = "_blank",
+ tags$img(src = "www/cran_logo.png", style = "height: 16px; vertical-align: middle; margin-right: 5px;"),
+ "CRAN Package"
+ )
+ ), br(),
+ tagList(
+ p("Features:"),
+ tags$ul(
+ tags$li("Multi-tool Integration (polymapR, MAPpoly, OneMap, QTLpoly, diaQTL, GWASpoly, HIDECAN)"),
+ tags$li("Interactive QTL Visualization"),
+ tags$li("Genome Browser Integration (JBrowseR)"),
+ tags$li("Breeding Value Analysis"),
+ tags$li("Genetic Map Exploration")
+ ),
+ br()
+ ),
+ p("VIEWpoly is installed. You can access Multi-polyploid tools Integration in the app.")
+ ),
+
+ # Not installed
+ conditionalPanel(
+ condition = sprintf("output['%s'] == false", ns("viewpolyInstalled")),
+ div(
+ class = "install-header",
+ h3(class = "install-title", div(
+ class = "install-header",
+ tags$div(
+ style = "display:flex; align-items:center;",
+ tags$img(
+ src = "www/viewpoly_logo.png",
+ height = "100px",
+ style = "margin-right:8px;"
+ ),
+ h3(class = "install-title", "VIEWpoly")
+ ),
+ )),
+ span("Not installed", class = "install-status-badge install-status-missing")
+ ),
+ div(
+ style = "display: flex; gap: 16px;",
+ tags$a(
+ href = "https://github.com/Breeding-Insight/viewpoly", target = "_blank",
+ icon("github"), " GitHub Repository"
+ ),
+ tags$a(
+ href = "https://CRAN.R-project.org/package=viewpoly", target = "_blank",
+ tags$img(src = "www/cran_logo.png", style = "height: 16px; vertical-align: middle; margin-right: 5px;"),
+ "CRAN Package"
+ )
+ ), br(),
+ tagList(
+ p("Features:"),
+ tags$ul(
+ tags$li("Multi-tool Integration (polymapR, MAPpoly, OneMap, QTLpoly, diaQTL, GWASpoly, HIDECAN)"),
+ tags$li("Interactive QTL Visualization"),
+ tags$li("Genome Browser Integration (JBrowseR)"),
+ tags$li("Breeding Value Analysis"),
+ tags$li("Genetic Map Exploration")
+ ),
+ br()
+ ),
+ p("VIEWpoly is not installed. Install VIEWpoly to access Multi-polyploid tools Integration in the app."),
+ div(
+ style = "margin-top: 12px; margin-bottom: 10px;",
+ actionButton(
+ ns("install_viewpoly"),
+ "Install VIEWpoly",
+ icon = icon("download")
+ )
+ )
+ ),
+
+ # Log (always visible)
+ tags$label("Installation log"),
+ div(
+ class = "install-log",
+ uiOutput(ns("install_log_viewpoly"))
+ )
+ )
+ )
+ )
)
)
}
@@ -535,16 +575,15 @@ mod_install_ui <- function(id) {
#' install Server Functions
#'
#' @noRd
-mod_install_server <- function(input, output, session, parent_session){
-
+mod_install_server <- function(input, output, session, parent_session) {
ns <- session$ns
# --- reactive installation flags ---------------------------------------
- # qploidy_installed <- reactiveVal(
- # requireNamespace("Qploidy", quietly = TRUE)
- # )
+ viewpoly_installed <- reactiveVal(
+ requireNamespace("viewpoly", quietly = TRUE)
+ )
familia_installed <- reactiveVal(
- requireNamespace("familia", quietly = TRUE)
+ requireNamespace("Familia", quietly = TRUE)
)
bigapp_installed <- reactiveVal(
requireNamespace("BIGapp", quietly = TRUE)
@@ -556,141 +595,173 @@ mod_install_server <- function(input, output, session, parent_session){
requireNamespace("GenoBrew", quietly = TRUE)
)
- # output$qploidyInstalled <- reactive({ qploidy_installed() })
- # outputOptions(output, "qploidyInstalled", suspendWhenHidden = FALSE)
+ output$viewpolyInstalled <- reactive({
+ viewpoly_installed()
+ })
+ outputOptions(output, "viewpolyInstalled", suspendWhenHidden = FALSE)
- output$familiaInstalled <- reactive({ familia_installed() })
+ output$familiaInstalled <- reactive({
+ familia_installed()
+ })
outputOptions(output, "familiaInstalled", suspendWhenHidden = FALSE)
- output$BIGappInstalled <- reactive({ bigapp_installed() })
+ output$BIGappInstalled <- reactive({
+ bigapp_installed()
+ })
outputOptions(output, "BIGappInstalled", suspendWhenHidden = FALSE)
- output$allomateInstalled <- reactive({ allomate_installed() })
+ output$allomateInstalled <- reactive({
+ allomate_installed()
+ })
outputOptions(output, "allomateInstalled", suspendWhenHidden = FALSE)
- output$genobrewInstalled <- reactive({ genobrew_installed() })
+ output$genobrewInstalled <- reactive({
+ genobrew_installed()
+ })
outputOptions(output, "genobrewInstalled", suspendWhenHidden = FALSE)
# Initialize logs as empty
- # output$install_log_qploidy <- renderUI(NULL)
+ output$install_log_viewpoly <- renderUI(NULL)
output$install_log_BIGapp <- renderUI(NULL)
output$install_log_familia <- renderUI(NULL)
output$install_log_allomate <- renderUI(NULL)
output$install_log_genobrew <- renderUI(NULL)
- # --- Qploidy installation ----------------------------------------------
- # observeEvent(input$install_qploidy, {
- # err_msg <- NULL
- # ok <- FALSE
- # log_lines <- character(0)
- #
- # output$install_log_qploidy <- renderUI(NULL)
- #
- # withProgress(message = "Installing Qploidy", value = 0, {
- #
- # capture_msg <- function(m) {
- # log_lines <<- c(log_lines, conditionMessage(m))
- # output$install_log_qploidy <- renderUI(
- # pre(style = "font-size:11px; white-space:pre-wrap;",
- # paste(log_lines, collapse = ""))
- # )
- # invokeRestart("muffleMessage")
- # }
- #
- # withCallingHandlers(
- # tryCatch({
- # if (!requireNamespace("remotes", quietly = TRUE)) {
- # incProgress(0.05, detail = "Installing remotes...")
- # install.packages("remotes")
- # }
- # incProgress(0.1, detail = "Contacting GitHub...")
- # remotes::install_github(
- # "Cristianetaniguti/Qploidy",
- # upgrade = "never",
- # quiet = FALSE
- # )
- # incProgress(0.9, detail = "Verifying...")
- # ok <- requireNamespace("Qploidy", quietly = TRUE)
- # incProgress(1, detail = "Done")
- # }, error = function(e) {
- # err_msg <<- conditionMessage(e)
- # }),
- # message = capture_msg
- # )
- # })
- #
- # if (ok) {
- # qploidy_installed(TRUE)
- # showNotification("Qploidy installed successfully.", type = "message", duration = 8)
- # output$install_log_qploidy <- renderUI(HTML(
- # paste0(if (length(log_lines)) paste0('
', paste(log_lines, collapse=""), ''), - # 'Qploidy installation completed. Restart the app to load Qploidy features.') - # )) - # } else { - # showNotification("Qploidy installation failed. See log below.", type = "error", duration = NULL) - # output$install_log_qploidy <- renderUI( - # pre(style = "font-size:11px; white-space:pre-wrap; color:#c62828;", - # if (is.null(err_msg)) "Unknown error (check server permissions/logs)." else - # paste(c(log_lines, err_msg), collapse = "")) - # ) - # } - # }) + # --- viewpoly installation ---------------------------------------------- + observeEvent(input$install_viewpoly, { + err_msg <- NULL + ok <- FALSE + log_lines <- character(0) + + output$install_log_viewpoly <- renderUI(NULL) + + withProgress(message = "Installing VIEWpoly", value = 0, { + capture_msg <- function(m) { + log_lines <<- c(log_lines, conditionMessage(m)) + output$install_log_viewpoly <- renderUI( + pre( + style = "font-size:11px; white-space:pre-wrap;", + paste(log_lines, collapse = "") + ) + ) + invokeRestart("muffleMessage") + } + + withCallingHandlers( + tryCatch( + { + if (!requireNamespace("remotes", quietly = TRUE)) { + incProgress(0.05, detail = "Installing remotes...") + install.packages("remotes") + } + incProgress(0.1, detail = "Contacting GitHub...") + remotes::install_github( + "Breeding-Insight/viewpoly", + upgrade = "never", + quiet = FALSE + ) + incProgress(0.9, detail = "Verifying...") + ok <- requireNamespace("viewpoly", quietly = TRUE) + incProgress(1, detail = "Done") + }, + error = function(e) { + err_msg <<- conditionMessage(e) + } + ), + message = capture_msg + ) + }) + + if (ok) { + viewpoly_installed(TRUE) + showNotification("viewpoly installed successfully.", type = "message", duration = 8) + output$install_log_viewpoly <- renderUI(HTML( + paste0( + if (length(log_lines)) paste0('
', paste(log_lines, collapse = ""), ""), + 'viewpoly installation completed. Restart the app to load viewpoly features.' + ) + )) + } else { + showNotification("viewpoly installation failed. See log below.", type = "error", duration = NULL) + output$install_log_viewpoly <- renderUI( + pre( + style = "font-size:11px; white-space:pre-wrap; color:#c62828;", + if (is.null(err_msg)) { + "Unknown error (check server permissions/logs)." + } else { + paste(c(log_lines, err_msg), collapse = "") + } + ) + ) + } + }) # --- Familia installation ---------------------------------------------- observeEvent(input$install_familia, { err_msg <- NULL - ok <- FALSE + ok <- FALSE log_lines <- character(0) output$install_log_familia <- renderUI(NULL) withProgress(message = "Installing familia", value = 0, { - capture_msg <- function(m) { log_lines <<- c(log_lines, conditionMessage(m)) output$install_log_familia <- renderUI( - pre(style = "font-size:11px; white-space:pre-wrap;", - paste(log_lines, collapse = "")) + pre( + style = "font-size:11px; white-space:pre-wrap;", + paste(log_lines, collapse = "") + ) ) invokeRestart("muffleMessage") } withCallingHandlers( - tryCatch({ - if (!requireNamespace("remotes", quietly = TRUE)) { - incProgress(0.05, detail = "Installing remotes...") - install.packages("remotes") + tryCatch( + { + if (!requireNamespace("remotes", quietly = TRUE)) { + incProgress(0.05, detail = "Installing remotes...") + install.packages("remotes") + } + incProgress(0.1, detail = "Contacting GitHub...") + remotes::install_github( + "Breeding-Insight/familia", + upgrade = "never", + quiet = FALSE + ) + incProgress(0.9, detail = "Verifying...") + ok <- requireNamespace("Familia", quietly = TRUE) + incProgress(1, detail = "Done") + }, + error = function(e) { + err_msg <<- conditionMessage(e) } - incProgress(0.1, detail = "Contacting GitHub...") - remotes::install_github( - "Breeding-Insight/familia", - upgrade = "never", - quiet = FALSE - ) - incProgress(0.9, detail = "Verifying...") - ok <- requireNamespace("familia", quietly = TRUE) - incProgress(1, detail = "Done") - }, error = function(e) { - err_msg <<- conditionMessage(e) - }), + ), message = capture_msg ) }) if (ok) { familia_installed(TRUE) - showNotification("familia installed successfully.", type = "message", duration = 8) + showNotification("Familia installed successfully.", type = "message", duration = 8) output$install_log_familia <- renderUI(HTML( - paste0(if (length(log_lines)) paste0('
', paste(log_lines, collapse=""), ''), - 'familia installation completed. Restart the app to load familia features.') + paste0( + if (length(log_lines)) paste0('
', paste(log_lines, collapse = ""), ""), + 'Familia installation completed. Restart the app to load Familia features.' + ) )) } else { - showNotification("familia installation failed. See log below.", type = "error", duration = NULL) + showNotification("Familia installation failed. See log below.", type = "error", duration = NULL) output$install_log_familia <- renderUI( - pre(style = "font-size:11px; white-space:pre-wrap; color:#c62828;", - if (is.null(err_msg)) "Unknown error (check server permissions/logs)." else - paste(c(log_lines, err_msg), collapse = "")) + pre( + style = "font-size:11px; white-space:pre-wrap; color:#c62828;", + if (is.null(err_msg)) { + "Unknown error (check server permissions/logs)." + } else { + paste(c(log_lines, err_msg), collapse = "") + } + ) ) } }) @@ -698,41 +769,45 @@ mod_install_server <- function(input, output, session, parent_session){ # --- AlloMate installation ---------------------------------------------- observeEvent(input$install_allomate, { err_msg <- NULL - ok <- FALSE + ok <- FALSE log_lines <- character(0) output$install_log_allomate <- renderUI(NULL) withProgress(message = "Installing AlloMate", value = 0, { - capture_msg <- function(m) { log_lines <<- c(log_lines, conditionMessage(m)) output$install_log_allomate <- renderUI( - pre(style = "font-size:11px; white-space:pre-wrap;", - paste(log_lines, collapse = "")) + pre( + style = "font-size:11px; white-space:pre-wrap;", + paste(log_lines, collapse = "") + ) ) invokeRestart("muffleMessage") } withCallingHandlers( - tryCatch({ - if (!requireNamespace("remotes", quietly = TRUE)) { - incProgress(0.05, detail = "Installing remotes...") - install.packages("remotes") + tryCatch( + { + if (!requireNamespace("remotes", quietly = TRUE)) { + incProgress(0.05, detail = "Installing remotes...") + install.packages("remotes") + } + incProgress(0.1, detail = "Contacting GitHub...") + remotes::install_github( + "Breeding-Insight/AlloMate", + upgrade = "never", + ref = "development", + quiet = FALSE + ) + incProgress(0.9, detail = "Verifying...") + ok <- requireNamespace("AlloMate", quietly = TRUE) + incProgress(1, detail = "Done") + }, + error = function(e) { + err_msg <<- conditionMessage(e) } - incProgress(0.1, detail = "Contacting GitHub...") - remotes::install_github( - "Breeding-Insight/AlloMate", - upgrade = "never", - ref = "development", - quiet = FALSE - ) - incProgress(0.9, detail = "Verifying...") - ok <- requireNamespace("AlloMate", quietly = TRUE) - incProgress(1, detail = "Done") - }, error = function(e) { - err_msg <<- conditionMessage(e) - }), + ), message = capture_msg ) }) @@ -741,15 +816,22 @@ mod_install_server <- function(input, output, session, parent_session){ allomate_installed(TRUE) showNotification("AlloMate installed successfully.", type = "message", duration = 8) output$install_log_allomate <- renderUI(HTML( - paste0(if (length(log_lines)) paste0('
', paste(log_lines, collapse=""), ''), - 'AlloMate installation completed. Restart the app to load AlloMate features.') + paste0( + if (length(log_lines)) paste0('
', paste(log_lines, collapse = ""), ""), + 'AlloMate installation completed. Restart the app to load AlloMate features.' + ) )) } else { showNotification("AlloMate installation failed. See log below.", type = "error", duration = NULL) output$install_log_allomate <- renderUI( - pre(style = "font-size:11px; white-space:pre-wrap; color:#c62828;", - if (is.null(err_msg)) "Unknown error (check server permissions/logs)." else - paste(c(log_lines, err_msg), collapse = "")) + pre( + style = "font-size:11px; white-space:pre-wrap; color:#c62828;", + if (is.null(err_msg)) { + "Unknown error (check server permissions/logs)." + } else { + paste(c(log_lines, err_msg), collapse = "") + } + ) ) } }) @@ -757,40 +839,44 @@ mod_install_server <- function(input, output, session, parent_session){ # --- BIGapp installation ----------------------------------------------- observeEvent(input$install_bigapp, { err_msg <- NULL - ok <- FALSE + ok <- FALSE log_lines <- character(0) output$install_log_BIGapp <- renderUI(NULL) withProgress(message = "Installing BIGapp", value = 0, { - capture_msg <- function(m) { log_lines <<- c(log_lines, conditionMessage(m)) output$install_log_BIGapp <- renderUI( - pre(style = "font-size:11px; white-space:pre-wrap;", - paste(log_lines, collapse = "")) + pre( + style = "font-size:11px; white-space:pre-wrap;", + paste(log_lines, collapse = "") + ) ) invokeRestart("muffleMessage") } withCallingHandlers( - tryCatch({ - if (!requireNamespace("remotes", quietly = TRUE)) { - incProgress(0.05, detail = "Installing remotes...") - install.packages("remotes") + tryCatch( + { + if (!requireNamespace("remotes", quietly = TRUE)) { + incProgress(0.05, detail = "Installing remotes...") + install.packages("remotes") + } + incProgress(0.1, detail = "Contacting GitHub...") + remotes::install_github( + "Breeding-Insight/BIGapp", + upgrade = "never", + quiet = FALSE + ) + incProgress(0.9, detail = "Verifying...") + ok <- requireNamespace("BIGapp", quietly = TRUE) + incProgress(1, detail = "Done") + }, + error = function(e) { + err_msg <<- conditionMessage(e) } - incProgress(0.1, detail = "Contacting GitHub...") - remotes::install_github( - "Breeding-Insight/BIGapp", - upgrade = "never", - quiet = FALSE - ) - incProgress(0.9, detail = "Verifying...") - ok <- requireNamespace("BIGapp", quietly = TRUE) - incProgress(1, detail = "Done") - }, error = function(e) { - err_msg <<- conditionMessage(e) - }), + ), message = capture_msg ) }) @@ -799,15 +885,22 @@ mod_install_server <- function(input, output, session, parent_session){ bigapp_installed(TRUE) showNotification("BIGapp installed successfully.", type = "message", duration = 8) output$install_log_BIGapp <- renderUI(HTML( - paste0(if (length(log_lines)) paste0('
', paste(log_lines, collapse=""), ''), - 'BIGapp installation completed. Restart the app to load BIGapp features.') + paste0( + if (length(log_lines)) paste0('
', paste(log_lines, collapse = ""), ""), + 'BIGapp installation completed. Restart the app to load BIGapp features.' + ) )) } else { showNotification("BIGapp installation failed. See log below.", type = "error", duration = NULL) output$install_log_BIGapp <- renderUI( - pre(style = "font-size:11px; white-space:pre-wrap; color:#c62828;", - if (is.null(err_msg)) "Unknown error (check server permissions/logs)." else - paste(c(log_lines, err_msg), collapse = "")) + pre( + style = "font-size:11px; white-space:pre-wrap; color:#c62828;", + if (is.null(err_msg)) { + "Unknown error (check server permissions/logs)." + } else { + paste(c(log_lines, err_msg), collapse = "") + } + ) ) } }) @@ -815,40 +908,44 @@ mod_install_server <- function(input, output, session, parent_session){ # --- GenoBrew installation ---------------------------------------------- observeEvent(input$install_genobrew, { err_msg <- NULL - ok <- FALSE + ok <- FALSE log_lines <- character(0) output$install_log_genobrew <- renderUI(NULL) withProgress(message = "Installing GenoBrew", value = 0, { - capture_msg <- function(m) { log_lines <<- c(log_lines, conditionMessage(m)) output$install_log_genobrew <- renderUI( - pre(style = "font-size:11px; white-space:pre-wrap;", - paste(log_lines, collapse = "")) + pre( + style = "font-size:11px; white-space:pre-wrap;", + paste(log_lines, collapse = "") + ) ) invokeRestart("muffleMessage") } withCallingHandlers( - tryCatch({ - if (!requireNamespace("remotes", quietly = TRUE)) { - incProgress(0.05, detail = "Installing remotes...") - install.packages("remotes") + tryCatch( + { + if (!requireNamespace("remotes", quietly = TRUE)) { + incProgress(0.05, detail = "Installing remotes...") + install.packages("remotes") + } + incProgress(0.1, detail = "Contacting GitHub...") + remotes::install_github( + "Breeding-Insight/GenoBrew", + upgrade = "never", + quiet = FALSE + ) + incProgress(0.9, detail = "Verifying...") + ok <- requireNamespace("GenoBrew", quietly = TRUE) + incProgress(1, detail = "Done") + }, + error = function(e) { + err_msg <<- conditionMessage(e) } - incProgress(0.1, detail = "Contacting GitHub...") - remotes::install_github( - "Breeding-Insight/GenoBrew", - upgrade = "never", - quiet = FALSE - ) - incProgress(0.9, detail = "Verifying...") - ok <- requireNamespace("GenoBrew", quietly = TRUE) - incProgress(1, detail = "Done") - }, error = function(e) { - err_msg <<- conditionMessage(e) - }), + ), message = capture_msg ) }) @@ -857,20 +954,25 @@ mod_install_server <- function(input, output, session, parent_session){ genobrew_installed(TRUE) showNotification("GenoBrew installed successfully.", type = "message", duration = 8) output$install_log_genobrew <- renderUI(HTML( - paste0(if (length(log_lines)) paste0('
', paste(log_lines, collapse=""), ''), - 'GenoBrew installation completed. Restart the app to load GenoBrew features.') + paste0( + if (length(log_lines)) paste0('
', paste(log_lines, collapse = ""), ""), + 'GenoBrew installation completed. Restart the app to load GenoBrew features.' + ) )) } else { showNotification("GenoBrew installation failed. See log below.", type = "error", duration = NULL) output$install_log_genobrew <- renderUI( - pre(style = "font-size:11px; white-space:pre-wrap; color:#c62828;", - if (is.null(err_msg)) "Unknown error (check server permissions/logs)." else - paste(c(log_lines, err_msg), collapse = "")) + pre( + style = "font-size:11px; white-space:pre-wrap; color:#c62828;", + if (is.null(err_msg)) { + "Unknown error (check server permissions/logs)." + } else { + paste(c(log_lines, err_msg), collapse = "") + } + ) ) } }) - - } ## To be copied in the UI diff --git a/inst/app/www/cran_logo.png b/inst/app/www/cran_logo.png new file mode 100644 index 0000000..a52c192 Binary files /dev/null and b/inst/app/www/cran_logo.png differ diff --git a/inst/app/www/custom.css b/inst/app/www/custom.css index 5cb9856..dd25a53 100644 --- a/inst/app/www/custom.css +++ b/inst/app/www/custom.css @@ -1,451 +1,621 @@ /* ── Custom Box Colors ── */ + + +/* ── Card header cursor ── */ +.card-header { cursor: pointer; } +.card-tools { cursor: default; } + :root { - --azure-core: #48A9C5; - --azure-lite: #B5DDE8; - --azure-deep: #2A6576; - --green-core: #319B42; - --green-lite: #A3D9AC; - --green-deep: #1E5D28; - --yellow-core: #EFB526; - --yellow-lite: #F9E1A8; - --yellow-deep: #8F6D17; - --grey-core: #707372; - --grey-lite: #C8CACA; - --grey-deep: #434544; - --purple-core: #512C85; - --purple-lite: #A896C2; - --purple-deep: #311A50; - --red-core: #E43F4F; - --red-lite: #F2A7AE; - --red-deep: #8E1E2A; - --saddleBrown: #8B4513; - --rosybrown: #BC8F8F; - --coral: #FF7F50; - --lightcoral: #F08080; - --darkorange: #FF8C00; -} - -/* Override all bs4Dash status colors with custom colors */ +--azure-core: #48A9C5; +--azure-lite: #B5DDE8; +--azure-deep: #2A6576; +--green-core: #319B42; +--green-lite: #A3D9AC; +--green-deep: #1E5D28; +--yellow-core: #EFB526; +--yellow-lite: #F9E1A8; +--yellow-deep: #8F6D17; +--grey-core: #707372; +--grey-lite: #C8CACA; +--grey-deep: #434544; +--purple-core: #512C85; +--purple-lite: #A896C2; +--purple-deep: #311A50; +--red-core: #E43F4F; +--red-lite: #F2A7AE; +--red-deep: #8E1E2A; +--saddleBrown: #8B4513; +--rosybrown: #BC8F8F; +--coral: #FF7F50; +--lightcoral: #F08080; +--darkorange: #FF8C00; +} + + +/* Override all bs4Dash status colors with custom colors - solidHeader = TRUE */ + /* Info -> Azure Core */ -.card-info:not(.card-outline) .card-header { - background-color: var(--azure-core) !important; - color: white !important; - border: none !important; - margin: -1px -1px 0 -1px !important; +.card-info:not(.card-outline) > .card-header { +background-color: var(--azure-core) !important; +color: white !important; +border: none !important; +margin: -1px -1px 0 -1px !important; } .card-info:not(.card-outline) { - border-top: 3px solid var(--azure-core) !important; +border-top: 3px solid var(--azure-core) !important; } + /* Secondary -> Grey Core */ -.card-secondary:not(.card-outline) .card-header { - background-color: var(--grey-core) !important; - color: white !important; - border: none !important; - margin: -1px -1px 0 -1px !important; +.card-secondary:not(.card-outline) > .card-header { +background-color: var(--grey-core) !important; +color: white !important; +border: none !important; +margin: -1px -1px 0 -1px !important; } .card-secondary:not(.card-outline) { - border-top: 3px solid var(--grey-core) !important; +border-top: 3px solid var(--grey-core) !important; } + /* Primary -> Azure Lite */ -.card-primary .card-header { - background-color: var(--azure-lite) !important; - color: #333 !important; - border: none !important; - margin: -1px -1px 0 -1px !important; +.card-primary:not(.card-outline) > .card-header { +background-color: var(--azure-lite) !important; +color: #333 !important; +border: none !important; +margin: -1px -1px 0 -1px !important; } .card-primary:not(.card-outline) { - border-top: 3px solid var(--azure-lite) !important; +border-top: 3px solid var(--azure-lite) !important; } + /* Success -> Green Core */ -.card-success:not(.card-outline) .card-header { - background-color: var(--green-core) !important; - color: white !important; - border: none !important; - margin: -1px -1px 0 -1px !important; +.card-success:not(.card-outline) > .card-header { +background-color: var(--green-core) !important; +color: white !important; +border: none !important; +margin: -1px -1px 0 -1px !important; } .card-success:not(.card-outline) { - border-top: 3px solid var(--green-core) !important; +border-top: 3px solid var(--green-core) !important; } + /* Warning -> Yellow Core */ -.card-warning:not(.card-outline) .card-header { - background-color: var(--yellow-core) !important; - color: #333 !important; - border: none !important; - margin: -1px -1px 0 -1px !important; +.card-warning:not(.card-outline) > .card-header { +background-color: var(--yellow-core) !important; +color: #333 !important; +border: none !important; +margin: -1px -1px 0 -1px !important; } .card-warning:not(.card-outline) { - border-top: 3px solid var(--yellow-core) !important; +border-top: 3px solid var(--yellow-core) !important; } + /* Danger -> Red Core */ -.card-danger:not(.card-outline) .card-header { - background-color: var(--red-core) !important; - color: white !important; - border: none !important; - margin: -1px -1px 0 -1px !important; +.card-danger:not(.card-outline) > .card-header { +background-color: var(--red-core) !important; +color: white !important; +border: none !important; +margin: -1px -1px 0 -1px !important; } .card-danger:not(.card-outline) { - border-top: 3px solid var(--red-core) !important; +border-top: 3px solid var(--red-core) !important; } + /* Gray-dark -> Grey Deep */ -.card-gray-dark:not(.card-outline) .card-header { - background-color: var(--grey-deep) !important; - color: white !important; - border: none !important; - margin: -1px -1px 0 -1px !important; +.card-gray-dark:not(.card-outline) > .card-header { +background-color: var(--grey-deep) !important; +color: white !important; +border: none !important; +margin: -1px -1px 0 -1px !important; } .card-gray-dark:not(.card-outline) { - border-top: 3px solid var(--grey-deep) !important; +border-top: 3px solid var(--grey-deep) !important; } + /* Gray -> Grey Lite */ -.card-gray:not(.card-outline) .card-header { - background-color: var(--grey-lite) !important; - color: #333 !important; - border: none !important; - margin: -1px -1px 0 -1px !important; +.card-gray:not(.card-outline) > .card-header { +background-color: var(--grey-lite) !important; +color: #333 !important; +border: none !important; +margin: -1px -1px 0 -1px !important; } .card-gray:not(.card-outline) { - border-top: 3px solid var(--grey-lite) !important; +border-top: 3px solid var(--grey-lite) !important; } + /* Indigo -> Purple Core */ -.card-indigo:not(.card-outline) .card-header { - background-color: var(--purple-core) !important; - color: white !important; - border: none !important; - margin: -1px -1px 0 -1px !important; +.card-indigo:not(.card-outline) > .card-header { +background-color: var(--purple-core) !important; +color: white !important; +border: none !important; +margin: -1px -1px 0 -1px !important; } .card-indigo:not(.card-outline) { - border-top: 3px solid var(--purple-core) !important; +border-top: 3px solid var(--purple-core) !important; } + /* Lightblue -> Azure Deep */ -.card-lightblue:not(.card-outline) .card-header { - background-color: var(--azure-deep) !important; - color: white !important; - border: none !important; - margin: -1px -1px 0 -1px !important; +.card-lightblue:not(.card-outline) > .card-header { +background-color: var(--azure-deep) !important; +color: white !important; +border: none !important; +margin: -1px -1px 0 -1px !important; } .card-lightblue:not(.card-outline) { - border-top: 3px solid var(--azure-deep) !important; +border-top: 3px solid var(--azure-deep) !important; } + /* Navy -> Saddle Brown */ -.card-navy:not(.card-outline) .card-header { - background-color: var(--saddleBrown) !important; - color: white !important; - border: none !important; - margin: -1px -1px 0 -1px !important; +.card-navy:not(.card-outline) > .card-header { +background-color: var(--saddleBrown) !important; +color: white !important; +border: none !important; +margin: -1px -1px 0 -1px !important; } .card-navy:not(.card-outline) { - border-top: 3px solid var(--saddleBrown) !important; +border-top: 3px solid var(--saddleBrown) !important; } + /* Purple -> Purple Lite */ -.card-purple:not(.card-outline) .card-header { - background-color: var(--purple-lite) !important; - color: #333 !important; - border: none !important; - margin: -1px -1px 0 -1px !important; +.card-purple:not(.card-outline) > .card-header { +background-color: var(--purple-lite) !important; +color: #333 !important; +border: none !important; +margin: -1px -1px 0 -1px !important; } .card-purple:not(.card-outline) { - border-top: 3px solid var(--purple-lite) !important; +border-top: 3px solid var(--purple-lite) !important; } + /* Fuchsia -> Purple Deep */ -.card-fuchsia:not(.card-outline) .card-header { - background-color: var(--purple-deep) !important; - color: white !important; - border: none !important; - margin: -1px -1px 0 -1px !important; +.card-fuchsia:not(.card-outline) > .card-header { +background-color: var(--purple-deep) !important; +color: white !important; +border: none !important; +margin: -1px -1px 0 -1px !important; } .card-fuchsia:not(.card-outline) { - border-top: 3px solid var(--purple-deep) !important; +border-top: 3px solid var(--purple-deep) !important; } + /* Pink -> Red Lite */ -.card-pink:not(.card-outline) .card-header { - background-color: var(--red-lite) !important; - color: #333 !important; - border-top-left-radius: 0.25rem !important; - border-top-right-radius: 0.25rem !important; +.card-pink:not(.card-outline) > .card-header { +background-color: var(--red-lite) !important; +color: #333 !important; +border-top-left-radius: 0.25rem !important; +border-top-right-radius: 0.25rem !important; } .card-pink:not(.card-outline) { - border-top: 3px solid var(--red-lite) !important; +border-top: 3px solid var(--red-lite) !important; } + /* Maroon -> Red Deep */ -.card-maroon:not(.card-outline) .card-header { - background-color: var(--red-deep) !important; - color: white !important; - border: none !important; - margin: -1px -1px 0 -1px !important; +.card-maroon:not(.card-outline) > .card-header { +background-color: var(--red-deep) !important; +color: white !important; +border: none !important; +margin: -1px -1px 0 -1px !important; } .card-maroon:not(.card-outline) { - border-top: 3px solid var(--red-deep) !important; +border-top: 3px solid var(--red-deep) !important; } + /* Orange -> Yellow Deep */ -.card-orange:not(.card-outline) .card-header { - background-color: var(--yellow-deep) !important; - color: white !important; - border: none !important; - margin: -1px -1px 0 -1px !important; +.card-orange:not(.card-outline) > .card-header { +background-color: var(--yellow-deep) !important; +color: white !important; +border: none !important; +margin: -1px -1px 0 -1px !important; } .card-orange:not(.card-outline) { - border-top: 3px solid var(--yellow-deep) !important; +border-top: 3px solid var(--yellow-deep) !important; } + /* Lime -> Green Lite */ -.card-lime:not(.card-outline) .card-header { - background-color: var(--green-lite) !important; - color: #333 !important; - border: none !important; - margin: -1px -1px 0 -1px !important; +.card-lime:not(.card-outline) > .card-header { +background-color: var(--green-lite) !important; +color: #333 !important; +border: none !important; +margin: -1px -1px 0 -1px !important; } .card-lime:not(.card-outline) { - border-top: 3px solid var(--green-lite) !important; +border-top: 3px solid var(--green-lite) !important; } + /* Teal -> Yellow Lite */ -.card-teal:not(.card-outline) .card-header { - background-color: var(--yellow-lite) !important; - color: #333 !important; - border: none !important; - margin: -1px -1px 0 -1px !important; +.card-teal:not(.card-outline) > .card-header { +background-color: var(--yellow-lite) !important; +color: #333 !important; +border: none !important; +margin: -1px -1px 0 -1px !important; } .card-teal:not(.card-outline) { - border-top: 3px solid var(--yellow-lite) !important; +border-top: 3px solid var(--yellow-lite) !important; } + /* Olive -> Green Deep */ -.card-olive:not(.card-outline) .card-header { - background-color: var(--green-deep) !important; - color: white !important; - border: none !important; - margin: -1px -1px 0 -1px !important; +.card-olive:not(.card-outline) > .card-header { +background-color: var(--green-deep) !important; +color: white !important; +border: none !important; +margin: -1px -1px 0 -1px !important; } .card-olive:not(.card-outline) { - border-top: 3px solid var(--green-deep) !important; +border-top: 3px solid var(--green-deep) !important; +} + + +/* ── Custom colors for solidHeader = FALSE (card-outline) ── */ + +/* Info -> Azure Core */ +.card-info.card-outline { +border-top: 3px solid var(--azure-core) !important; +} + +/* Secondary -> Grey Core */ +.card-secondary.card-outline { +border-top: 3px solid var(--grey-core) !important; +} + +/* Primary -> Azure Lite */ +.card-primary.card-outline { +border-top: 3px solid var(--azure-lite) !important; +} + +/* Success -> Green Core */ +.card-success.card-outline { +border-top: 3px solid var(--green-core) !important; +} + +/* Warning -> Yellow Core */ +.card-warning.card-outline { +border-top: 3px solid var(--yellow-core) !important; +} + +/* Danger -> Red Core */ +.card-danger.card-outline { +border-top: 3px solid var(--red-core) !important; +} + +/* Gray-dark -> Grey Deep */ +.card-gray-dark.card-outline { +border-top: 3px solid var(--grey-deep) !important; +} + +/* Gray -> Grey Lite */ +.card-gray.card-outline { +border-top: 3px solid var(--grey-lite) !important; +} + +/* Indigo -> Purple Core */ +.card-indigo.card-outline { +border-top: 3px solid var(--purple-core) !important; +} + +/* Lightblue -> Azure Deep */ +.card-lightblue.card-outline { +border-top: 3px solid var(--azure-deep) !important; +} + +/* Navy -> Saddle Brown */ +.card-navy.card-outline { +border-top: 3px solid var(--saddleBrown) !important; +} + +/* Purple -> Purple Lite */ +.card-purple.card-outline { +border-top: 3px solid var(--purple-lite) !important; +} + +/* Fuchsia -> Purple Deep */ +.card-fuchsia.card-outline { +border-top: 3px solid var(--purple-deep) !important; +} + +/* Pink -> Red Lite */ +.card-pink.card-outline { +border-top: 3px solid var(--red-lite) !important; } +/* Maroon -> Red Deep */ +.card-maroon.card-outline { +border-top: 3px solid var(--red-deep) !important; +} + +/* Orange -> Yellow Deep */ +.card-orange.card-outline { +border-top: 3px solid var(--yellow-deep) !important; +} + +/* Lime -> Green Lite */ +.card-lime.card-outline { +border-top: 3px solid var(--green-lite) !important; +} + +/* Teal -> Yellow Lite */ +.card-teal.card-outline { +border-top: 3px solid var(--yellow-lite) !important; +} + +/* Olive -> Green Deep */ +.card-olive.card-outline { +border-top: 3px solid var(--green-deep) !important; +} /* ── ValueBox Gradient Color Overrides ── */ + /* Info -> Azure Core */ .small-box.bg-gradient-info { - background: linear-gradient(135deg, var(--azure-core), var(--azure-deep)) !important; - color: white !important; +background: linear-gradient(135deg, var(--azure-core), var(--azure-deep)) !important; +color: white !important; } .small-box.bg-gradient-info .icon { - color: rgba(255,255,255,0.3) !important; +color: rgba(255,255,255,0.3) !important; } + /* Secondary -> Grey Core */ .small-box.bg-gradient-secondary { - background: linear-gradient(135deg, var(--grey-core), var(--grey-deep)) !important; - color: white !important; +background: linear-gradient(135deg, var(--grey-core), var(--grey-deep)) !important; +color: white !important; } .small-box.bg-gradient-secondary .icon { - color: rgba(255,255,255,0.3) !important; +color: rgba(255,255,255,0.3) !important; } + /* Info -> Azure Lite */ .small-box.bg-gradient-primary { - background: linear-gradient(135deg, var(--azure-lite), var(--azure-core)) !important; - color: #333 !important; +background: linear-gradient(135deg, var(--azure-lite), var(--azure-core)) !important; +color: #333 !important; } .small-box.bg-gradient-primary .icon { - color: rgba(51,51,51,0.3) !important; +color: rgba(51,51,51,0.3) !important; } + /* Success -> Green Core */ .small-box.bg-gradient-success { - background: linear-gradient(135deg, var(--green-core), var(--green-deep)) !important; - color: white !important; +background: linear-gradient(135deg, var(--green-core), var(--green-deep)) !important; +color: white !important; } .small-box.bg-gradient-success .icon { - color: rgba(255,255,255,0.3) !important; +color: rgba(255,255,255,0.3) !important; } + /* Warning -> Yellow Core */ .small-box.bg-gradient-warning { - background: linear-gradient(135deg, var(--yellow-core), var(--yellow-deep)) !important; - color: #333 !important; +background: linear-gradient(135deg, var(--yellow-core), var(--yellow-deep)) !important; +color: #333 !important; } .small-box.bg-gradient-warning .icon { - color: rgba(51,51,51,0.3) !important; +color: rgba(51,51,51,0.3) !important; } + /* Danger -> Red Core */ .small-box.bg-gradient-danger { - background: linear-gradient(135deg, var(--red-core), var(--red-deep)) !important; - color: white !important; +background: linear-gradient(135deg, var(--red-core), var(--red-deep)) !important; +color: white !important; } .small-box.bg-gradient-danger .icon { - color: rgba(255,255,255,0.3) !important; +color: rgba(255,255,255,0.3) !important; } + /* Navy -> Saddle Brown */ .small-box.bg-gradient-navy { - background: linear-gradient(135deg, var(--saddleBrown), #5d2f0a) !important; - color: white !important; +background: linear-gradient(135deg, var(--saddleBrown), #5d2f0a) !important; +color: white !important; } .small-box.bg-gradient-navy .icon { - color: rgba(255,255,255,0.3) !important; +color: rgba(255,255,255,0.3) !important; } + /* Continue for all other colors... */ .small-box.bg-gradient-indigo { - background: linear-gradient(135deg, var(--purple-core), var(--purple-deep)) !important; - color: white !important; +background: linear-gradient(135deg, var(--purple-core), var(--purple-deep)) !important; +color: white !important; } .small-box.bg-gradient-indigo .icon { - color: rgba(255,255,255,0.3) !important; +color: rgba(255,255,255,0.3) !important; } + /* ── Sidebar Active Menu Item ── */ /* Colors are driven by --sidebar-* variables set in app_ui.R */ :root { - --sidebar-core: var(--azure-core); - --sidebar-lite: var(--azure-lite); - --sidebar-deep: var(--azure-deep); +--sidebar-core: var(--azure-core); +--sidebar-lite: var(--azure-lite); +--sidebar-deep: var(--azure-deep); } + .main-sidebar .nav-sidebar .nav-item.active .nav-link, .main-sidebar .nav-sidebar .nav-item .nav-link.active { - background-color: var(--sidebar-core) !important; - color: white !important; +background-color: var(--sidebar-core) !important; +color: white !important; } + /* Hover effect for menu items */ .main-sidebar .nav-sidebar .nav-item .nav-link:hover { - background-color: var(--sidebar-lite) !important; - color: #333 !important; +background-color: var(--sidebar-lite) !important; +color: #333 !important; } + /* Active menu item icon */ .main-sidebar .nav-sidebar .nav-item.active .nav-link .nav-icon, .main-sidebar .nav-sidebar .nav-item .nav-link.active .nav-icon { - color: white !important; +color: white !important; } + /* For expanded menu items */ .main-sidebar .nav-sidebar .nav-treeview .nav-item.active .nav-link, .main-sidebar .nav-sidebar .nav-treeview .nav-item .nav-link.active { - background-color: var(--sidebar-deep) !important; - color: white !important; +background-color: var(--sidebar-deep) !important; +color: white !important; } + -/* ── Select Samples tabsetPanel (By Sample / By Family) */ +/* ── Select Samples tabsetPanel (By Sample / By Family) - GENERAL STYLING FOR ALL TABS */ + /* inactive tab - grey background */ +.nav-tabs > li > a:not(.active), #cnv_1-sample_select_tabs > li > a:not(.active) { - padding: 7px 22px !important; - margin-right: 6px !important; - background-color: #e9ecef !important; - border: 1px solid #dee2e6 !important; - border-bottom: none !important; - border-radius: 4px 4px 0 0 !important; - font-weight: 500 !important; - color: #495057 !important; +padding: 7px 22px !important; +margin-right: 6px !important; +background-color: #e9ecef !important; +border: 1px solid #dee2e6 !important; +border-bottom: none !important; +border-radius: 4px 4px 0 0 !important; +font-weight: 500 !important; +color: #495057 !important; } + /* active tab */ +.nav-tabs > li > a.active, #cnv_1-sample_select_tabs > li > a.active { - padding: 7px 22px !important; - margin-right: 6px !important; - background-color: #ffffff !important; - border: 1px solid #dee2e6 !important; - border-bottom: 1px solid #ffffff !important; - border-radius: 4px 4px 0 0 !important; - font-weight: 600 !important; - color: #007bff !important; +padding: 7px 22px !important; +margin-right: 6px !important; +background-color: #ffffff !important; +border: 1px solid #dee2e6 !important; +border-bottom: 1px solid #ffffff !important; +border-radius: 4px 4px 0 0 !important; +font-weight: 600 !important; +color: #007bff !important; } + /* hover on inactive tab */ +.nav-tabs > li > a:not(.active):hover, #cnv_1-sample_select_tabs > li > a:not(.active):hover { - background-color: #d6d8db !important; - color: #343a40 !important; +background-color: #d6d8db !important; +color: #343a40 !important; } + /* ── Ensure box collapse/expand buttons are always visible ── */ .card-tools { - position: relative; - z-index: 10; - color: black; +position: relative; +z-index: 10; +color: black; } + /* ── Dashboard footer ── */ .main-footer { - background-color: white; - color: grey; - height: 65px; - padding-top: 5px; - padding-bottom: 5px; +background-color: white; +color: grey; +height: 65px; +padding-top: 5px; +padding-bottom: 5px; } + .main-footer a { - color: grey; +color: grey; } + #MainMenu .header { - color: grey; - margin-top: 10px; - margin-bottom: 10px; - padding-left: 15px; +color: grey; +margin-top: 10px; +margin-bottom: 10px; +padding-left: 15px; } + /* ── Most specific selector for AdminLTE override ── */ .nav.nav-pills.nav-sidebar.flex-column.sidebar-menu .header { - color: grey; - margin-top: 10px; - margin-bottom: 10px; - padding-left: 15px; +color: grey; +margin-top: 10px; +margin-bottom: 10px; +padding-left: 15px; } + /* ── Footer styling ── */ .dashboard-footer-right { - display: flex; - align-items: center; +display: flex; +align-items: center; } + .dashboard-footer-text { - display: flex; - flex-direction: column; - margin-right: 15px; - text-align: right; +display: flex; +flex-direction: column; +margin-right: 15px; +text-align: right; } + .dashboard-footer-logo { - margin-right: 15px; +margin-right: 15px; } + .dashboard-footer-left { - display: flex; - align-items: center; - height: 100%; +display: flex; +align-items: center; +height: 100%; } + /* ── Ensure box collapse/expand buttons are always on top ── */ -.card-tools { - position: relative; - z-index: 10; -} - /* Make collapse/expand icons visible on white box headers */ -.card-tools .btn-tool { - color: #495057 !important; -} - -.card-tools .btn-tool:hover { - color: #212529 !important; +.card-tools .btn-tool { +color: #495057 !important; +} + + +.card-tools .btn-tool:hover { +color: #212529 !important; +} + + +/* ── Link to skip to main text for keyboard and screen reader nav ── */ +/* Hidden until focused on */ +.skip-link { +background: var(--azure-deep); +color: white; +font-weight: 700; +left: 50%; +padding: 4px; +position: fixed; +top: 0; +z-index: 9999; +transform: translateY(-150%); +transition: transform 0.3s; +} + + +.skip-link:focus { +transform: translateY(0%); } \ No newline at end of file diff --git a/inst/app/www/custom.js b/inst/app/www/custom.js index f638789..6b7e55c 100644 --- a/inst/app/www/custom.js +++ b/inst/app/www/custom.js @@ -10,32 +10,17 @@ $(document).ready(function() { } } }); - - // Function to apply styles to card headers (both existing and new ones) - function styleCardHeaders() { - $('.card-header').css('cursor', 'pointer'); - $('.card-tools').css('cursor', 'default'); - } - - // Apply styles initially - styleCardHeaders(); - - // Watch for new elements and apply styles - var observer = new MutationObserver(function(mutations) { - mutations.forEach(function(mutation) { - if (mutation.addedNodes.length > 0) { - styleCardHeaders(); - } - }); + // Cursor styles for card headers are handled in custom.css + + // Tab script - Apply to ALL tabsetPanels + $('.nav-tabs li.active > a').addClass('active'); + + $(document).on('shown.bs.tab', '.nav-tabs a[data-toggle="tab"]', function(e) { + $('.nav-tabs a[data-toggle="tab"]').removeClass('active'); + $(e.target).addClass('active'); }); - // Start observing - observer.observe(document.body, { - childList: true, - subtree: true - }); - - // Your existing tab script + // Legacy specific tab script (kept for backwards compatibility) $('#cnv_1-sample_select_tabs li.active > a').addClass('active'); $(document).on('shown.bs.tab', '#cnv_1-sample_select_tabs a[data-toggle="tab"]', function(e) { diff --git a/inst/app/www/viewpoly_logo.png b/inst/app/www/viewpoly_logo.png new file mode 100644 index 0000000..694eb41 Binary files /dev/null and b/inst/app/www/viewpoly_logo.png differ