Github: https://github.com/WGS-TB/MongooseGUI3 for full Dockerfile
1.7K
To run this Dockerfile the following is necessary ( a Mac OS is assumed ): do not include the beginning '$', this is to simply indicate a terminal command.
Open Terminal
Open XQuartz: (download from: https://www.xquartz.org) $ open -a XQuartz NOTE: For first time use, please perform the following: 2.1. XQuartz -> Preferences -> Security -> Check "Allow connections from network clients" -> Close Preferences but keep XQuartz running
3.1: Set IP: if on ethernet $ IP=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}') 3.2: or if on wifi $ IP=$(ifconfig en1 | grep inet | awk '$1=="inet" {print $2}')
Add IP: $ xhost + $IP
Next we would like to build the docker image. This step can be done one of two ways: 5.1: a. Pull our github repository (https://github.com/WGS-TB/MongooseGUI3) using the command: $ git clone https://github.com/WGS-TB/MongooseGUI3.git b. cd into the cloned directory c. Build docker image: $ docker build -t mongoose . OR 5.2: a. $ docker pull ctlevn/mongoose At the end of either methods, run : $ docker images to confirm that the docker image has been built successfully. You will see something similar to the following: REPOSITORY TAG IMAGE ID CREATED SIZE mongoose latest f3e77cc7b7b0 2 days ago 1.21 GB ctlevn/mongoose latest f3e77cc7b7b0 2 days ago 1.21 GB
Run docker image: If you did step 5.1 above, perform the following command: $ docker run -ti --rm=true -e DISPLAY=$IP:0 -v /tmp/.X11-unix:/tmp/.X11-unix mongoose If you did step 5.2 above, perform the following command: $ docker run -ti --rm=true -e DISPLAY=$IP:0 -v /tmp/.X11-unix:/tmp/.X11-unix ctlevn/mongoose
The terminal where you ran the command is now an interactive terminal for the Docker container. Terminal commands such as ls, cd, and etc work. To go to the MongooseGUI3 directory run the command: $ cd /MongooseGUI3
Now we need to create a shelve file to analyze. The XML files can be downloaded from here: http://cb.csail.mit.edu/cb/mongoose/models.html (middle column)
Once the file is downloaded, we can copy the file from our local machine to the container: First open up another terminal to navigate the local machine. There should now be two terminals open, one for Docker and one for the local machine. Now in the local machines terminal run the following: $ docker ps -a This will list the running processes. Observe the container ID. In order to copy the downloaded file from our local machine to the container, run the following: $ docker cp /path/to/local/machine <container_id>:/MongooseGUI3 i.e.: $ docker cp /Users/hostName/Documents/Leonid/MongooseGUI3/AB1Model 665bd8e6cbad:/MongooseGUI3 where: /path/to/local/machine is the path of the file on your local machine. <container_id> is the corresponding container id /MongooseGUI3 is the proper destination path in the container.
To create a shelve file, follow the instructions in "The Mongoose Rational Arithmetic Toolbox". For example, you can run the following: $ python3 -i ModelParsing.py Then, within Python:
model = parseSBML('Acinetobacter Baumannii.xml') model.adjustCompartments('xt', startPos = -2) model.biomassCoefficients[760] = 1 s=shelve.open('ParsedModel') s['AB1'] = model s.close() exit()
After this you will have the file called 'ParsedModel' that will contain the parsed model inside it Then to run the GUI, perform the command: $ python3 MONGOOSEgui.py The GUI should now start up.
After saving results, copy any files from the container to your local machine with the following command on your local machine's terminal: $ docker cp <container_id>:/path/to/file/in/container /path/to/local/machine i.e: $ docker cp 665bd8e6cbad:/MongooseGUI3/docker_results.txt /Users/hostName/Documents/Leonid/MongooseGUI3
Exit Docker by the command: exit
Content type
Image
Digest
Size
447.4 MB
Last updated
about 9 years ago
docker pull ctlevn/mongoose