-
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 #4 from EMSL-Computing/develop
Develop into master
- Loading branch information
Showing
21 changed files
with
520 additions
and
365 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
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,4 +1,5 @@ | ||
* | ||
|
||
!renv.lock | ||
!python_requirements.txt | ||
|
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,67 @@ | ||
#'@details Parse and store header parameters. If 'corems-prefix' is passed, load | ||
#'the files and display a different tab for 'upload'. | ||
observe({ | ||
query <- parseQueryString(session$clientData$url_search) | ||
|
||
# establish minio connection if we are pulling cloud resources | ||
if(any(names(query) %in% VALID_MINIO_HEADER_PARAMS)) { | ||
minio_con <<- mapDataAccess::map_data_connection("./cfg/minio_config.yml") | ||
} | ||
|
||
isolate({ | ||
# store header params in a reactive variable | ||
for(key in names(query)){ | ||
header_params[[key]] <- query[[key]] | ||
message(sprintf("INFO: stored parameter %s: %s", key, query[[key]])) | ||
} | ||
|
||
if('corems-prefix' %in% names(query)) { | ||
withProgress(message = "Loading core-ms files...", value = 1, { | ||
uris <- reticulate::iterate( | ||
minio_con$client$list_objects( | ||
minio_con$bucket, | ||
prefix = header_params[['corems-prefix']], | ||
recursive = TRUE), | ||
function(x) x$object_name | ||
) | ||
|
||
if(length(uris) > 0) { | ||
tryCatch({ | ||
fpaths <- lapply(uris, function(uri) { | ||
mapDataAccess::get_file( | ||
minio_con, id = uri, filename = file.path(tempfile(), basename(uri)), | ||
use_dir = FALSE | ||
) | ||
}) | ||
|
||
names(fpaths) <- sapply(fpaths, basename) | ||
|
||
for(name in names(fpaths)) { | ||
corems_samples[[name]] <- read_csv(fpaths[[name]]) | ||
} | ||
|
||
modalmessage <- div(class = "column-scroll-sm", | ||
HTML(info_text[["COREMS_UPLOAD_SUCCESS"]]), | ||
HTML(paste(names(fpaths), collapse = "<br>")) | ||
) | ||
}, error = function(e) { | ||
modalmessage <<- div(sprintf(info_text[["COREMS_UPLOAD_ERROR"]], e)) | ||
}) | ||
} else { | ||
modalmessage <- div(info_text[["COREMS_UPLOAD_NOSAMPS"]]) | ||
} | ||
|
||
showModal(modalDialog(modalmessage, title = "Core-MS Upload")) | ||
|
||
}) | ||
} | ||
|
||
insertTab( | ||
"top_page", | ||
target = "Welcome", | ||
tab = upload_tab(length(names(corems_samples)) > 0), | ||
position = "after" | ||
) | ||
|
||
}) | ||
}) |
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,8 @@ | ||
type: minio | ||
endpoint: localhost:9000 | ||
access_key: minioadmin | ||
secret_key: minioadmin | ||
bucket: map | ||
secure: False | ||
python_venv: /venv | ||
verbose: true |
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 @@ | ||
minio==7.0.2 |
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
Oops, something went wrong.