pirovc / metameta

Other
23 stars 10 forks source link

changed gbk2faa.pl command to use the conda-perl #15

Open samnooij opened 5 years ago

samnooij commented 5 years ago

tldr; The gbk2faa.pl script uses a locally installed perl (/usr/bin/perl), which did not work on the machine I use. I modified the command to use the conda-installed perl.


When running MetaMeta, the rule 'kaiju_db_custom_1' failed with the error:


BEGIN failed--compilation aborted at - line 2.```
So it seemed to look for perl libraries installed locally, not those provided by conda. I figured this was probably due to the line `#! /usr/bin/perl -w` in the gbk2faa.pl script. Therefore, I changed the shell command in the Snakefile to `/usr/bin/env perl gbk2faa.pl`.
Then, the process failed with the message `Can't open perl script "gbk2faa.pl": No such file or directory`, so apparently the script could not be found anymore. I decided to fix that by appending the absolute path to the script by searching for the conda environment directory with `which` and prepend that to `gb2faa.pl`. Now it all seems to work as intended.