Skip to content

Latest commit

 

History

History
226 lines (122 loc) · 13.1 KB

README_extended.md

File metadata and controls

226 lines (122 loc) · 13.1 KB

Toycon visualization app documentation

Michal Stolarczyk mjs5kd@virginia.edu

Table of contents

  1. Introduction
    1. What is this?
    2. Functionalities
  2. Installation
    1. Docker container
    2. UNIX
      1. libSBML
      2. Python
      3. R
    3. Windows
      1. libSBML
      2. Python
      3. R
  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.
  • Gene expression influenece visualization, which is intended to depict the impact of the pseudo-gene expression changes in the model, which directly influences the flux that is carried by the reaction catalyzed by the enzyme encoded by the gene in question. It is indended to give the user an idea of how the algorithms for gene expression integration influence the fluxes in in the model.

Installation

Docker container

The most reliable, safest and easiest installation approach is to use the Docker platform due to its intrisic characterisitics. In order to do it user needs 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).

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 pulled from the repository with a following command:

docker pull [OPTIONS]

e.g

sudo docker pull mstolarczyk/toyconapp

Check the image status:

sudo docker images

or 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

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

UNIX

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.

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

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.

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.

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)"