Sign inSign up

jysgro/igv

By jysgro

•Updated over 8 years ago

Run IGV in Ubuntu 18.04 with Java 8

Image
Data science
0

279

jysgro/igv repository overview

⁠PURPOSE

Run IGV in a container. This came about when a Mac had Java 10 but IGV requires Java 8.

IGV: Integrative Genomics Viewer - Broad Institute https://software.broadinstitute.org/software/igv/⁠

IGV version installed: 2.4.11

Ubutu base used: ubuntu:18.04

⁠HOW TO RUN

Displaying the graphics from IGV requires X11, read below for Mac. (and further down for Windows.) Windows users might be able to replace XQuartz with MobaXterm (not tested) or another X software.

IGV will run in the Unix graphical environment X11. Below is a method I found online to accomplish this. See How to show X11 windows with Docker on Mac by Marc Reichelt https://bit.ly/2usa0bB⁠ (Archived June 2019 at https://bit.ly/2rwEk5Y⁠

Notably the DISPLAY had to be changed to docker.for.mac.localhost:0 as the suggested by the link below but host.docker.internal:0 also works.

This information came from https://docs.docker.com/v17.09/docker-for-mac/networking/#known-limitations-use-cases-and-workarounds⁠

The Mac has a changing IP address (or none if you have no network access). From 17.06 onwards our recommendation is to connect to the special Mac-only DNS name docker.for.mac.localhost which will resolve to the internal IP address used by the host.

DOCKER image: see https://github.com/jsgro/Docker_IGV⁠

⁠Set-up:

  • Install the latest XQuartz X11 server and run it
  • Activate the option ‘Allow connections from network clients’ in XQuartz settings (menu: Xquartz > Preferences... and click on Security tab.)
  • Crucial: Quit & restart XQuartz (to activate the setting)

Open a Terminal and run command: xhost + 127.0.0.1 or create and run the following script:

#!/bin/bash

# allow access from localhost
xhost + 127.0.0.1

⁠Create Docker container and run IGV

To add shared volume add -v as shown below for a (blank) directory here called dockershare mapped onto the /data directory that will be created on the container to "map" the shared folder.

docker run -it --rm -v /Users/$USER/dockershare:/data -e DISPLAY=docker.for.mac.localhost:0 jysgro/igv:2.4.11 /bin/bash

This command will create the container with a shell. IGV will NOT launch by default.

To start IGV simply issue the command: igv & and when done type exit to exit the container.

Note: igv is in the PATH as /usr/bin/igv

Thank you to Marc Reichelt (link above) for the very informative blog that makes this easy. Here is the important remark from his blog:

Notice the trick using docker.for.mac.localhost as display name. That’s a hostname that points to the host machine, so we don’t have to deal with changing IP addresses.

Indeed when I check inside the container:

# printenv DISPLAY
docker.for.mac.localhost:0
# 

⁠WINDOWS

Tested on MobaXterm Home Edition⁠ on Windows10.

Requires to turn Xserver on by clicking on top right X11 logo.

Requires to use the IP number provided by MobaXterm at start-up, for example:

➤ Your computer drives are accessible through the /drives path     │
     │ ➤ Your DISPLAY is set to 172.16.45.139:0.0                         │
     │ ➤ When using SSH, your remote DISPLAY is automatically forwarded   │
     │ ➤ Your HOME folder is not persistent: it will be erased on restart │
     │ ➤ Each command status is specified by a special symbol (✔ or ✘)   

Hence the command would be:

docker run -it --rm -v ${PWD}:/root -e DISPLAY=172.16.45.139:0.0  jysgro/igv:2.4.11 /bin/bash

However the set-up is very slow and unstable.

Tag summary

Content type

Image

Digest

Size

542.3 MB

Last updated

over 8 years ago

docker pull jysgro/igv:2.4.11