Docker¶
VNtyper 2 provides pre-built Docker images with all dependencies included.
Pull Pre-built Images¶
Build from Source¶
git clone https://github.com/hassansaei/VNtyper.git
cd VNtyper
DOCKER_BUILDKIT=1 docker build -f docker/Dockerfile -t vntyper:latest .
Or use Make:
Run the Pipeline¶
docker run -w /opt/vntyper --rm \
--user $(id -u):$(id -g) \
-v /path/to/input:/opt/vntyper/input \
-v /path/to/output:/opt/vntyper/output \
vntyper:latest \
vntyper pipeline --bam /opt/vntyper/input/sample.bam \
-o /opt/vntyper/output/sample/
File Permissions
Use --user $(id -u):$(id -g) so output files are owned by your host user, not root.
Volume Mounts¶
| Host Path | Container Path | Purpose |
|---|---|---|
| Input directory | /opt/vntyper/input | BAM/FASTQ files |
| Output directory | /opt/vntyper/output | Pipeline results |
Verify Installation¶
docker run --rm vntyper:latest vntyper --version
docker run --rm vntyper:latest samtools --version
docker run --rm vntyper:latest java -version
Health Checks¶
The container includes a built-in health check. Monitor status with:
View container logs:
API Server¶
Start the FastAPI server for programmatic access:
docker run -d -p 8000:8000 \
-v /path/to/input:/opt/vntyper/input \
-v /path/to/output:/opt/vntyper/output \
vntyper:latest
Submit a job:
curl -X POST "http://localhost:8000/run-job/" \
-F "file=@sample.bam" \
-F "thread=4" \
-F "reference_assembly=hg38" \
-F "fast_mode=true" \
-F "archive_results=true"
Download results after completion:
Apptainer / Singularity¶
Convert the Docker image to an Apptainer SIF:
Run with Apptainer: