Skip to content

How to use Docker

Alessia edited this page May 16, 2017 · 12 revisions

Using YAMP with Docker is very simple, but getting the Docker image requires an extra independent step that should be performed (once) on each machine you will use to run YAMP.

Please note that this tutorial refers to the Example we used in the How to run YAMP tutorial and that you need to have Docker installed.

Pull or build the image

To use the software made available through the Docker container, you could either pull the pre-built image from DockerHub, using the following command:

docker pull alesssia/yampdocker

or build a local image using the file Dokerfile in the yampdocker folder. To build a local image, first access the yampdocker folder and then run the following command (be careful to add the dot!):

docker build -t yampdocker .

Done, now it is time to run YAMP with Docker!

Run YAMP with Docker

Regardless of the way you got your Docker image, it can be used by YAMP by adding the adding the -with-docker option followed by the image name (yampdocker), that is, the following command:

nextflow run YAMP.nf --reads1 R1 --reads2 R2 --prefix mysample --outdir outputdir 
  -with-docker yampdocker

where R1 and R2 represent the path to the raw data (two compressed FASTQ file), mysample is a prefix that will be used to label all the resulting files, and outputdir is the directory where the results will be stored.

So, to run YAMP with Docker on the example presented in the How to run YAMP) tutorial, one should run:

nextflow run YAMP.nf --reads1 ./data/ERR011089_1.fastq.gz --reads2 ./data/ERR011089_1.fastq.gz
 --prefix Meta_HIT_ERR011089 --outdir ./data

Simple, isn't it?