Shiny application

Shiny is an open-source R library which enables creation of interactive web applications.

We use Shiny to share many our our analysis results, both internally and externally to accompany publications. To this end, we maintain a local Shiny server. This is publicly available at shiny.compbio.dundee.ac.uk.

For internal sharing of results, access to the application will typically require authentication, and access being restricted to named individuals. Please use your standard University of Dundee credentials to authenticate.

The Shiny server is also available for hosting applications developed by others within the University. Should this be of interest to you, please contact cb-dag@dundee.ac.uk

Connecting

Once you have been granted login access to the Shiny server, you will be provided with details on how to connect via SSH. You can connect directly via SSH, and use command-line SCP or an SCP/SFTP client like Filezilla to transfer files to the system.

Where to put your application

  1. Within your home directory, create a directory named 'ShinyApps', which contains sub-directories names 'public' and 'private'.
    mkdir -p ~/ShinyApps/{public,private}
  2. Create a directory for your application within either the 'public' or 'private' directories. The name of directory you create here will be the last component of the URI used to access the application. Note that content within the public' directory will be served both within and outside the University firewall, while applications in the 'private' directory are only available from the University network, and also require authentication.

  3. Copy the files required for your application into the directory created in the previous stage

  4. You should now be able to access your application at http://shiny.compbio.dundee.ac.uk/[your_username]/(public|private)/[application_directory_name]

    For example, a copy of the ShinyServer 'hello' example application installed in the public area of the 'jabbott' account would be available at https://shiny.compbio.dundee.ac.uk/jabbott/public/hello

R

The shiny server is currently running R-4.4.0

A minimal set of R libraries are installed on the Shiny server. Additional libraries can be installed within your own private Rlibs in the normal way, however this would restrict you to the same library versions for every application. We would recommend using Renv to install a local set of libraries as required for each application which reduces library compatibility issues and improves reproducibility.

Please note that you may need to reinstall your libraries following any updates to the R installation.

Logging

A directory named 'log' will be automatically created in your 'ShinyApps'. A log file will be created in this each time and application is started to aid in debugging issues.

The log file will be named [application directory name]-YYYYMMDD-HHmmss-[port number or socket ID].log

Logs can build up very quickly, so the server is configured to remove the logs if the R process ends successfully, otherwise it is retained on the server