Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring #28

Merged
merged 16 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 37 additions & 33 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,46 +1,50 @@
Package: shinybrapps
Type: Package
Package: shinybrapps
Title: ShinyBrAPPs
Version: 27.8
Authors@R: c(
person("Jean-François", "Rami", email = "[email protected]", role = c("aut", "ctb", "cre")),
person("Alice", "Boizet", email = "[email protected]", role = c("aut", "ctb")),
person("Mariano", "Crimi", email = "[email protected]", role = c("aut", "ctb")),
person("Léo", "Valette", email = "[email protected]", role = c("aut"))
person("Jean-François", "Rami", email = "[email protected]", role = c("aut", "ctb", "cre")),
person("Alice", "Boizet", email = "[email protected]", role = c("aut", "ctb")),
person("Mariano", "Crimi", email = "[email protected]", role = c("aut", "ctb")),
person("Léo", "Valette", email = "[email protected]", role = c("aut"))
)
Description: ShinyBrAPPs
Shiny apps integrated to the Breeding Management System
Maintainer: Leo Valette <[email protected]>
Description: ShinyBrAPPs Shiny apps integrated to the Breeding Management
System.
License: GPL (>= 3)
Encoding: UTF-8
LazyData: true
Depends:
shiny,
shinyjs,
data.table,
ggplot2,
plotly,
R (>= 2.10),
data.table
Imports:
brapir,
brapirv2,
bslib,
DT,
gridExtra,
magrittr,
RColorBrewer,
e1071,
statgenSTA,
statgenGxE,
brapirv1,
brapirv2,
SpATS,
shinyWidgets,
shinybusy,
shinyBS,
varhandle,
ggnewscale,
ggplot2,
ggpubr,
ggExtra,
gridExtra,
gtools,
htmltools,
httr,
jsonlite,
leaflet,
rclipboard,
metan,
openxlsx,
plotly,
rclipboard,
rmarkdown,
scales,
shiny,
shinycssloaders,
gtools,
ggnewscale,
metan,
R (>= 2.10)
RoxygenNote: 7.1.1
shinyjs,
shinyWidgets,
statgenGxE,
statgenSTA,
stringmagic,
tidyr,
varhandle
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.3.2
53 changes: 51 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,3 +1,52 @@
exportPattern("^[[:alpha:]]+")
# Generated by roxygen2: do not edit by hand

export(get_env_data)
export(groupModal)
export(group_selector)
export(make_study_metadata)
export(mod_banner_server)
export(mod_banner_ui)
export(mod_dataquality_server)
export(mod_dataquality_ui)
export(mod_get_extradata_server)
export(mod_get_extradata_ui)
export(mod_get_studydata_server)
export(mod_get_studydata_ui)
export(mod_groups_sidebar_server)
export(mod_groups_sidebar_ui)
export(mod_gxe_server)
export(mod_gxe_ui)
export(mod_model_server)
export(mod_model_ui)
export(mod_scatterplot_server)
export(mod_scatterplot_ui)
export(mod_trialdataxplor_server)
export(mod_trialdataxplor_ui)
export(parse_api_url)
export(run_decision)
export(run_stabrapp)
export(run_test)
export(run_trialdataxplor)
export(select_from_layout)
export(shortest_interval)
import(brapirv2)
import(bslib)
import(statgenGxE)
import(data.table)
import(ggplot2)
import(leaflet)
import(plotly)
import(shiny)
import(shinyWidgets)
import(shinyjs)
import(statgenGxE)
import(statgenSTA)
importFrom(DT,JS)
importFrom(DT,dataTableProxy)
importFrom(DT,datatable)
importFrom(DT,formatRound)
importFrom(DT,formatStyle)
importFrom(DT,renderDT)
importFrom(ggpubr,get_legend)
importFrom(gridExtra,arrangeGrob)
importFrom(statgenSTA,createTD)
importFrom(varhandle,check.numeric)
2 changes: 1 addition & 1 deletion R/custom_input_genotype_groups.R
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function copyToClipboard(id, names) {
clearInterval(temp);
}, 2000 );
} else {
console.info( "document.execCommand went wrong…" )
console.info("document.execCommand went wrong…")
}

document.body.removeChild(dummy);
Expand Down
22 changes: 11 additions & 11 deletions R/module_banner.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ mod_banner_ui <- function(id){
}

#' @export
mod_banner_server <- function(id, rv){
mod_banner_server <- function(id, rv, appname){
moduleServer(
id,
function(input, output, session){
Expand All @@ -17,7 +17,7 @@ mod_banner_server <- function(id, rv){
style="border-radius: 6px;
width:129px;
height:34px;
margin-right:10px"),paste(rv$appname," - Study: ", paste(rv$data[,unique(trialName)], collapse = ", ")),
margin-right:10px"),paste(appname," - Study: ", paste(rv$data[,unique(trialName)], collapse = ", ")),
style="font: 500 20px/32px Roboto,Helvetica Neue,sans-serif;display: flex;justify-content: center;position: relative; z-index: 30;",
div(style="margin-left: auto;",
dropdown(
Expand All @@ -32,7 +32,7 @@ mod_banner_server <- function(id, rv){
#circle = FALSE,
#downloadBttn(ns("dwnld1"),label = "As csv", style = "minimal", size="xs"),
downloadButton(ns("dwnld1"),label = "As csv file"),
if (rv$appname!="BMS trial data explorer") downloadButton(ns("dwnld2"),label = "As TD object")
if (appname!="BMS trial data explorer") downloadButton(ns("dwnld2"),label = "As TD object")
))),
style = "padding: 2px 0 2px 10px;
width:100%;
Expand All @@ -51,14 +51,14 @@ mod_banner_server <- function(id, rv){
paste("data-", Sys.Date(), ".csv", sep="")
},
content = function(file) {
if (rv$appname=="DSBrAPP"){
write.csv(rv$data_plot, file, row.names = F)
if (appname=="DSBrAPP"){
write.csv(rv$extradata, file, row.names = F)
} else {
if (rv$appname=="STABrAPP"){
if (appname=="STABrAPP"){
write.csv(rv$data, file, row.names = F)
} else {
if (rv$appname=="BMS trial data explorer"){
write.csv(rv$data_dq[,-c("facetrows", "facetcols"), with=F], file, row.names = F)
if (appname=="BMS trial data explorer"){
write.csv(rv$data[,-c("facetrows", "facetcols"), with=F], file, row.names = F)
}
}
}
Expand All @@ -69,16 +69,16 @@ mod_banner_server <- function(id, rv){
paste("data-", Sys.Date(), ".Rdata", sep="")
},
content = function(file) {
if (rv$appname=="DSBrAPP"){
write.csv(rv$data_plot, file, row.names = F)
if (appname=="DSBrAPP"){
write.csv(rv$data, file, row.names = F)
if (is.null(rv$TD)){
showNotification("You must select a Trait and a Variable to use as Environment Name to form the TD object", type = "error", duration = notification_duration)
} else {
TD <- rv$TD
save(TD, file = file)
}
} else {
if (rv$appname=="STABrAPP"){
if (appname=="STABrAPP"){
if (is.null(rv$TD)){
showNotification("Please fit a model first", type = "error", duration = notification_duration)
} else {
Expand Down
Loading