Commit 9e535dfc authored by Holger Brandl's avatar Holger Brandl

appify explorer app without bash wrapper

parent 788904dd
...@@ -463,7 +463,6 @@ dge_create_explorer_app() { ...@@ -463,7 +463,6 @@ dge_create_explorer_app() {
files='tpms_by_replicate.txt fpkms_by_replicate.txt de_results.txt basic_design.txt' files='tpms_by_replicate.txt fpkms_by_replicate.txt de_results.txt basic_design.txt'
ls $files 2>/dev/null || { echo "Can not create app, because not all required data files ($files) exist in the current directory" 1>&2; return; } ls $files 2>/dev/null || { echo "Can not create app, because not all required data files ($files) exist in the current directory" 1>&2; return; }
appify ${NGS_TOOLS}/dge_workflow/expression_explorer/run_expression_explorer.sh appify ${NGS_TOOLS}/dge_workflow/expression_explorer/expression_explorer.R "expression_explorer"
} }
export -f dge_create_explorer_app export -f dge_create_explorer_app
\ No newline at end of file
This diff is collapsed.
#!/usr/bin/env bash #!/usr/bin/env Rscript
#https://christopher.su/2012/creating-mac-applications-shell-scripts/
export SCRIPT_DIRECTORY="$(dirname "$0")/"
#https://stackoverflow.com/questions/26465240/how-to-execute-a-shell-script-from-within-an-app-and-show-it-in-the-terminal
#osascript -e 'display notification "Starting expression explorer... Please be patient, it may require some minutes to install required dependencies on first launch'
# To use Rscript as interpreter see https://stackoverflow.com/questions/1815606/rscript-determine-path-of-the-executing-script
/usr/local/bin/Rscript -<<"EOF" ${SCRIPT_DIRECTORY}
# run shiny app from a bash file: Rscript -e "shiny::runApp('expression_explorer/', launch.browser=TRUE)" # run shiny app from a bash file: Rscript -e "shiny::runApp('expression_explorer/', launch.browser=TRUE)"
# https://shiny.rstudio.com/reference/shiny/1.0.5/ # https://shiny.rstudio.com/reference/shiny/1.0.5/
...@@ -30,8 +19,14 @@ load_pack(shinyjqui) ...@@ -30,8 +19,14 @@ load_pack(shinyjqui)
# GET path-------------------------------------------------------------------------------------------------------------- # GET path--------------------------------------------------------------------------------------------------------------
#Sys.getenv("DA_BIN_ICH") #Sys.getenv("DA_BIN_ICH")
dataPath= args[1] %>% dirname()%>% dirname()%>% dirname() # dataPath= args[1] %>% dirname()%>% dirname()%>% dirname()
# https://stackoverflow.com/questions/1815606/rscript-determine-path-of-the-executing-script
initial.options <- commandArgs(trailingOnly = FALSE)
file.arg.name <- "--file="
script.name <- sub(file.arg.name, "", initial.options[grep(file.arg.name, initial.options)])
# script.name="/Volumes/cerebral-organoids/RNA-Seq/data/hsap/dge_analysis/expression_explorer.app/Contents/MacOS/expression_explorer"
dataPath= script.name %>% dirname() %>% dirname()%>% dirname() %>% dirname()
# FUNCTIONS ------------------------------------------------------------------------------------------------------------ # FUNCTIONS ------------------------------------------------------------------------------------------------------------
...@@ -204,6 +199,4 @@ app <- shinyApp( ...@@ -204,6 +199,4 @@ app <- shinyApp(
#runApp(app) #runApp(app)
runApp(app, launch.browser=TRUE) runApp(app, launch.browser=TRUE)
#shinyApp(ui = ui, server = server) #shinyApp(ui = ui, server = server)
\ No newline at end of file
EOF
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment