flying_kmeanson your computer with this hierarchy:
dxapp.jsonin the app's root folder. This is a JSON-formatted file containing the app's configuration as key-value pairs. (Docs are here.) In the file, find the place where it says:
httpsAppkey and its values, we've enabled communication via port 443 (HTTPS). The
shared_accessis a string and its values can be: VIEW, CONTRIBUTE, or NONE. To access your running app, a user must have at least VIEW permission to your project. If the web app must only be accessed by whoever launched it then set the value of this key to NONE.
httpsAppdescribe how and who can access the web app. The
"ports": means that we've enabled communication via port 443 (HTTPS; one can add more ports). With
"shared_access": "VIEW"we defined that to access this web app while it is running, another user must have at least VIEW permission to your project. If the web app must only be accessed by whoever launched it then change this value to NONE. Read more about web applications at https://documentation.dnanexus.com/developer/apps/https-applications
src/flying_kmeans.sh. This is the Bash script that contains the function where our app starts from - the
main()function. The full content (half being comments) of my script is just 12 lines:
flying_kmeansand execute command:
rocker/shinydocker image anew, which takes platform's bandwidth and your time, and (3) the app does not have any input files that are in your DNAnexus project.
"*.gz"under the "inputSpec" key so that it looks like this:
src/dxshiny.shscript. Here is the content:
dx_shinyfolder and run:
dx_shinyshould appear in the current directory of your DNAnexus project.
kmeans_appfolder and archive it. The new archive will be called
/shiny. After these operations, you should have three objects in the folder: archive files
rshiny.docker.gz, and the
app_gzinput. There is an alternative to this: take a look at the next method.
dx-app-wizardand provide the the same answers except these:
fused_shiny.sh; add code to download the
dxfusetool, set it up, mount your DNAnexus project as a folder, and then mount this folder to Shiny Server's docker image. The code is a modification of the script from
dx_shinyapp and a bit too long to quote here, but here is the key piece:
dxfusetool and set it up. We also dxfuse-mounted our DNAnexus project as a folder, and then mounted this folder to Shiny Server's docker image.
Dockerfileof the Shiny Server and modify it. Examples of such Dockerfiles can be found on the internet. Creating an Rstudio Pro server is also possible using the same methods. The code and example Docker files can be found on their Github site (you will need a license.)