diff --git a/components/board.upload/R/upload_module_preview_counts.R b/components/board.upload/R/upload_module_preview_counts.R
index af544ff34..78b0a1cba 100644
--- a/components/board.upload/R/upload_module_preview_counts.R
+++ b/components/board.upload/R/upload_module_preview_counts.R
@@ -13,24 +13,29 @@ upload_table_preview_counts_ui <- function(id) {
}
upload_table_preview_counts_server <- function(
- id,
- create_raw_dir,
- auth,
- uploaded,
- checked_matrix,
- is_logscale,
- checklist,
- scrollY,
- width,
- height,
- title,
- info.text,
- caption,
- upload_datatype,
- is.olink) {
+ id,
+ create_raw_dir,
+ auth,
+ uploaded,
+ checked_matrix,
+ is_logscale,
+ checklist,
+ scrollY,
+ width,
+ height,
+ title,
+ info.text,
+ caption,
+ upload_datatype,
+ is.olink,
+ public_dataset_id
+ ) {
moduleServer(id, function(input, output, session) {
+
ns <- session$ns
+ GEO_alert_shown <- reactiveVal(FALSE)
+
table_data <- shiny::reactive({
shiny::req(!is.null(uploaded$counts.csv))
dt <- uploaded$counts.csv
@@ -56,10 +61,8 @@ upload_table_preview_counts_server <- function(
table.RENDER <- function() {
dt <- table_data()
req(!is.null(dt))
-
is.integer <- is.integer(dt) || all(round(dt) == dt, na.rm = TRUE)
digits <- ifelse(is.integer, 0, 2)
-
DT::datatable(dt,
class = "compact hover",
rownames = TRUE,
@@ -80,6 +83,7 @@ upload_table_preview_counts_server <- function(
}
output$table_counts <- shiny::renderUI({
+
action_buttons <- div(
style = "display: flex; justify-content: left; margin: 8px;",
if (is.null(uploaded$counts.csv)) {
@@ -113,92 +117,31 @@ upload_table_preview_counts_server <- function(
)
)
- div(
- bslib::as_fill_carrier(),
- style = "width: 100%; display: flex; ",
- if (is.null(uploaded$counts.csv)) {
- if (upload_datatype() == "proteomics") {
- msg <- "The counts file (counts.csv) contains the gene counts for all samples. For proteomics data types other than Olink NPX, the file should be a tabular text file (.csv), where each row corresponds to a feature (i.e. genes) and each column corresponds to a sample. For Olink NPX, the uploaded file needs to be the standard Olink format."
- } else {
- msg <- "The counts file (counts.csv) contains the gene counts for all samples. The file should be a tabular text file (.csv), where each row corresponds to a feature (i.e. genes) and each column corresponds to a sample."
+ if (public_dataset_id() != "") {
+
+ ID <- public_dataset_id()
+ msg <- paste0("Retrieving ", ID, " from GEO, ReCount, or ArrayExpress...
", "Please wait. Most datasets take 2-3 mins.")
+
+ showModal(modalDialog(
+ div(id = "custom-progress-modal", HTML(msg),
+ div(id = "custom-progress-container",
+ div(id = "custom-progress-bar"))),
+ footer = NULL, fade = FALSE))
+ GEO <- tryCatch({ playbase::pgx.getGEOseries(accession = ID, archs.h5 = NULL, get.info = FALSE)},
+ error = function(w) { NULL })
+ removeModal()
+
+ if (!is.null(GEO)) {
+ if (!GEO_alert_shown()) {
+ msg <- paste0("Success! ", ID, " found in ", GEO[["source"]], ".\nWe're preparing it...")
+ GEO_alert_shown(TRUE)
}
- bslib::layout_columns(
- col_widths = c(-3, 6, -3),
- row_heights = list("auto", 8, 1, 2),
- gap = "0.5rem",
- bslib::as_fill_carrier(bs_alert(tspan(msg), closable = FALSE, translate_js = FALSE)),
- bslib::card(
- if (upload_datatype() == "multi-omics") {
- shiny::radioButtons(
- ns("data_source"),
- label = "Select input files from:",
- choices = c("multi-csv", "pgx", "single-csv"),
- selected = "multi-csv",
- inline = TRUE
- )
- },
- if (upload_datatype() == "multi-omics") {
- shiny::conditionalPanel(
- condition = sprintf("input['%s'] == 'pgx'", ns("data_source")),
- div(
- div(
- style = "margin-bottom: 15px;",
- shiny::radioButtons(
- ns("data_processing"),
- label = "Select data processing level:",
- choices = c("Raw" = "raw", "Normalized (also batch corrected if selected on computation)" = "normalized"),
- selected = "raw",
- inline = TRUE
- )
- ),
- div(
- style = "display: flex; align-items: center; gap: 10px; margin-bottom: 10px;",
- span("Selected:", style = "font-weight: bold;"),
- textOutput(ns("selected_rows_text")),
- ),
- div(
- style = "height: 350px; overflow-y: auto;",
- DT::DTOutput(ns("available_data_table"))
- ),
- style = "width: 100%; max-height: 400px; overflow-y: auto;"
- ),
- selection = "multiple",
- options = list(pageLength = 5, dom = "tp", scrollY = TRUE)
- )
- },
- if (upload_datatype() == "multi-omics") {
- shiny::conditionalPanel(
- condition = sprintf("input['%s'] == 'multi-csv'", ns("data_source")),
- shiny::uiOutput(ns("dynamic_file_inputs")) # ,
- )
- },
- if (upload_datatype() == "multi-omics") {
- shiny::conditionalPanel(
- condition = sprintf("input['%s'] == 'single-csv'", ns("data_source")),
- fileInputArea(
- ns("counts_csv"),
- shiny::h4(tspan("Upload counts.csv", js = FALSE), class = "mb-0"),
- multiple = FALSE,
- accept = c(".csv"),
- width = "100%"
- )
- )
- },
- if (upload_datatype() != "multi-omics") {
- fileInputArea(
- ns("counts_csv"),
- shiny::h4(tspan("Upload counts.csv", js = FALSE), class = "mb-0"),
- multiple = FALSE,
- accept = c(".csv"),
- width = "100%"
- )
- },
- style = "background-color: aliceblue; border: 0.07rem dashed steelblue;"
- ),
- action_buttons,
- br()
- )
- },
+ uploaded$counts.csv <- GEO[["counts"]]
+ uploaded$samples.csv <- GEO[["samples"]]
+ cm <- intersect(colnames(GEO[["counts"]]), rownames(GEO[["samples"]]))
+ GEO <- NULL
+ }
+
if (!is.null(uploaded$counts.csv)) {
bslib::layout_columns(
col_widths = 12,
@@ -222,8 +165,128 @@ upload_table_preview_counts_server <- function(
),
bslib::layout_columns(action_buttons, br(), uiOutput(ns("error_summary")))
)
- } ## end of if-else
- ) ## end of div
+ } else {
+ div("No counts data available for this public dataset.")
+ }
+
+ } else {
+ div(
+ bslib::as_fill_carrier(),
+ style = "width: 100%; display: flex; ",
+ if (is.null(uploaded$counts.csv)) {
+ if (upload_datatype() == "proteomics") {
+ msg <- "The counts file (counts.csv) contains the gene counts for all samples. For proteomics data types other than Olink NPX, the file should be a tabular text file (.csv), where each row corresponds to a feature (i.e. genes) and each column corresponds to a sample. For Olink NPX, the uploaded file needs to be the standard Olink format."
+ } else {
+ msg <- "The counts file (counts.csv) contains the gene counts for all samples. The file should be a tabular text file (.csv), where each row corresponds to a feature (i.e. genes) and each column corresponds to a sample."
+ }
+ bslib::layout_columns(
+ col_widths = c(-3, 6, -3),
+ row_heights = list("auto", 8, 1, 2),
+ gap = "0.5rem",
+ bslib::as_fill_carrier(bs_alert(tspan(msg), closable = FALSE, translate_js = FALSE)),
+ bslib::card(
+ if (upload_datatype() == "multi-omics") {
+ shiny::radioButtons(
+ ns("data_source"),
+ label = "Select input files from:",
+ choices = c("multi-csv", "pgx", "single-csv"),
+ selected = "multi-csv",
+ inline = TRUE
+ )
+ },
+ if (upload_datatype() == "multi-omics") {
+ shiny::conditionalPanel(
+ condition = sprintf("input['%s'] == 'pgx'", ns("data_source")),
+ div(
+ div(
+ style = "margin-bottom: 15px;",
+ shiny::radioButtons(
+ ns("data_processing"),
+ label = "Select data processing level:",
+ choices = c("Raw" = "raw", "Normalized (also batch corrected if selected on computation)" = "normalized"),
+ selected = "raw",
+ inline = TRUE
+ )
+ ),
+ div(
+ style = "display: flex; align-items: center; gap: 10px; margin-bottom: 10px;",
+ span("Selected:", style = "font-weight: bold;"),
+ textOutput(ns("selected_rows_text")),
+ ),
+ div(
+ style = "height: 350px; overflow-y: auto;",
+ DT::DTOutput(ns("available_data_table"))
+ ),
+ style = "width: 100%; max-height: 400px; overflow-y: auto;"
+ ),
+ selection = "multiple",
+ options = list(pageLength = 5, dom = "tp", scrollY = TRUE)
+ )
+ },
+
+ if (upload_datatype() == "multi-omics") {
+ shiny::conditionalPanel(
+ condition = sprintf("input['%s'] == 'multi-csv'", ns("data_source")),
+ shiny::uiOutput(ns("dynamic_file_inputs"))#,
+ )
+ },
+
+ if (upload_datatype() == "multi-omics") {
+ shiny::conditionalPanel(
+ condition = sprintf("input['%s'] == 'single-csv'", ns("data_source")),
+ fileInputArea(
+ ns("counts_csv"),
+ shiny::h4(tspan("Upload counts.csv", js = FALSE), class = "mb-0"),
+ multiple = FALSE,
+ accept = c(".csv"),
+ width = "100%"
+ )
+ )
+ },
+
+ if (upload_datatype() != "multi-omics") {
+ fileInputArea(
+ ns("counts_csv"),
+ shiny::h4(tspan("Upload counts.csv", js = FALSE), class = "mb-0"),
+ multiple = FALSE,
+ accept = c(".csv"),
+ width = "100%"
+ )
+ },
+
+ style = "background-color: aliceblue; border: 0.07rem dashed steelblue;"
+ ),
+ action_buttons,
+ br()
+ )
+ },
+ if (!is.null(uploaded$counts.csv)) {
+ bslib::layout_columns(
+ col_widths = 12,
+ bslib::layout_columns(
+ col_widths = c(8, 4),
+ TableModuleUI(
+ ns("counts_datasets"),
+ width = width,
+ height = height,
+ title = title,
+ info.text = info.text,
+ caption = caption,
+ label = "",
+ show.maximize = FALSE,
+ translate_js = FALSE
+ ),
+ bslib::navset_card_pill(
+ bslib::nav_panel(title = "Histogram", br(), plotOutput(ns("histogram"))),
+ bslib::nav_panel(title = "Box plots", br(), plotOutput(ns("boxplots")))
+ )
+ ),
+ bslib::layout_columns(action_buttons, br(), uiOutput(ns("error_summary")))
+ )
+ } ## end of if-else
+ ) ## end of div
+ }
+
})
output$selected_rows_text <- renderText({
@@ -487,7 +550,7 @@ upload_table_preview_counts_server <- function(
shinyalert::shinyalert(title = "Warning", text = err.html, html = TRUE)
}
})
-
+
# pass counts to uploaded when uploaded
observeEvent(input$counts_csv, {
# check if counts is csv (necessary due to drag and drop of any file)
@@ -530,6 +593,7 @@ upload_table_preview_counts_server <- function(
}
## ---counts---##
+
sel <- grep("count|expression|abundance|concentration", tolower(input$counts_csv$name))
if (length(sel)) {
datafile <- input$counts_csv$datapath[sel[1]]
@@ -691,3 +755,4 @@ upload_table_preview_counts_server <- function(
)
}) ## end of moduleServer
} ## end of server
+
diff --git a/components/board.upload/R/upload_module_preview_samples.R b/components/board.upload/R/upload_module_preview_samples.R
index 7bbd649b1..1737420b7 100644
--- a/components/board.upload/R/upload_module_preview_samples.R
+++ b/components/board.upload/R/upload_module_preview_samples.R
@@ -21,10 +21,20 @@ upload_table_preview_samples_server <- function(
title,
info.text,
caption,
- upload_datatype) {
+ upload_datatype,
+ public_dataset_id
+ ) {
+
moduleServer(id, function(input, output, session) {
ns <- session$ns
+ shiny::observe({
+ if (is.null(orig_sample_matrix()) && !is.null(uploaded$samples.csv)) {
+ orig_sample_matrix(uploaded$samples.csv)
+ loaded_samples(TRUE)
+ }
+ })
+
table_data <- shiny::reactive({
shiny::req(!is.null(uploaded$samples.csv))
dt <- orig_sample_matrix()
@@ -48,25 +58,31 @@ upload_table_preview_samples_server <- function(
colnames(dt)[ncol(dt)] <- paste0("[+", n1, " columns]")
}
loaded_samples(TRUE)
- dt
+ return(dt)
})
shiny::observeEvent(input$vars_selected, {
- if (all(input$vars_selected %in% colnames(orig_sample_matrix()))) {
+ dt_cols <- colnames(orig_sample_matrix())
+ if (all(input$vars_selected %in% dt_cols)) {
vars_selected(input$vars_selected)
}
})
-
- shiny::observeEvent(orig_sample_matrix(), {
- vars_selected(colnames(orig_sample_matrix()))
+
+ shiny::observe({
+ cols <- colnames(orig_sample_matrix())
+ current_selected <- vars_selected()
+ if (is.null(current_selected) || length(current_selected) == 0 || !all(current_selected %in% cols)) {
+ vars_selected(cols)
+ }
})
output$col_sel <- renderUI({
+ choices <- colnames(orig_sample_matrix())
shiny::checkboxGroupInput(
ns("vars_selected"),
label = "Retain variable:",
- choices = colnames(orig_sample_matrix()),
- selected = colnames(orig_sample_matrix()),
+ choices = choices,
+ selected = vars_selected(),
inline = TRUE
)
})
@@ -123,7 +139,7 @@ upload_table_preview_samples_server <- function(
div(
bslib::as_fill_carrier(),
- if (!loaded_samples()) {
+ if (!loaded_samples() && public_dataset_id() == "") {
bslib::layout_columns(
col_widths = c(-3, 6, -3),
row_heights = list("auto", 8, 1, 2),
diff --git a/components/board.upload/R/upload_server.R b/components/board.upload/R/upload_server.R
index 2d58759f8..08c4f2769 100644
--- a/components/board.upload/R/upload_server.R
+++ b/components/board.upload/R/upload_server.R
@@ -28,6 +28,7 @@ UploadBoard <- function(id,
upload_name <- reactiveVal(NULL)
upload_description <- reactiveVal(NULL)
upload_datatype <- reactiveVal(NULL)
+ public_dataset_id <- reactiveVal(NULL)
upload_gset_methods <- reactiveVal(NULL)
upload_gx_methods <- reactiveVal(NULL)
process_counter <- reactiveVal(0)
@@ -101,6 +102,7 @@ UploadBoard <- function(id,
names(all_species) <- paste0(all_species, " (", common_name, ")")
names(all_species)[all_species == "No organism"] <- ""
shiny::updateSelectizeInput(session, "selected_organism", choices = all_species, server = TRUE)
+ shiny::updateSelectizeInput(session, "selected_organism_public", choices = all_species, server = TRUE)
if (opt$ENABLE_MULTIOMICS) {
shiny::updateSelectizeInput(session, "selected_datatype", choices = c("RNA-seq", "mRNA microarray", "proteomics", "scRNA-seq", "metabolomics (beta)" = "metabolomics", "multi-omics (beta)" = "multi-omics"), selected = DEFAULTS$datatype)
@@ -132,6 +134,21 @@ UploadBoard <- function(id,
}
})
+ observeEvent(input$start_search, {
+ ID <- public_dataset_id()
+ if (ID != "") {
+ valid.ID <- playbase::is.GEO.id.valid(ID)
+ if (!valid.ID) {
+ msg <- paste0(ID, " seems not valid. Please use a valid dataset ID.")
+ shinyalert::shinyalert(text = msg, type = "error")
+ } else {
+ new_upload(new_upload() + 1)
+ }
+ } else {
+ shinyalert::shinyalert(text = "Please enter a dataset ID", type = "error")
+ }
+ })
+
## ============================================================================
## ================== NEW DATA UPLOAD =========================================
## ============================================================================
@@ -141,10 +158,10 @@ UploadBoard <- function(id,
uploaded_method <- NA
shiny::observeEvent(input$upload_files_btn,
- {
- shinyjs::click(id = "upload_files")
- },
- ignoreNULL = TRUE
+ {
+ shinyjs::click(id = "upload_files")
+ },
+ ignoreNULL = TRUE
)
shiny::observeEvent(uploaded_pgx(), {
@@ -248,16 +265,40 @@ UploadBoard <- function(id,
organism_checked <- reactiveVal(FALSE)
uploaded_counts <- shiny::eventReactive(
- {
- list(uploaded$counts.csv)
- },
- {
- ## --------------------------------------------------------
- ## Single matrix counts check
- ## --------------------------------------------------------
- df0 <- uploaded$counts.csv
- if (is.null(df0)) {
- return(NULL)
+ {
+ list(uploaded$counts.csv)
+ },
+ {
+ ## --------------------------------------------------------
+ ## Single matrix counts check
+ ## --------------------------------------------------------
+ df0 <- uploaded$counts.csv
+ if (is.null(df0)) return(NULL)
+
+ checked_for_log(FALSE)
+ res <- playbase::pgx.checkINPUT(df0, "COUNTS")
+ write_check_output(res$checks, "COUNTS", raw_dir())
+
+ olink <- is.olink()
+ if (olink) {
+ shinyalert::shinyalert(title = "Proteomics Olink NPX", type = "info")
+ checked_for_log(TRUE)
+ } else {
+ if ("e29" %in% names(res$checks)) {
+ shinyalert::shinyalert(
+ title = paste("Log-scale detected"),
+ text = 'Please confirm:',
+ html = TRUE,
+ confirmButtonText = "Yes",
+ showCancelButton = TRUE,
+ cancelButtonText = "No",
+ inputId = "logCorrectCounts",
+ closeOnEsc = FALSE,
+ immediate = FALSE,
+ callbackR = function(x) checked_for_log(TRUE)
+ )
+ } else {
+ checked_for_log(TRUE)
}
checked_for_log(FALSE)
@@ -286,10 +327,9 @@ UploadBoard <- function(id,
checked_for_log(TRUE)
}
}
-
- return(list(res = res, olink = olink))
}
- )
+ return(list(res = res, olink = olink))
+ })
checked_counts <- shiny::eventReactive(
{
@@ -499,11 +539,11 @@ UploadBoard <- function(id,
uploaded[["contrasts.csv"]] <<- NULL
}
- list(status = status, SAMPLES = res_samples, COUNTS = res_counts)
+ LL <- list(status = status, SAMPLES = res_samples, COUNTS = res_counts)
+ return(LL)
}
)
-
## --------------------------------------------------------
## Check contrast matrix
## --------------------------------------------------------
@@ -514,9 +554,7 @@ UploadBoard <- function(id,
{
## get uploaded counts
df0 <- uploaded$contrasts.csv
- if (is.null(df0)) {
- return(list(status = "Missing contrasts.csv", matrix = NULL))
- }
+ if (is.null(df0)) return(list(status = "Missing contrasts.csv", matrix = NULL))
## --------- Single matrix counts check----------
res <- playbase::pgx.checkINPUT(df0, "CONTRASTS")
@@ -583,6 +621,7 @@ UploadBoard <- function(id,
## Dynamic render of appropriate wizard
output$upload_wizard <- shiny::renderUI({
+
counts_ui <- wizardR::wizard_step(
step_title = tspan("Step 1: Upload counts", js = FALSE),
step_id = "step_counts",
@@ -600,7 +639,7 @@ UploadBoard <- function(id,
ns("samples_preview")
)
)
-
+
contrasts_ui <- wizardR::wizard_step(
step_title = "Step 3: Create comparisons",
step_id = "step_comparisons",
@@ -768,6 +807,20 @@ UploadBoard <- function(id,
upload_organism(input$selected_organism)
})
+ observeEvent(input$selected_datatype_public, {
+ upload_datatype(input$selected_datatype_public)
+ updateSelectInput(session, "selected_datatype", selected = input$selected_datatype_public)
+ })
+
+ observeEvent(input$selected_organism_public, {
+ upload_organism(input$selected_organism_public)
+ updateSelectInput(session, "selected_organism", selected = input$selected_organism_public)
+ })
+
+ observeEvent(input$dataset_identifier, {
+ public_dataset_id(input$dataset_identifier)
+ })
+
observeEvent(input$start_upload, {
recompute_pgx(NULL) ## need to reset ???
})
@@ -1225,7 +1278,6 @@ UploadBoard <- function(id,
}
)
-
## =====================================================================
## ======================== MODULES SERVERS ============================
## =====================================================================
@@ -1245,7 +1297,8 @@ UploadBoard <- function(id,
info.text = "This is the uploaded counts data.",
caption = "This is the uploaded counts data.",
upload_datatype = upload_datatype,
- is.olink = is.olink
+ is.olink = is.olink,
+ public_dataset_id = public_dataset_id ## accession ID
)
upload_table_preview_samples_server(
@@ -1261,7 +1314,8 @@ UploadBoard <- function(id,
title = "Uploaded Samples",
info.text = "This is the uploaded samples data.",
caption = "This is the uploaded samples data.",
- upload_datatype = upload_datatype
+ upload_datatype = upload_datatype,
+ public_dataset_id = public_dataset_id ## accession ID
)
modified_ct <- upload_table_preview_contrasts_server(
@@ -1368,8 +1422,6 @@ UploadBoard <- function(id,
probetype = probetype
)
-
-
## ------------------------------------------------
## Board return object
## ------------------------------------------------
diff --git a/components/board.upload/R/upload_ui.R b/components/board.upload/R/upload_ui.R
index 09e4fa911..fcb0fc3c5 100644
--- a/components/board.upload/R/upload_ui.R
+++ b/components/board.upload/R/upload_ui.R
@@ -12,38 +12,114 @@ UploadUI <- function(id) {
bslib::layout_columns(
fill = TRUE,
div(
- style = "display: flex; flex-direction: column; align-items: center; gap: 20px; margin-bottom: 150px; margin-top: 120px;",
- div(
- style = "width: 60%;",
- bs_alert("To upload your own data, you should prepare at least two CSV files: an counts.csv file (containing your experiment data) and a samples.csv file (containing your sample information). A third contrasts.csv file (describing your comparisons) is optional. Read more about data preparation here.", closable = FALSE, translate = TRUE, html = TRUE)
- ),
- br(),
- div(
- p("Data type:", style = "text-align: left; margin: 0 0 2px 0; font-weight: bold;"),
- shiny::selectInput(
- ns("selected_datatype"), NULL,
- choices = NULL,
- width = "400px"
+ style = "margin-top: 40px;",
+ tabsetPanel(
+ id = ns("upload_tabs"),
+ type = "tabs",
+ # Upload your own data tab
+ tabPanel(
+ "Upload your data",
+ value = "upload",
+ div(
+ style = "display: flex; flex-direction: column; align-items: center; gap: 20px; margin-bottom: 150px; margin-top: 40px;",
+ div(
+ style = "width: 60%;",
+ bs_alert("To upload your own data, you should prepare at least two CSV files: an counts.csv file (containing your experiment data) and a samples.csv file (containing your sample information). A third contrasts.csv file (describing your comparisons) is optional. Read more about data preparation here.", closable = FALSE, translate = TRUE, html = TRUE)
+ ),
+ br(),
+ div(
+ p("Data type:", style = "text-align: left; margin: 0 0 2px 0; font-weight: bold;"),
+ shiny::selectInput(
+ ns("selected_datatype"), NULL,
+ choices = c(
+ "RNA-seq",
+ "mRNA microarray",
+ "proteomics",
+ "scRNA-seq",
+ "metabolomics (beta)" = "metabolomics",
+ "multi-omics (beta)" = "multi-omics"
+ ),
+ selected = DEFAULTS$datatype,
+ width = "400px"
+ ),
+ shiny::uiOutput(ns("proteomics_subtype_ui"))
+ ),
+ div(
+ p("Organism:", style = "text-align: left; margin: 0 0 2px 0; font-weight: bold;"),
+ shiny::selectInput(
+ inputId = ns("selected_organism"),
+ label = NULL,
+ choices = NULL,
+ multiple = FALSE,
+ width = "400px"
+ )
+ ),
+ br(),
+ shiny::actionButton(
+ ns("start_upload"),
+ "Start upload",
+ class = "btn-primary"
+ ),
+ br()
+ )
),
- shiny::uiOutput(ns("proteomics_subtype_ui"))
- ),
- div(
- p("Organism:", style = "text-align: left; margin: 0 0 2px 0; font-weight: bold;"),
- shiny::selectInput(
- inputId = ns("selected_organism"),
- label = NULL,
- choices = NULL,
- multiple = FALSE,
- width = "400px"
+
+ # Retrieve public datasets tab
+ tabPanel(
+ "Retrieve public datasets",
+ value = "public",
+ div(
+ style = "display: flex; flex-direction: column; align-items: center; gap: 20px; margin-bottom: 150px; margin-top: 40px;",
+ div(
+ style = "width: 60%;",
+ bs_alert("The 'Retrieve public data' functionality in OPG allows to query large repositories of publically available data to retrieve a specific dataset. You will need the dataset's unique identifier, such as the GEO ID. At the moment, GEO, recount3, and ArrayExpress repositories are queried.", closable = FALSE, translate = TRUE, html = TRUE)
+ ),
+ br(),
+ div(
+ p("Data type:", style = "text-align: left; margin: 0 0 2px 0; font-weight: bold;"),
+ shiny::selectInput(
+ ns("selected_datatype_public"), NULL,
+ choices = c(
+ "RNA-seq",
+ "mRNA microarray"
+ ),
+ selected = "RNA-seq",
+ width = "400px"
+ )
+ ),
+ div(
+ p("Organism:", style = "text-align: left; margin: 0 0 2px 0; font-weight: bold;"),
+ shiny::selectInput(
+ inputId = ns("selected_organism_public"),
+ label = NULL,
+ choices = NULL,
+ multiple = FALSE,
+ width = "400px"
+ )
+ ),
+ div(
+ p("Dataset identifier:", style = "text-align: left; margin: 0 0 2px 0; font-weight: bold;"),
+ shiny::textInput(
+ ns("dataset_identifier"),
+ label = NULL,
+ placeholder = "e.g., GSE12345, E-GEOD-12345",
+ width = "400px"
+ ),
+ div(
+ style = "font-size: 0.85em; color: #666; margin-top: 5px;",
+ "Supported: GEO (GSE), ArrayExpress (E-), recount3 datasets"
+ )
+ ),
+ br(),
+ shiny::actionButton(
+ ns("start_search"),
+ "Retrieve dataset",
+ class = "btn-primary"
+ ),
+ br()
+ )
)
- ),
- br(),
- shiny::actionButton(
- ns("start_upload"),
- "Start upload",
- class = "btn-primary"
- ),
- br()
+ )
)
)
)
diff --git a/components/modules/WelcomeBoard.R b/components/modules/WelcomeBoard.R
index 7dd56ee9d..cd8d8ba48 100644
--- a/components/modules/WelcomeBoard.R
+++ b/components/modules/WelcomeBoard.R
@@ -169,6 +169,8 @@ WelcomeBoard <- function(id, auth, load_example, new_upload) {
input$btn_upload_new
},
{
+ bigdash.openSettings(lock = TRUE)
+ bigdash.openSidebar()
bigdash.selectTab(session, selected = "upload-tab")
}
)
diff --git a/scss/components/_progress.scss b/scss/components/_progress.scss
index f0b9ae0f1..49f1ca82a 100644
--- a/scss/components/_progress.scss
+++ b/scss/components/_progress.scss
@@ -34,4 +34,47 @@ html {
display: block;
}
+ #custom-progress-modal {
+ position: fixed;
+ top: 50% !important;
+ left: 50% !important;
+ transform: translate(-50%, -50%);
+ background-color: #ffffff;
+ color: black;
+ padding: 30px 50px;
+ font-size: 20px;
+ font-weight: bold;
+ border-radius: 10px;
+ z-index: 1050;
+ text-align: center;
+ }
+
+ #custom-progress-bar {
+ height: 15px;
+ background-color: #007bff;
+ width: 40%;
+ transition: width 0.3s ease;
+ color: white;
+ font-weight: bold;
+ line-height: 25px;
+ animation: pulse-blue 2s infinite;
+ transform-origin: center;
+ }
+
+ @keyframes pulse-blue {
+ 0% { box-shadow: 0 0 8px 2px #007bff;
+ transform: scale(1.2); }
+ 50% { box-shadow: 0 0 18px 8px #3399ff;
+ transform: scale(1.4); }
+ 100% { box-shadow: 0 0 8px 2px #007bff;
+ transform: scale(1); }
+ }
+
+ #custom-progress-container {
+ width: 100%;
+ background-color: #e9ecef;
+ border-radius: 0.25rem;
+ overflow: hidden;
+ margin-top: 15px;
+ }
}
\ No newline at end of file