Skip to main content

Docker Run Command

PROTÉGÉ PD runs in a Docker container with Python 3.10 and includes a minimal interactive web interface built with Dash. Here’s the complete command structure:
docker run --rm \
  --mount type=bind,source=/your/files/path/,target=/root/. \
  --name protege \
  -p 127.0.0.1:8050:8050 \
  --cpus 4 \
  ddelgadillo/protege_base:v1.0.2 \
  protege-pd -s myseqs.fna

Command Breakdown

Container Lifecycle

--rm
flag
Automatically removes the container when it exits. This ensures no orphaned containers accumulate on your system after each run.
--name
string
default:"protege"
Assigns a friendly name to the running container for easier reference and management.

Volume Mounting

--mount
bind mount
required
Binds your local file system to the container’s file system, allowing PROTÉGÉ to access input files and write output files.Parameters:
  • type=bind - Specifies a bind mount (direct mapping)
  • source=/your/files/path/ - Your local directory containing FASTA files
  • target=/root/. - Container’s working directory where files are accessible
Replace /your/files/path/ with the absolute path to your local directory containing FASTA files. Relative paths may not work correctly.
Example mount points:
--mount type=bind,source=/home/username/protege-data/,target=/root/.

Port Mapping

-p
port mapping
default:"127.0.0.1:8050:8050"
Maps the container’s web interface port to your local machine.Format: host_ip:host_port:container_port
  • 127.0.0.1 - Localhost only (secure, not accessible from network)
  • 8050 (first) - Port on your local machine
  • 8050 (second) - Port inside the container where Dash runs
After running PROTÉGÉ, access the web interface at http://127.0.0.1:8050 in your browser.

CPU Allocation

--cpus
integer
default:"4"
Limits the number of CPU cores the container can use. PROTÉGÉ performs sequence alignment and primer design, which benefits from multiple cores.Recommendations:
  • Small datasets (< 50 sequences): 2-4 CPUs
  • Medium datasets (50-200 sequences): 4-8 CPUs
  • Large datasets (> 200 sequences): 8+ CPUs

Working Directory

The container’s working directory is /root/. All input files specified with -s are relative to this directory, which maps to your mounted source path. Example:
# If your file is at: /home/user/data/sequences.fna
# And you mount: source=/home/user/data/,target=/root/.
# Then specify: -s sequences.fna

Common Usage Patterns

Basic Run (Default Parameters)

docker run --rm \
  --mount type=bind,source=/path/to/data/,target=/root/. \
  --name protege \
  -p 127.0.0.1:8050:8050 \
  --cpus 4 \
  ddelgadillo/protege_base:v1.0.2 \
  protege-pd -s genes.fasta

Custom Consensus Threshold

docker run --rm \
  --mount type=bind,source=/path/to/data/,target=/root/. \
  --name protege \
  -p 127.0.0.1:8050:8050 \
  --cpus 4 \
  ddelgadillo/protege_base:v1.0.2 \
  protege-pd -s genes.fasta -c 85
This sets consensus percentage to 85% instead of the default 90%.

Longer Primers with Verbose Output

docker run --rm \
  --mount type=bind,source=/path/to/data/,target=/root/. \
  --name protege \
  -p 127.0.0.1:8050:8050 \
  --cpus 8 \
  ddelgadillo/protege_base:v1.0.2 \
  protege-pd -s genes.fasta -d 10 -v
Uses 10-codon primers (30 nucleotides) and enables verbose logging.

Disable Gap Consensus

docker run --rm \
  --mount type=bind,source=/path/to/data/,target=/root/. \
  --name protege \
  -p 127.0.0.1:8050:8050 \
  --cpus 4 \
  ddelgadillo/protege_base:v1.0.2 \
  protege-pd -s genes.fasta -g
The -g flag disables gap consideration in consensus calculations. Positions with gaps will be excluded.

Viewing Help

docker run --rm \
  --mount type=bind,source=.,target=/root/. \
  --name protege \
  -p 127.0.0.1:8050:8050 \
  --cpus 4 \
  ddelgadillo/protege_base:v1.0.2 \
  protege-pd --help

Accessing the Web Interface

Once PROTÉGÉ starts processing:
  1. Watch the terminal for processing messages
  2. When you see “Dash is running on http://0.0.0.0:8050/
  3. Open your browser to http://127.0.0.1:8050
  4. The interactive primer visualization interface will load
The web interface provides interactive visualizations of primer candidates and allows you to download results.

Stopping PROTÉGÉ

To stop the running container:
  • Press Ctrl+C in the terminal where Docker is running
  • Or in another terminal: docker stop protege
The --rm flag ensures the container is automatically removed after stopping.

Troubleshooting

Check:
  • Docker is installed and running
  • You’ve pulled the correct image version
  • Port 8050 is not already in use
Fix port conflicts:
# Use a different port on your host
-p 127.0.0.1:8051:8050
# Then access at http://127.0.0.1:8051
Check:
  • The file exists in your mounted directory
  • You’re using the filename only, not the full path
  • File permissions allow reading
Verify mount:
docker run --rm \
  --mount type=bind,source=/your/path/,target=/root/. \
  ddelgadillo/protege_base:v1.0.2 \
  ls -la /root/
Increase Docker memory allocation:
  • Docker Desktop: Settings → Resources → Memory
  • Recommended: 4GB+ for large datasets
Optimize:
  • Increase --cpus value (up to your system’s core count)
  • Ensure Docker has adequate memory allocated
  • Close other resource-intensive applications

Build docs developers (and LLMs) love