-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from EMSL-Computing/feature/minio-connection
Feature/minio connection
- Loading branch information
Showing
58 changed files
with
5,912 additions
and
3,198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
untracked_resources | ||
.git | ||
tests/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
Package: FREDA | ||
Title: An app for the processing and visualization of Fourier-transform mass spectrometry data. | ||
Version: 1.7 | ||
Authors@R: c(person("Lisa", "Bramer", "[email protected]", role = "aut", "cre"), | ||
person("Daniel", "Claborne", "[email protected]", role = c("aut"))) | ||
Description: A frontend application which exposes functionality of the ftmsRanalysis R package. See | ||
License: GPL (>= 3) + file LICENSE | ||
Encoding: UTF-8 | ||
Roxygen: list(markdown = TRUE) | ||
RoxygenNote: 7.2.1 | ||
Depends: | ||
R (>= 4.1.0) | ||
Imports: | ||
dplyr, | ||
DT, | ||
ggplot2, | ||
htmlwidgets, | ||
jsonlite, | ||
kableExtra, | ||
KeggData, | ||
knitr, | ||
markdown, | ||
pander, | ||
plotly, | ||
purrr, | ||
raster, | ||
RColorBrewer, | ||
readr, | ||
reshape2, | ||
reticulate, | ||
rlang, | ||
rmarkdown, | ||
scales, | ||
shiny, | ||
shinyBS, | ||
shinycssloaders, | ||
shinyjs, | ||
shinyWidgets, | ||
sp, | ||
stringr, | ||
tibble, | ||
tidyr, | ||
viridis, | ||
webshot, | ||
withr, | ||
xfun, | ||
MetaCycData, | ||
mapDataAccess, | ||
ftmsRanalysis, | ||
datadr | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,31 @@ | ||
FROM rocker/shiny:4.1.1 | ||
FROM rocker/shiny:4.2.3 | ||
|
||
RUN apt-get update -qq && apt-get install -y \ | ||
git-core \ | ||
libssl-dev \ | ||
libcurl4-gnutls-dev \ | ||
libmagick++-dev \ | ||
libv8-dev \ | ||
vim python3-venv | ||
vim python3-venv \ | ||
libgdal-dev | ||
|
||
WORKDIR /srv/shiny-server/ | ||
COPY renv.lock . | ||
|
||
# pre-install renv | ||
RUN R -e "install.packages('renv', repos = 'https://cran.rstudio.com')" | ||
ENV RENV_VERSION 1.0.3 | ||
RUN R -e "install.packages('remotes', repos = c(CRAN = 'https://cloud.r-project.org'))" | ||
RUN R -e "options('repos'=c(CRAN = 'https://cloud.r-project.org'));remotes::install_version('renv', version = '${RENV_VERSION}')" | ||
|
||
# install all packages listed in renv.lock | ||
COPY renv.lock . | ||
RUN --mount=type=secret,id=access_tokens set -a \ | ||
&& . /run/secrets/access_tokens && set +a \ | ||
&& R -e 'renv::restore()' | ||
&& R -e 'options(renv.config.connect.timeout=300);options(timeout=300);renv::restore()' | ||
|
||
## Setup Python venv ## | ||
USER root | ||
COPY python_requirements.txt . | ||
RUN python3 -m venv /venv | ||
RUN /venv/bin/pip install --upgrade pip | ||
RUN /venv/bin/pip install -r python_requirements.txt | ||
|
||
# Install all plotly's dependencies | ||
RUN R -e "install.packages('plotly', dependencies = T)" | ||
|
||
# Download orca binary and make it executable under xvfb | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
xvfb \ | ||
xauth \ | ||
libgtk2.0-0 \ | ||
libxtst6 \ | ||
libxss1 \ | ||
libgconf-2-4 \ | ||
libnss3 \ | ||
libasound2 && \ | ||
mkdir -p /opt/orca && \ | ||
cd /opt/orca && \ | ||
wget https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage && \ | ||
chmod +x orca-1.2.1-x86_64.AppImage && \ | ||
./orca-1.2.1-x86_64.AppImage --appimage-extract && \ | ||
rm orca-1.2.1-x86_64.AppImage && \ | ||
printf '#!/bin/bash \nxvfb-run --auto-servernum --server-args "-screen 0 640x480x24" /opt/orca/squashfs-root/app/orca "$@"' > /usr/bin/orca && \ | ||
chmod +x /usr/bin/orca && \ | ||
apt-get remove -y libnode-dev | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
#' @details Convert the filtered corems data to peakData | ||
#' cms_dat_unq_mf() is converted into peakData using CoreMSData_to_ftmsData and | ||
#' the result is stored in revals$uploaded_data | ||
observeEvent( | ||
c( | ||
input$corems_to_peakdata, | ||
input$corems_to_peakdata_modal | ||
), { | ||
|
||
req(cms_dat_unq_mf()) | ||
req(isTruthy(input$corems_to_peakdata > 0) | isTruthy(input$corems_to_peakdata_modal > 0)) | ||
|
||
revals$uploaded_data <- revals$peakData2 <- NULL | ||
|
||
res <- tryCatch({ | ||
ftmsRanalysis::coreMSDataToFtmsData(cms_dat_unq_mf()) | ||
}, | ||
error = function(e) { | ||
msg = paste0('Error converting your coreMS data to peakData: \n System error: ', e) | ||
revals$warningmessage_corems$corems_to_peakdata <<- sprintf("<p style = 'color:red'>%s</p>", msg) | ||
revals$warningmessage_corems$corems_to_peakdata | ||
}) | ||
|
||
if (inherits(res, "peakData")) { | ||
# need a fake f_data column. | ||
if (ncol(res$f_data) == 1) { | ||
res$f_data[, 2] <- NA | ||
} | ||
|
||
revals$uploaded_data <- res | ||
} else { | ||
if (inherits(res, "character")) { | ||
msg = res | ||
} else { | ||
msg = "Error converting your coreMS data to peakData" | ||
} | ||
|
||
showNotification( | ||
HTML(msg), | ||
duration = NULL, | ||
type = "error" | ||
) | ||
} | ||
}, ignoreInit = T) | ||
|
||
#' @details Show a modal for the completion of corems data | ||
observeEvent(cms_data(), { | ||
req(cms_data(), input$top_page == "CoreMS-create") | ||
|
||
updateCollapse(session, id = "corems-upload-summary-collapse", | ||
open = c("corems-upload-visualize"), close = c("corems-upload-table")) | ||
|
||
showModal( | ||
# defined in srv_ui_elements/corems_UI.R | ||
corems_obj_creation_modal() | ||
) | ||
}) | ||
|
||
#' @details Go to the corems filter tab from the object creation success tab. | ||
observeEvent(input$goto_corems_filter, { | ||
req(input$top_page == "CoreMS-create") | ||
updateTabsetPanel(inputId = "top_page", selected = "CoreMS-conf-filter") | ||
removeModal() | ||
}) | ||
|
||
#' @details Move the user to the create CoreMSData tab after successful upload | ||
observeEvent(input$goto_corems_creation, { | ||
updateTabsetPanel(inputId = "top_page", selected = "CoreMS-create") | ||
removeModal() | ||
}) | ||
|
||
#' @details (CoreMS filter tab) Show summary plot and show progression modal | ||
observeEvent(cms_data_filtered(), { | ||
req(cms_data_filtered()) | ||
updateCollapse(session, id = "corems-filter-summary-collapse", | ||
open = c("viz")) | ||
updateTabsetPanel(inputId = "corems-viz-tabset", selected = "filt_summary_plot") | ||
|
||
showModal(corems_filter_modal()) | ||
}) | ||
|
||
#' @details Move user to the formula assignment tab after successful filtering | ||
observeEvent(input$goto_corems_formula, { | ||
updateTabsetPanel(inputId = "top_page", selected = "CoreMS-formula-assign") | ||
removeModal() | ||
}) | ||
|
||
#' @details display table visualization panels and prompt user for next steps | ||
#' when unique molecular formula are assigned. | ||
observeEvent(cms_dat_unq_mf(), { | ||
hide("corems_to_peakdata_toggle") | ||
req(cms_dat_unq_mf()) | ||
updateCollapse(session, id = "corems-assign-formula", open = c("viz", "tables")) | ||
showModal(corems_unq_mf_modal()) | ||
show("corems_to_peakdata_toggle") | ||
}) | ||
|
||
#' @details disable functionality and helper css for arguments required for corems | ||
observe({ | ||
req(input$top_page == "CoreMS-create") | ||
fields_filled = TRUE | ||
|
||
for(arg in COREMSDATA_REQ_ARGS) { | ||
is_selected = isTruthy(input[[arg]] != NULLSELECT__) | ||
toggleCssClass(sprintf("%s_UI", arg), "attention", !is_selected) | ||
if(!is_selected) { | ||
fields_filled = FALSE | ||
} | ||
} | ||
|
||
toggleState("make_cmsdata", condition = fields_filled) | ||
|
||
if (!fields_filled) { | ||
showNotification( | ||
ui = "One or more required fields for making your coreMS data object are not specified", | ||
type = "warning", | ||
id = "as-corems-args-notification" | ||
) | ||
} else { | ||
removeNotification("as-corems-args-notification") | ||
} | ||
|
||
}) |
Oops, something went wrong.