Sign inSign up

mdoering88/openprimer

By mdoering88

•Updated almost 6 years ago

Multiplex PCR Primer Design and Analysis

Image
3

1.8K

mdoering88/openprimer repository overview

This README provides the basic knowledge that is necessary for using openPrimeR with Docker. We start with the basics and then the specifics.

⁠Docker Basics

⁠Theory
  • An image contains all of the dependencies to run an application in a system-independent manner
  • An image can be used to spawn one or multiple containers, which are stateful instantiations of images
  • If you are using a Docker image to work with an application, you probably always want to use the same container
⁠Practice

The following is a list of basic command-line instructions when working with docker:

  • docker images: List all images that are available locally
  • docker ps: list all of the running containers
  • docker ps -a: list all containers, including stopped containers
  • docker stop: stop a container
  • docker rm: remove a container
  • docker run: run a container based on an image
  • docker start: start an existing container

⁠How to use the openPrimeR Docker Image?

1. Pull the openPrimeR image:

docker pull mdoering88/openprimer

2. Verify that the pull was successful

docker images

The latest openPrimeR docker image should now be listed.

3) Starting the container for the first time

Start the container with the following command:

docker run -d --net host mdoering88/openprimer

  • We use -d to state that the container runs in detached mode. This means that the container is running in the background.
  • We use --net host such that the host network can access the network of the container. This is necessary for accessing the Shiny application from a host browser.

To work with the user interface:

Open a browser on your machine and navigate to the following URL: http://localhost:3838. The openPrimeR user interface should appear now.

To work with the R library, we need to enter the container. This can be done in the following two ways:

  • Manually: run docker ps -a, copy the container ID and then run docker exec -it <CONTAINER_ID> bash.

4) Re-using existing containers

Say that you have shutdown your computer. This means that the existing container has been stopped. To continue using that container, we simply need to start it again:

  • docker ps -a: copy ID of container to start
  • docker start <CONTAINER_ID> (replace <CONTAINER_ID> with the ID of the container)

Alternatively, you can use the following one-liner to start the last container:

CONTAINER_ID=$(docker ps -a | grep mdoering88/openprimer | tr -s ' ' | cut -f1 -d ' ' | head -n1) && docker start $CONTAINER_ID

Now you can work with the container as described in Step 3).

⁠Advanced Usage

⁠Accessing Files

To retrieve files from the docker container, there are two ways:

  • Using docker copy: First, find the file you are interested in using an interactive session (docker exec). Then, copy that file from the container to the host, for example, docker cp 181d6d6ba232:/srv/primer_design/rna.ps ./.
  • Using docker volume mounts: For this, you have to adapt the docker run command. For example, docker run -v /path/to/local_dir:/path/to/container_dir/. Now, when you write to /path/to/container_dir/ in the container, the files will be available on your local machine under /path/to/local_dir.

Tag summary

Content type

Image

Digest

Size

2.6 GB

Last updated

almost 6 years ago

docker pull mdoering88/openprimer