Ensembl / VEP_plugins

Plugins for the Ensembl Variant Effect Predictor (VEP)
Apache License 2.0
141 stars 117 forks source link

Failed to instantiate plugin AncestralAllele #736

Closed Mani3bigs closed 2 months ago

Mani3bigs commented 3 months ago

Hi,

I am running VEP by using ensembl vep docker with the version of 111. I ran the VEP for both versions GRCh38 and GRCh37, AncestralAllele plugin failed. I got the following Error:

For GRCh37:

WARNING: Failed to instantiate plugin AncestralAllele:
-------------------- EXCEPTION --------------------
MSG: ERROR: Could not write to FASTA lock file /plugins/homo_sapiens_ancestor_GRCh37_e71.fa.gz.vep.lock

STACK AncestralAllele::fasta_db /plugins/AncestralAllele.pm:212
STACK AncestralAllele::new /plugins/AncestralAllele.pm:101
STACK (eval) /opt/vep/src/ensembl-vep/modules/Bio/EnsEMBL/VEP/Runner.pm:908
STACK Bio::EnsEMBL::VEP::Runner::get_all_Plugins /opt/vep/src/ensembl-vep/modules/Bio/EnsEMBL/VEP/Runner.pm:907
STACK Bio::EnsEMBL::VEP::Runner::init /opt/vep/src/ensembl-vep/modules/Bio/EnsEMBL/VEP/Runner.pm:125
STACK Bio::EnsEMBL::VEP::Runner::run /opt/vep/src/ensembl-vep/modules/Bio/EnsEMBL/VEP/Runner.pm:200
STACK toplevel /opt/vep/src/ensembl-vep/vep:46
Date (localtime)    = Wed Aug 14 05:57:01 2024
Ensembl API version = 111

For GRCh38:

WARNING: Failed to instantiate plugin AncestralAllele:
-------------------- EXCEPTION --------------------
MSG: ERROR: Could not write to FASTA lock file /plugins/homo_sapiens_ancestor_GRCh38.fa.gz.vep.lock

STACK AncestralAllele::fasta_db /plugins/AncestralAllele.pm:211
STACK AncestralAllele::new /plugins/AncestralAllele.pm:100
STACK (eval) /opt/vep/src/ensembl-vep/modules/Bio/EnsEMBL/VEP/Runner.pm:908
STACK Bio::EnsEMBL::VEP::Runner::get_all_Plugins /opt/vep/src/ensembl-vep/modules/Bio/EnsEMBL/VEP/Runner.pm:907
STACK Bio::EnsEMBL::VEP::Runner::init /opt/vep/src/ensembl-vep/modules/Bio/EnsEMBL/VEP/Runner.pm:125
STACK Bio::EnsEMBL::VEP::Runner::run /opt/vep/src/ensembl-vep/modules/Bio/EnsEMBL/VEP/Runner.pm:200
STACK toplevel /opt/vep/src/ensembl-vep/vep:46
Date (localtime)    = Wed Aug 14 05:22:14 2024
Ensembl API version = 111

For GRCh37 command:

docker run --rm -it -v $PWD:/data/ -v ~/vep_plugins:/plugins/ ensemblorg/ensembl-vep:release_111.0 /opt/vep/src/ensembl-vep/vep --assembly GRCh37 --species homo_sapiens --fasta /data/hg19.fa --cache_version 111 --cache --dir /plugins/ --merged --use_given_ref --format vcf -i /data/E15_hc_vf_filtered_out.vcf --offline --tab -o /data/plugin_ancestral_out.txt --fork 4 --plugin AncestralAllele,/plugins/homo_sapiens_ancestor_GRCh37_e71.fa.gz --force_overwrite

For GRCh38 command: docker run --rm -it -v $PWD:/data/ -v ~/vep_plugins:/plugins/ ensemblorg/ensembl-vep:release_111.0 /opt/vep/src/ensembl-vep/vep --assembly GRCh38 --species homo_sapiens --fasta /data/Homo_sapiens.GRCh38.dna_sm.toplevel.fa --merged --cache --dir /plugins/ --cache_version 111 --use_given_ref --format vcf -i /data/E15_vf_filtered_out.vcf --offline --tab -o /data/E15_vep_out.txt --stats_file /data/E15_vep_summary_out.html --buffer_size 1000 --fork 4 --plugin AncestralAllele,/plugins/homo_sapiens_ancestor_GRCh38.fa.gz --force_overwrite

Note: ~/vep_plugins contains all the all the plugins and their files. I followed the steps for preparing the plugin files which mentioned in the VEP plugin documentation for both: https://asia.ensembl.org/info/docs/tools/vep/script/vep_plugins.html#ancestralallele

I couldn't solve this error. Can you help me out from this? Thank You!

nuno-agostinho commented 3 months ago

Hi @Mani3bigs,

Hope you are having a nice day!

The problem seems related with write permissions in the ~/vep_plugins folder. Can you confirm if it's possible to create a new file/folder outside of Docker in this folder first?

If you have write permissions normally, then we need to check why Docker is not able to do so. We have some tips on how to handle this in our documentation:

In some distributions (e.g. CentOS, Fedora, Red Hat Enterprise Linux) Docker daemon requires root privileges (i.e. needs to prefix the command with sudo), which might cause read/write issues to the mounted volume.

One solution is to use the option :Z within the Docker -v option (only from docker 1.7.0):

sudo docker run -t -i -v $HOME/vep_data:/data:Z ensemblorg/ensembl-vep

Another solution is to change the read/write access of the mounted volume ($HOME/vep_data):

chmod -R a+rwx $HOME/vep_data

Please try these steps and let me know if you are still having issues.

Thanks, Nuno

nuno-agostinho commented 2 months ago

Hey @Mani3bigs,

Did my suggestions helped you in any way or are you still having issues?

Cheers, Nuno

Mani3bigs commented 2 months ago

Hi @nuno-agostinho, I preprocessed the ancestral allele plugin data files again and ran the VEP by using docker. It's working fine now! Thank you!