Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VirSorter conda version not running #31

Closed
cmajones opened this issue Jul 11, 2018 · 15 comments
Closed

VirSorter conda version not running #31

cmajones opened this issue Jul 11, 2018 · 15 comments

Comments

@cmajones
Copy link

Hi Simon,

Thanks for all your work on VirSorter. I'm having trouble running the command line version using a conda environment.

When putting in this command:
wrapper_phage_contigs_sorter_iPlant.pl -f V-MRN-001-12_scaffolds.fasta --db 2 --ncpu 4 --data-dir /home/casey/local/virsorter/virsorter-data

I get back the two files attached.

err.txt
VirSorter_terminal_output.txt

'Namely, in the err output, I get:

Can't locate Bio/Seq.pm in @INC (you may need to install the Bio::Seq module)

and Error: Failed to open sequence file /home/casey/casey_backup/mareen/MAREEN_virome_all/concat_data/V-MRN-001-12_S21_R1_assembly/virsorter-out/fasta/VIRSorter_prots.fasta for reading

I've installed bioperl and metagenemark to try and fix these problems.

Do you have any other suggestions to get this to work? I would use CyVerse but have 100+ files to run in parallel on our cluster.

Thanks!

@simroux
Copy link
Owner

simroux commented Jul 12, 2018

Hi,
It looks like the conda installation did not suceed, or the conda environment is not properly loaded, since the "perl-bioperl" should have been installed.

Did you have any error message when running "conda create --name virsorter -c bioconda mcl=14.137 muscle blast perl-bioperl perl-file-which hmmer=3.1b2 perl-parallel-forkmanager perl-list-moreutils diamond=0.9.14"

@cmajones
Copy link
Author

Hi Simon,

I did a fresh install of the conda environment and I'm still getting the following output:

err.txt
VirSorter_output.txt

@simroux
Copy link
Owner

simroux commented Jul 12, 2018

So the error is different now, it looks like the scripts used by VirSorter are not in your path. Did you follow these two steps in the installation:
ln -s ~/Applications/VirSorter/wrapper_phage_contigs_sorter_iPlant.pl ~/miniconda/envs/virsorter/bin ln -s ~/Applications/VirSorter/Scripts ~/miniconda/envs/virsorter/bin
and replaced "~/miniconda/envs/" by your conda installation folder ?

@cmajones
Copy link
Author

Hi Simon,

Sorry about that - I did a fresh install of the conda environment again and am still getting the Can't locate Bio/Seq.pm in @INC error. I did not get an error message when installing the environment.

Error log: err.txt
Terminal out: VirSorter_out_2.txt

@simroux
Copy link
Owner

simroux commented Jul 13, 2018

Can you double check if Bio::Seq is correctly installed in the conda environment ? This can be done by loading the environment and then trying to load only this module, e.g.:

source activate virsorter
perl -e "use Bio::Seq;"

If you get an error message, it means it's unfortunately an issue with conda, not VirSorter.

@cmajones
Copy link
Author

Yes I still get the same error message:

Can't locate Bio/Seq.pm in @INC (you may need to install the Bio::Seq module) (@INC contains: /home/casey/miniconda3/envs/virsorter_3/lib/site_perl/5.26.2/x86_64-linux-thread-multi /home/casey/miniconda3/envs/virsorter_3/lib/site_perl/5.26.2 /home/casey/miniconda3/envs/virsorter_3/lib/5.26.2/x86_64-linux-thread-multi /home/casey/miniconda3/envs/virsorter_3/lib/5.26.2 .) at -e line 1. BEGIN failed--compilation aborted at -e line 1.

I will try to find a fix and let you know here.

@cmajones
Copy link
Author

Hi Simon, @gavinmdouglas in my lab found a fix for this:

ln -s /home/casey/perl5/lib/perl5/Bio/ /home/casey/miniconda3/envs/virsorter_3/lib/site_perl/5.26.2/x86_64-linux-thread-multi

And adding the following to my .bashrc file

export PERL5LIB=/home/casey/perl5/lib/perl5/

Thanks for helping me locate the issue.

@simroux
Copy link
Owner

simroux commented Jul 13, 2018

I'm still surprised that conda couldn't install BioPerl by itself, but happy that you found a fix to this issue !

Best,
Simon

@simroux simroux closed this as completed Jul 13, 2018
@marschmi
Copy link

More than a year later, I also had this issue with Conda and this post was very helpful! Though, I couldn't link to the perl files on my lab's server. Just in case other people have this issue, here's another solution by pulling the actual perl files from GitHub:

  1. Clone the BioPerl GitHub repo.

  2. Copy the lib/Bio/ folder and all of it's contents to the lib folder in the VirSorter conda environment:

cp -r relPath/to/lib/Bio relPath/to/miniconda3/envs/virsorter/lib/5.26.2/
  1. Now onto VirSort-ing! :)

@simroux
Copy link
Owner

simroux commented Nov 14, 2019

Thanks for sharing this tip !

@hoelzer
Copy link

hoelzer commented Feb 7, 2020

Hi all, I also run into such an issue with bioperl and was able to solve it like this:

conda create -n virsorter -c bioconda perl-bioperl-core=1.007002 virsorter=1.0.6

I hope that also helps others. cheers

@CynthiaChibani
Copy link

Hi all, I also run into such an issue with bioperl and was able to solve it like this:

conda create -n virsorter -c bioconda perl-bioperl-core=1.007002 virsorter=1.0.6

I hope that also helps others. cheers

This one worked for me, thank you

@kyuinHwang
Copy link

I solved the same problem recently,

In my case, this problem occurs since the conda installed Bioperl into the "minicondaPath/pkgs/perl-bioperl-1.6.924-4" instead of "minicondaPath/envs/virsorter/lib/site_perl/5.26.2" even though the @inc is only include the "minicondaPath/envs/virsorter/lib/site_perl/5.26.2"

Therefore, I solved the problem by adding the following commands into the
minicondaPath/envs/virsorter/etc/conda/activate.d/update_perllib.sh

#!/bin/sh
export OLD_PERL5LIB=$PERL5LIB
export PERL5LIB=$PERL5LIB:minicondaPath/pkgs/perl-bioperl-1.6.924-4/lib/perl5/site_perl/5.22.0
#Plz, don't forget to replace "minicondaPath" into the path you installed conda.

I hope my solution is helpful to others.

@simroux
Copy link
Owner

simroux commented Feb 3, 2021

Thanks for sharing !

@Qin-2021
Copy link

Hi all, I also run into such an issue with bioperl and was able to solve it like this:

conda create -n virsorter -c bioconda perl-bioperl-core=1.007002 virsorter=1.0.6

I hope that also helps others. cheers

this one works for me thxthx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants