simroux / VirSorter

Source code of the VirSorter tool, also available as an App on CyVerse/iVirus (https://de.iplantcollaborative.org/de/)
GNU General Public License v2.0
104 stars 30 forks source link

VIRSorter_global-phage-signal.csv and Predicted_viral_sequences directory empty #78

Closed sxh1136 closed 4 years ago

sxh1136 commented 4 years ago

Hi there,

I've run virsorter via the perl wrapper script on a few samples and each time both the VIRSorter_global-phage-signal.csv file and Predicted_viral_sequences directory are empty. All the other directories contain the relevant outputs.

Here are my err and out files: err.txt out.txt

Thanks for your help!

simroux commented 4 years ago

Hi,

It looks like the Perl module "Parallel::ForkManager" was not properly installed. This is typically done using conda ("conda install perl-parallel-forkmanager"). Note that to entirely re-run VirSorter, you should remove the existing output directory (the one with the empty VIRSorter_global-phage-signal.csv).

Best, Simon

sxh1136 commented 4 years ago

I tried to install via conda, and also a fresh install but I'm still getting the same issue and err log. I also tried to install via dockerhub but I'm getting this error:

Can't open '/wdir/Phage_complete_refseq_post2018.fasta' for reading: 'No such file or directory' at /usr/local/bin/wrapper_phage_contigs_sorter_iPlant.pl line 188

This is the command I'm using:

docker run -v /home/ubuntu/aqua_amr/virsorter-data:/data -v /home/ubuntu/phageome/benchmark/fragments/virsorter-phage:/wdir -w /wdir --rm simroux/virsorter:v1.0.5 --db 2 --fna /wdir/Phage_metagenome_01.fasta

Thanks for your help in advance, Stan

simroux commented 4 years ago

Ok, let's first verify that it's in fact a perl issue. Could you tried the following command (after loading the perl environment):

perl -e "use Parallel::ForkManager;"

and if you get an error, could you try:

perl -e "print qq(@INC)"

And check the paths in which perl looks for libraries ?

sxh1136 commented 4 years ago

perl -e "use Parallel::ForkManager;" :

Can't locate Parallel/ForkManager.pm in @INC (you may need to install the Parallel::ForkManager module) (@INC contains: /home/linuxbrew/.linuxbrew/Cellar/perl/5.28.1/lib/perl5/site_perl/5.28.1/x86_64-linux-thread-multi /home/linuxbrew/.linuxbrew/Cellar/perl/5.28.1/lib/perl5/site_perl/5.28.1 /home/linuxbrew/.linuxbrew/Cellar/perl/5.28.1/lib/perl5/5.28.1/x86_64-linux-thread-multi /home/linuxbrew/.linuxbrew/Cellar/perl/5.28.1/lib/perl5/5.28.1 /home/linuxbrew/.linuxbrew/lib/perl5/site_perl/5.28.1) at -e line 1. BEGIN failed--compilation aborted at -e line 1.

perl -e "print qq(@INC)" returned:

/home/linuxbrew/.linuxbrew/Cellar/perl/5.28.1/lib/perl5/site_perl/5.28.1/x86_64-linux-thread-multi /home/linuxbrew/.linuxbrew/Cellar/perl/5.28.1/lib/perl5/site_perl/5.28.1 /home/linuxbrew/.linuxbrew/Cellar/perl/5.28.1/lib/perl5/5.28.1/x86_64-linux-thread-multi /home/linuxbrew/.linuxbrew/Cellar/perl/5.28.1/lib/perl5/5.28.1 /home/linuxbrew/.linuxbrew/lib/perl5/site_perl/5.28.1%

So it appears perl isn't grabbing libraries from the conda install?

simroux commented 4 years ago

Right, I suspect that's what's happening. This is a known issue with Conda, although weirdly it doesn't seem to affect all users.

We have a work-around in the readme: https://github.com/simroux/VirSorter#note-for-conda-installation Basically it's adding the path to the conda folder to the PERL5LIB environment variable automatically when the environment is loaded. Let me know if this helped (in theory it should let you load "Parallel::ForkManager").

sxh1136 commented 4 years ago

It worked in the end thanks! I had to change the export path since my site_perl was elsewhere and do the Bio fix from #74 but it runs perfectly now!