skip to content

📘 Guide to Running the statgen-tools Docker Image

Instructions for accessing your data using Volume Mounting on Windows and Linux.

1. Universal Command Syntax

To use your bioinformatics or statistical tools inside the statgen-tools image, you must run it as a container. Crucially, you need to use **Volume Mounting** (-v) so the container can access the data files on your host machine.

The standard syntax is:

docker run -it --rm -v <HOST_PATH>:/data statgen-tools <COMMAND_TO_RUN>

Command Flags Breakdown

Flag Description Purpose
-it Interactive and TTY. Allows interaction and proper tool execution.
--rm Remove. Automatically cleans up the container when it exits.
-v Volume Mount. Maps host data to the container's file system (Critical).
:/data Destination folder inside the Container. All file references within the container must use /data/.

2. 🐧 Running on Linux (or Windows WSL)

Use standard Unix-style paths for the host volume.

Scenario: Your input data is located at /home/user/projects/genomics_data.

Execution Command Example

docker run -it --rm -v /home/user/projects/genomics_data:/data statgen-tools plink --bfile /data/input_file --out /data/results

3. đŸ–„ïž Running on Windows (PowerShell/CMD)

When using Windows, you must ensure your file path uses the drive letter and **forward slashes** (/) for the host path.

Scenario: Your input data is located at D:\Research\StatGenData.

Execution Command Example

docker run -it --rm -v D:/Research/StatGenData:/data statgen-tools bcftools view -Oz -s sample_id /data/my_vcf.vcf > /data/filtered.vcf.gz

Important: Note the use of D:/Research/StatGenData (forward slashes and drive letter) for the Windows path.


4. Interactive Shell (Troubleshooting)

If you are unsure which command to run, you can run an interactive Bash shell inside the container to explore the installed tools and data files:

docker run -it --rm -v <HOST_PATH>:/data statgen-tools /bin/bash

Once inside, use ls /data to verify your host files are visible, and type exit to stop the container.