statgen-tools Docker ImageInstructions for accessing your data using Volume Mounting on Windows and Linux.
This image provides a comprehensive environment containing essential tools for statistical genetics, genomics data manipulation (VCF, BAM/SAM, BED), and quality control, built on Ubuntu 18.04.
This container includes pre-compiled, widely-used bioinformatics utilities, ensuring a consistent and reproducible analysis workflow.
build-essential, git, zlib1g-dev, and various essential libraries (libssl-dev, libgsl0-dev, libperl-dev, etc.).To download and use the latest version of this image:
docker pull <your-docker-username>/statgen-tools:latest
While included, users should be aware that the version of **BEDOPS** installed in this container may **cause segmentation faults** during certain operations. Exercise caution or consider building a more recent version if BEDOPS is critical to your workflow.
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) to map your local data directory to a path inside the container.
The standard syntax is:
docker run -it --rm -v <HOST_PATH>:/data statgen-tools <COMMAND_TO_RUN>
| 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/. |
Use standard Unix-style paths for the host volume.
Scenario: Your input data is located at /home/user/data/genetics.
docker run -it --rm -v /home/user/data/genetics:/data statgen-tools plink --bfile /data/input_file --out /data/results
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 C:\Users\User\ProjectData.
docker run -it --rm -v C:/Users/User/ProjectData:/data statgen-tools bcftools view -H /data/input.vcf
Important: Note the use of C:/Users/User/ProjectData (forward slashes and drive letter) for the Windows path.
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.