Skip to content
This repository was archived by the owner on Jun 28, 2023. It is now read-only.

Running Iroki With Docker

Ryan Moore edited this page Sep 27, 2016 · 8 revisions

Running Iroki With Docker

If you don't have Docker, follow the instructions to install it here: Mac, Linux, Windows.

Note: If you have Windows, running Iroki with Docker may be your only option. Iroki has not been tested on Windows.

Check That Docker Is Working

Check to make sure everything is working by typing

$ docker info

Note: Don't type the $. It just signals that the above was a command entered into the terminal.

Possible Errors

Linux

If you get the following error

docker: Cannot connect to the Docker daemon. Is the docker daemon running on this host?

Try the following (replace mooreryan with your user name):

sudo usermod -aG docker mooreryan

Mac

Using Docker for Mac

If you were previously using Docker Toolbox, then you might need to follow the instructions here: Docker for Mac vs. Docker Toolbox.

Using Docker Toolbox

Note: I don't recommend this anymore. You should probably be using Docker for Mac instead.

If you get this error

Cannot connect to the Docker daemon. Is the docker daemon running on this host?

Run the following command

$ eval "$(docker-machine env default)"

You might want to put this line in your profile or its equivalent.

Get the iroki_docker script

Download this perl script, and change the permissions to executable.

$ \curl "https://raw.githubusercontent.com/mooreryan/iroki/master/bin/iroki_docker" > ~/Downloads/iroki_docker
$ chmod 755 ~/Downloads/iroki_docker

Move iroki_docker to somewhere on your path (you may or may not need sudo).

$ sudo mv ~/Downloads/iroki_docker /usr/local/bin

Try it out!

$ which iroki_docker

should spit out

/usr/local/bin/iroki_docker

and

$ iroki_docker -h

will display something like this....

RUNNING COMMAND: docker pull mooreryan/iroki


Using default tag: latest
latest: Pulling from mooreryan/iroki
Digest: sha256:422cd24f7efb733373ab0153e471020415c65612ff441c503ff9c391ba22fcde
Status: Image is up to date for mooreryan/iroki:latest



RUNNING COMMAND: docker run -v "$HOME:$HOME" mooreryan/iroki -h



  # Version: 0.0.27
  # Copyright 2015 - 2016 Ryan Moore
  # Contact: moorer@udel.edu
  # Website: https://github.com/mooreryan/iroki
  # License: GPLv3

  Iroki command line program.

  Options:
  -b, --color-branches                Color branches?
  -t, --color-taxa-names              Color label names?
  -e, --exact                         Exact pattern matching
  -c, --color-map=<s>                 File with color mappings
  -i, --biom=<s>                      Biom file to make color gradient
  -s, --single-color=<s>              Use single color gradient for single
                                      group biom files
  -n, --name-map=<s>                  File with name mappings
  -a, --auto-color=<s>                Specify color scheme for auto coloring
  -d, --display-auto-color-options    Display options for auto coloring
  -f, --infile=<s>                    Name of input newick file
  -o, --outfile=<s>                   Name of outfile
  -v, --version                       Print version and exit
  -h, --help                          Show this message

And here is an example of running a command.

Zebulon | iroki -> time bin/iroki_docker -f spec/test_files/basic.tre -c spec/test_files/basic_color_map_with_tags.txt -bte -o ~/Desktop/hehe.nex -a kelly



RUNNING COMMAND: docker pull mooreryan/iroki


Using default tag: latest
latest: Pulling from mooreryan/iroki
Digest: sha256:422cd24f7efb733373ab0153e471020415c65612ff441c503ff9c391ba22fcde
Status: Image is up to date for mooreryan/iroki:latest



RUNNING COMMAND: docker run -v "$HOME:$HOME" mooreryan/iroki -f /Users/moorer/projects/iroki/spec/test_files/basic.tre -c /Users/moorer/projects/iroki/spec/test_files/basic_color_map_with_tags.txt -bte -o /Users/moorer/Desktop/hehe.nex -a kelly


I, [2016-09-27T20:48:11.432623 #1]  INFO -- : Args color_branches = true, color_taxa_names = true, exact = true, remove_bootstraps_below = nil, color_map_f = "/Users/moorer/projects/iroki/spec/test_files/basic_color_map_with_tags.txt", biom_f = nil, single_color = nil, name_map_f = nil, auto_color = "kelly", display_auto_color_options = false, newick_f = "/Users/moorer/projects/iroki/spec/test_files/basic.tre", out_f = "/Users/moorer/Desktop/hehe.nex"
Node: 13 of 13

real	0m5.903s
user	0m0.037s
sys	0m0.032s

A couple cool things here are that using the iroki_docker script always checks for the latest version of Iroki automatically before running! Also, you don't have to worry about specifying full paths to the Docker image. You can just submit relative paths as if you were running Iroki on the host machine.

Clone this wiki locally