Using a Docker image with ensembl-vep
0
2
Entering edit mode
23 months ago
langziv ▴ 70

Hi.
I'm trying to run ensembl-vep with Docker from a python code on a Linux server. When the following Docker command runs

docker run -t -i -v $HOME/vep_data:/opt/vep/.vep ensemblorg/ensembl-vep

the command line is changed (it enters the Docker image), and the script pauses, until I exit the image by pressing ctrl+D. The next command in the script is

vep --cache --offline --format vcf --vcf --force_overwrite \
  --input_file input/input.vcf \
  --output_file output/output.vcf'''

and now that the script is out of the image the input folder that's specified in the command is not recognized.

Is there a way to use the Docker image without entering the image command line interface?
I used a Docker image before and this scenario did not happen, yet I couldn't find what made the difference between the two commands.
Thanks.

Linux ensembl-vep Docker • 2.3k views
ADD COMMENT
3
Entering edit mode

Try removing -i -t from your docker run command these will put you in container in interactive mode. You command should look something like this (you should organize your input/output folders):

docker run -v "$HOME/vep_data":"/opt/vep/.vep" ensemblorg/ensembl-vep \
  vep --cache --offline --format vcf --vcf --force_overwrite \
  --input_file input/input.vcf \
  --output_file output/output.vcf
ADD REPLY
2
Entering edit mode

Also consider switching to Apptainer (formerly Singularity) images. You can easily convert an existing Docker image to Apptainer or use e.g. ensembl-vep:108.2--pl5321h4a94de4_0 from the Galaxy Depot. In contrast to Docker, Apptainer doesn't require root permissions, which is imho way safer if you invoke the container by a script.

ADD REPLY
1
Entering edit mode

You can just pull from docker hub with singularity. They added a how to on the manual page: https://www.ensembl.org/info/docs/tools/vep/script/vep_download.html#singularity

ADD REPLY

Login before adding your answer.

Traffic: 2647 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6