bxlab / metaWRAP

MetaWRAP - a flexible pipeline for genome-resolved metagenomic data analysis
MIT License
394 stars 191 forks source link

Functionally Annotate Bins Error: Can't locate Bio/Root/Version.pm in @INC #279

Open cczhao2018 opened 4 years ago

cczhao2018 commented 4 years ago

Hi, ursky. At first, I thought it was prokka's Perl module problem, because prokka will give this error when I type "prokka --help", then I use conda to install perl-db-file, prokka problem was solved. But, if I use "metawrap annotate_bins" it will report this error. Then, I reinstalled metawrap(v 1.2.2) in an isolated conda environment by "better installation", and prokka can work alone too, while "metawrap annotate_bins" still give this problem.

**Log file:**
metawrap annotate_bins -o FUNCT_ANNOT -t 96 -b /home/liuhaiyan/cczhao/DB/metawrap/96core_Bin_reassembly_90_10/reassembled_bins

--------------------------------------------------------------------------------------------------
                                             BEGIN ANNNOTAION PIPELINE!                                          
--------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------
                              setting up output folder and copything over bins...                            
--------------------------------------------------------------------------------------------------

/home/liuhaiyan/cczhao/anaconda3/envs/metawrap-anno/bin/metawrap-scripts/shorten_contig_names.py /home/liuhaiyan/cczhao/DB/metawrap/96core_Bin_reassembly_90_10/reassembled_bins/bin.100.orig.fa > FUNCT_ANNOT/tmp_bin.fa

--------------------------------------------------------------------------------------------------
                                          NOW ANNOTATING bin.100.orig                                         
--------------------------------------------------------------------------------------------------

prokka --quiet --cpus 96 --outdir FUNCT_ANNOT/prokka_out/bin.100.orig --prefix bin.100.orig FUNCT_ANNOT/tmp_bin.fa

*****************************************************************************************************
                        Something went wrong with annotating bin.100.orig. Exiting...                        
*****************************************************************************************************

**Err file:**
Can't locate Bio/Root/Version.pm in @INC (you may need to install the Bio::Root::Version module) (@INC contains: /home/liuhaiyan/cczhao/anaconda3/envs/metawrap-anno/bin/../perl5 /home/liuhaiyan/cczhao/anaconda3/envs/metawrap-anno/lib/site_perl/5.26.2/x86_64-linux-thread-multi /home/liuhaiyan/cczhao/anaconda3/envs/metawrap-anno/lib/site_perl/5.26.2 /home/liuhaiyan/cczhao/anaconda3/envs/metawrap-anno/lib/5.26.2/x86_64-linux-thread-multi /home/liuhaiyan/cczhao/anaconda3/envs/metawrap-anno/lib/5.26.2 .) at /home/liuhaiyan/cczhao/anaconda3/envs/metawrap-anno/bin/prokka line 32.
BEGIN failed--compilation aborted at /home/liuhaiyan/cczhao/anaconda3/envs/metawrap-anno/bin/prokka line 32.
ursky commented 4 years ago

I cant give an exact reason why prokka works outside the metawrap but not inside, but if you know a little bash you could troubleshoot it by going into the annotate_bins.sh script and looking at the exact prokka command being run. You can modify it or try to run it externally to see whats going on.

ehenrion commented 4 years ago

I think it's because of this line in prokka's code : use lib "$FindBin::RealBin/../perl5"; # for bundled Perl modules

With the metaWRAP installation, it looks like it should point to "../lib/perl5" instead. Creating a symlink should resolve the issue.

@cczhao2018 maybe something like this would help : cd /home/liuhaiyan/cczhao/anaconda3/envs/metawrap-anno/; ln -s lib/perl5