Giter Site home page Giter Site logo

orthomcl-docker's Introduction

Quick Start

Install Docker

  1. See installation instructions for Mac, Windows, etc
  2. On Mac and Windows, launch “Docker Quickstart Terminal”. All subsequent commands will be run in the terminal launched by “Docker Quickstart Terminal”.

Notes: On other operating systems, the docker daemon may run automatically after installation. Also, on other operating systems, you may need to use the command sudo docker instead of just docker.

Download Run Script

Download the run script run_orthomcl.sh (e.g. right click on the link and select “Save Link As …”)

Run the script

Within the Docker terminal run bash run_orthomcl.sh to launch the OrthoMCL container. You should now have a bash shell in the OrthoMCL container that looks something like this:

root@a74d15695ca9:/#

Generate OrthoMCL Configuration File

Download the config generation script into your docker container, and run it with the following commands within your docker container:

wget https://raw.githubusercontent.com/granek/OrthoMCL-docker/master/test_run/create_config.sh
bash create_config.sh > orthomcl.config

This should generate the config file orthomcl.config in the current directory in your docker container.

Install the schema into MySQL database

Run it with the following command within your docker container to set up the database:

orthomclInstallSchema orthomcl.config

OrthoMCL Docker Details

One-time Use

Download the run script run_orthomcl_oneshot.sh. Run this script within the Docker terminal run bash run_orthomcl_oneshot.sh to launch the OrthoMCL container. This script cleans up after itself, which means that your session is completely obliterated once you exit. If you might want to resume your session, see Multi-time Use below.

Multi-time Use

If you expect to want to use OrthoMCL in several different sessions, you will want to run bash run_orthomcl.sh. When you want to get out of your OrthoMCL session, but want to resume it later (technically this is detaching), use the “escape sequence” Ctrl-p + Ctrl-q. This leaves the container running. To resume your orthomcl session use the command docker attach orthomcl-run within your “Docker Quickstart Terminal”. Note that when you attach the shell will not print a prompt right away, just hit the enter/return key to get a prompt.

Accidentally did exit in your OrthoMCL session? Don’t worry, just run docker start orthomcl-run before docker attach orthomcl-run.

Cleanup When Done

Once you are completely done with OrthoMCL, you might want to get rid of the containers:

docker stop orthomcl-mysql
docker rm orthomcl-run orthomcl-mysql

Accessing files on the host computer

A Docker container is almost completely isolated from the host computer that it is running on. This prevents the container from doing nasty things to your computer, but also makes it a bit more difficult to interact with files that are residing on your computer. A simple way around this limitation is to mount a directory from the host computer into the Docker container. When you run bash run_orthomcl.sh, the directory that you run it from (the “working directory”) will automatically be mounted within the OrthoMCL container at the mountpoint /host_dir. This means that you can read and write files that are in that directory. Try the following within your OrthoMCL container:

ls /host_dir
echo "I am writing this from the future ... a docker container" > /host_dir/test_output.txt

If you want to mount a different directory, just supply this as a full path when you run the orthomcl script bash run_orthomcl.sh FULL_PATH_TO_DATA, and that directory will be mounted at /host_dir instead

OrthoMCL Configuration File

The github repo contains a script for automatically generating an OrthoMCL configuration file. There are two ways to generate the configuration file.

From repo

If you cloned the repo from github, and started things up by running the run_orthomcl.sh (or run_orthomcl_oneshot.sh) script in the repo directory, you can generate the configuration file by running the following command within your docker container:

bash /host_dir/test_run/create_config.sh > orthomcl.config

This should generate the config file in the current directory in your docker container. You can check this by running the following within your docker container:

cat orthomcl.config

If it worked, the second line should be the following (but probably with a different IP address):

dbConnectString=dbi:mysql:orthomcl:172.17.0.40:3306

Download script

You can also download the config generation script into your docker container, and run it with the following commands within your docker container:

wget https://raw.githubusercontent.com/granek/OrthoMCL-docker/master/test_run/create_config.sh
bash create_config.sh > orthomcl.config

This should generate the config file in the current directory in your docker container. You can check this by running the following within your docker container:

cat orthomcl.config

If it worked, the second line should be the following (but probably with a different IP address):

dbConnectString=dbi:mysql:orthomcl:172.17.0.40:3306

OrthoMCL Image

Download OrthoMCL Image

The OrthoMCL image is automatically downloaded from Docker Hub by the run_orthomcl.sh script, but you can manually download it with the command docker pull granek/orthomcl.

Manual build of the OrthoMCL Image

If you want to build the OrthoMCL image instead of pulling it from Docker Hub, download Dockerfile (or pull this repo), then run docker build -t orthomcl within the directory containing Dockerfile.

orthomcl-docker's People

Contributors

focusjosh avatar granek avatar tedsta avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.