michaelllo1993/shinyapp


Shiny app for visualization of the toy GENRE iNRG

Language: R

Keywords: fba, shinyapps, systemsbiology, toycon


Toycon visualization app documentation

Michal Stolarczyk mjs5kd@virginia.edu

Table of contents

  1. Introduction
    1. What is this?
    2. Functionalities
  2. Installation
    1. UNIX
      1. libSBML
      2. Python
      3. R
    2. Windows
      1. libSBML
      2. Python
      3. R
    3. Docker container
  3. Usage

Introduction

What is this?

The ToyCon visualization app is an R shiny app that aids the basic understanding of concepts conveyed in the following publication: iNRG: A toy network capturing central energy metabolism for use with constraint-based methods.

Functionalities

  • Network layout visualization, which is intended to graphically present the interconnections between metabolites and reactions in the genome-scale metabolic reconstruction. Nodes of the graph represent metabolites and reactions whereas egdes - connections between them.
  • Network stoichiometry visualization, which is intended to depict the stoichiometric coefficients in view of the aforesaid network representation of the genome-scale metabolic reconstruction. The width of the edges correspond to the stoichiometic coefficients that determine ratios of each metabolite in the reactions.
  • Reaction knockouts (KOs) impact visualization, which is intended to present the influence of the specific reaction KOs on genome-scale metabolic reconstruction architecture and fluxes in the model. By means of the Flux Balance Analysis (FBA) this functionality can be used to detect either essential (when removed render the model carry 0 flux through the objective function) or nonessential (when removed do not influence the effective flux value through the objective function) reactions. Additionaly, knockouts can simulate the complete enzyme inhibition that catalyzes the reaction being knocked out.
  • Media changes impact visualization, which is intended to deptict the incluence of growth media changes on the model growth and fluxes through reactions. The media changes are performed by constraining the exchange reactions in the model during the FBA simulation. For example in order to check the influence of oxygen shortage on the model growth one needs to lower the upper (and lower) flux bound(s) of the oxygen exchange reaction.

Installation

The application is written in R programming language and uses COBRApy for under the hood Flux Balance Analysis (FBA) simulations, reaction knockouts and constraining fluxes through exchange reactions. Consequently an installation of libSBML, R and Python with functioning cobra package is required.

UNIX

libSBML

Install system libSBML programming library. Necessary files and instructions for installation under UNIX are available here

Install libSBML Python language interface

Python

Install Python programming language (version of your choice, tested on 2.7.12) with following packages:

To install the packages using pip package management system type in the terminal:

sudo pip install <package name>

e.g.:

sudo pip install sys

R

Install R programming language (version of your choice, tested on 3.4.3) with following packages:

Or you can use this script to automatically install all required R packages (except from the rPython package, which requires special attention) after the language installation.

Windows

libSBML

Install system libSBML programming library. Necessary files and instructions for installation under Windows are available here

Install libSBML Python language interface

Python

Install Python programming language (version of your choice, tested on 2.7.12) with following packages:

To install the packages using pip package management system type in the Command Prompt:

<absolute path to pip.exe> install <package_name>

e.g.:

C:/Python27/Scripts/pip.exe install sys (you may need to adjust the path accordingly)

R

Install R programming language (version of your choice, tested on 3.4.3) with following packages:

Or you can use this script to automatically install all required R packages (except from the rPython package, which requires special attention) after the language installation.

Docker container

The alternative way to run the application is using the Docker software to build the image from Dockerfile or run the pre-built Docker image (both provided with this application in docker/Dockerfile and in the official Docker repository, respectively). This two are the most reliable, safest and easiest installation approaches due to the intrisic Docker characterisitics.

To follow either of these approaches install the Docker CE (community edition) software on your machine. The installation instructions can be found on the Docker website.

After installation the docker image can be build with a following command:

docker build [OPTIONS] PATH | URL | - Please note that image building may take 10-15 minutes

e.g

cd "path/to/the/Dockerfile/directory"

sudo docker build -t toyconApp . Mind the dot at the end of the line!

Check the image status:

sudo docker images

or the image can be pulled from the repository with a following command:

docker pull [OPTIONS]

e.g

docker pull mstolarczyk/toyconapp

Check the image status:

sudo docker images

Next, the container can be run using the built or loaded image with a following command:

docker run [OPTIONS] IMAGE [COMMAND] [ARG...]

e.g

sudo docker run -p 8080:8080 mstolarczyk/toyconapp

The set of two numbers separated by the colon after the -p flag specifies the port mapping. The application is programmed to listen on port 8080 (second number of the two) inside of the container. The port is then exposed outside of the container and it is redirected to the same port in your OS/network with the command above.

Subsequently, to run the application go to your favourite web browser and paste:

localhost:8080

Usage

Besides the installation of packages for both R and Python no further app installation is needed. Simply download the contents of this repository and save them in the directory of your choice (represented as "path/to/the/shinyapp/directory" below).

To launch the app just run the following line of code in your favourite R IDE, e.g. RStudio:

shiny::runApp(appDir = "path/to/the/shinyapp/directory")

or in the command line:

R -e "shiny::runApp(appDir = "path/to/the/shinyapp/directory", launch.browser=TRUE)"

Project Statistics

Sourcerank 2
Repository Size 11.5 MB
Stars 0
Forks 0
Watchers 1
Open issues 0
Dependencies 0
Contributors 1
Tags 0
Created
Last updated
Last pushed

Top Contributors See all

Michal Stolarczyk

Something wrong with this page? Make a suggestion

Last synced: 2018-02-01 20:39:14 UTC

Login to resync this repository