Closed jaeddy closed 7 years ago
Hey @jaeddy;
This is a pretty common error message. As you know, it signs that the module can't be found. Since we are dealing with a container and a conda installation, the problem may come from different sources.
It seems to be looking in the default Perl path for the container but not the conda-specific path. I can't tell whether this is a problem with the BioContainers image or with the VEP recipe.
The perl interpreter will always look at the default place plus any other directory specified on the script. In this particular case, what's going on is that the module is being installed by conda on the conda directory, not the default directory for Perl modules. There is a way to circumvent this during run time, you just need to run the script like this:
perl -I /opt/conda/lib/perl5/site_perl/5.22.0/ /opt/conda/bin/variant_effect_predictor.pl --help
The -I
(capital i) flag tells the interpreter that you are adding another directory to the @INC array on the fly.
When I run it like that I also have another error from a missing DBI module. So my guess here is that you will have the same problems with other modules, so:
2) You mentioned about a recipe but, your exemple is using the base image and you are installing thing manually, so my second suggestion is to you to create a real recipe with all directives to have your script running.
I hope that can help you, I'm closing the issue but let me know if you need further asisstance
good luck
Thanks, @prvst! My understanding of Perl is admittedly rough. Working with that information, I was able to get the tool working within the container using these commands:
export PERL5LIB="/opt/conda/lib/perl5/site_perl/5.22.0"
export PERL5LIB="/opt/conda/lib/perl5/site_perl/5.22.0/x86_64-linux-thread-multi:$PERL5LIB"
Per your second point, I need to get up to speed on writing my own conda recipes - hopefully that will happen soon. Is there a good rule of thumb for how best to combine dependencies when building recipes/containers? For example, if some tool X
required samtools
, would you include samtools
in the recipe for X
; or would you install both samtools
and X
via conda in the Dockerfile?
I'm glad to know that you manage to have that working.
You should try conda first if your software is available there. Have in mind that this is a general guideline, sometimes depending on the situation, like this problem you had, for example, if you feel that the conda installation can create some problems, then go ahead and include the software.
Posted this in the 'bioconda-recipes' repo earlier and was directed here. I'm trying to build a Docker image with the
variant-effect-predictor
package and another tool, but I'm running into an issue with the installed script not detecting the requiredCGI
Perl module.I'm using the base image from BioContainers to manually test the VEP install. The installation with
conda
seems to work fine, but I get an error when I try to run the tool. It seems to be looking in the default Perl path for the container but not the conda-specific path. I can't tell whether this is a problem with the BioContainers image or with the VEP recipe.Dockerfile here: https://github.com/BioContainers/containers/blob/master/biocontainers/Dockerfile
Here's the error message:
Confirming that CGI was installed by the conda recipe under
/opt/conda/lib/
: