Skip to content

Running with the Docker image

Jambler edited this page Apr 22, 2020 · 4 revisions

Note: Make sure Docker is running

To use the image from Docker hub

This will pull the latest image from Docker hub and run genome creation.

docker run -ti -v "$PWD":/infiles -v '/local/path/to/genomes/:/genomes' jambler24/gengraph make_genome_graph --seq_file /infiles/sequences.txt --out_file_name run_name --out_file_path /genomes

To build the image from the DockerFile

docker build -f ./DockerFile --tag=ggimage .

To run the toolkit

Before running

When running the tool with a Docker image, there are some changes to the paths that you need to do.

  1. In the sequence file, the path to all genomes must become:
    /genomes/<sequence_name>.fa
  2. The -v flag in the docker run command creates links between the data on your system to locations within the Docker image. The flag is structured:
    -v <local path>:<location in Docker image>.
    1. Specify the path to the input files. This refers to the sequence file. If it is in your current directory, leave it as:
      -v "$PWD":/infiles If not, change it to:
      -v '/path/to/sequence/file/:/infiles'
    2. Specify the path to the genome files. This is mounted to the /genomes folder in the Docker image.
      -v '/local/path/to/genomes/:/genomes'
  3. Specify the tag used when building your image. In this case, it was: ggimage

The run code

docker run -ti -v "$PWD":/infiles -v '/local/path/to/genomes/:/genomes' ggimage make_genome_graph --seq_file /infiles/sequences.txt --out_file_name run_name --out_file_path /genomes

Results

The output files (run_name.xml etc.) will be placed in the directory where the genomes were found. In this case:
/local/path/to/genomes/