Running with Docker - asoltis/MutEnricher GitHub Wiki

Introduction

This page describes how to obtain and run MutEnricher as a Docker image. Note that Docker installation on your system is assumed.

Contents

Pulling from Docker Hub

To pull a pre-built MutEnricher image from Docker hub, run:

docker pull asoltis/mutenricher

Upon completion, you should see the MutEnricher image in your list of container images (docker images).

Running a very basic command will display the top-level MutEnricher help page:

docker run -it asoltis/mutenricher

Building locally with Docker

Alternatively, users can build their own Docker image.

First, download the MutEnricher Dockerfile either by downloading/cloning the code repository or by downloading the Dockerfile itself.

Next, from the same working directory in which you saved the Dockerfile, build the image:

docker build -t mutenricher .

This will execute the build commands and create an image called "mutenricher" in your list of Docker images. Note that the image name is slightly different here - users can choose to name this as they see fit. You can test this run as before:

docker run -it mutenricher

Running Docker image

The actual run commands/options are as outlined in the Quickstart guide and Tutorial, though these must now be run through the Docker image via docker run.

For example, to view the MutEnricher coding module help page, execute:

docker run -it asoltis/mutenricher python mutEnricher.py coding -h

To pass input and report output from the container, data volumes must be mounted when running the image. The output directory for your run must also be writable by the image. As example, if you have downloaded the MutEnricher example_data, to run a basic test on this data:

## cd to example_data and prepare output directory
cd /path/to/example_data
outdir=out
mkdir -p $outdir
chmod 775 $outdir # make sure output directory is writable

## create VCF input files list with correct paths
> test_vcf_paths.txt
ls vcfs/*.vcf.gz | while read VCF; do
name=$(basename $VCF .vcf.gz)
echo -e "/data/$VCF\t$name" >> test_vcf_paths.txt
done

## Run MutEnricher with docker
docker run -it --rm --name RUN 
-v /path/to/example_data:/data # mount the volume with your input data
-v $outdir/:/tmp # mount the output volume
asoltis/mutenricher
python mutEnricher.py noncoding
/data/annotation_files/ucsc.refFlat.20170829.promoters_up2kb_downUTR.no_chrMY.bed
/data/test_vcf_paths.txt
-o /tmp 
--prefix noncoding_example_global_bg

This will execute MutEnricher's noncoding module on the example VCF data and return output to the local "out" directory.