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

Step 1 failed #71

Closed kks-vir closed 4 years ago

kks-vir commented 4 years ago

Hi!

VirSorter is not working for me. I don't know what I am doing wrong. Could you help me please?

Here is what I am trying to run:

$ wrapper_phage_contigs_sorter_iPlant.pl -f contigs.fasta --db 1 --wdir virsorter_out --ncpu 4 --data-dir /proj/uppstore2018116/caroline/virsorter-data/ Bin : /domus/h1/carolt/miniconda3/envs/virsorter/bin Dataset : VIRSorter Input file : contigs.fasta Db : 1 Working dir : virsorter_out Custom phages : Data dir : /proj/uppstore2018116/caroline/virsorter-data/ Num CPUs : 4 blastp : blastp

Started at Tue Apr 28 10:16:54 2020 Step 0.5 : /domus/h1/carolt/miniconda3/envs/virsorter/bin/Scripts/Step_1_contigs_cleaning_and_gene_prediction.pl VIRSorter virsorter_out/fasta virsorter_out/fasta/input_sequences.fna 2 >> virsorter_out/logs/out 2>> virsorter_out/logs/err

Step 1 failed, we stop there: either virsorter_out/fasta/VIRSorter_prots.fasta or virsorter_out/fasta/VIRSorter_nett_filtered.fasta were not found

Thanks in advance Caroline.

simroux commented 4 years ago

Hi, This looks like a potential issue with metageneannotator. Could you paste here the content of virsorter_out/logs/out, virsorter_out/logs/err, and the list of files in virsorter_out/fasta ?

Simon

kks-vir commented 4 years ago

Sure! Here it is:

PATH: /virsorter_out/logs/err CONTENT: Can't locate Bio/Seq.pm in @INC (you may need to install the Bio::Seq module) (@INC contains: /domus/h1/carolt/miniconda3/envs/virsorter/lib/site_perl/5.26.2/x86_64-linux-thread-multi /domus/h1/carolt/miniconda3/envs/virsorter/lib/site_perl/5.26.2 /domus/h1/carolt/miniconda3/envs/virsorter/lib/5.26.2/x86_64-linux-thread-multi /domus/h1/carolt/miniconda3/envs/virsorter/lib/5.26.2 .) at /domus/h1/carolt/miniconda3/envs/virsorter/bin/Scripts/Step_1_contigs_cleaning_and_gene_prediction.pl line 5. BEGIN failed--compilation aborted at /domus/h1/carolt/miniconda3/envs/virsorter/bin/Scripts/Step_1_contigs_cleaning_and_gene_prediction.pl line 5.

PATH: /virsorter_out/logs/out CONTENT: /domus/h1/carolt/miniconda3/envs/virsorter/bin/Scripts/Step_1_contigs_cleaning_and_gene_prediction.pl VIRSorter virsorter_out/fasta virsorter_out/fasta/input_sequences.fna 2

LIST OF FILES IN virsorter_out/fasta: input_sequences.fna input_sequences_id_translation.tsv

Caroline.

simroux commented 4 years ago

Looks like Bioperl was not properly installed and/or loaded. Did you install VirSorter dependencies through conda ? And if so, can you try the following command in a terminal after loading the conda environment to see if it gives you an error ?

perl -e "use Bio::Seq;"

kks-vir commented 4 years ago

Hi,

This is the result of that command: Can't locate Bio/Seq.pm in @INC (you may need to install the Bio::Seq module) (@INC contains: /domus/h1/carolt/miniconda3/envs/virsorter/lib/site_perl/5.26.2/x86_64-linux-thread-multi /domus/h1/carolt/miniconda3/envs/virsorter/lib/site_perl/5.26.2 /domus/h1/carolt/miniconda3/envs/virsorter/lib/5.26.2/x86_64-linux-thread-multi /domus/h1/carolt/miniconda3/envs/virsorter/lib/5.26.2 .) at -e line 1. BEGIN failed--compilation aborted at -e line 1.

I installed VirSorter by following the instructions on the code page:

wget https://zenodo.org/record/1168727/files/virsorter-data-v2.tar.gz md5sum virsorter-data-v2.tar.gz

md5sum should return dd12af7d13da0a85df0a9106e9346b45

tar -xvzf virsorter-data-v2.tar.gz

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 git clone https://github.com/simroux/VirSorter.git cd VirSorter/Scripts make clean make

ln -s ~/Applications/VirSorter/wrapper_phage_contigs_sorter_iPlant.pl ~/miniconda/envs/virsorter/bin ln -s ~/Applications/VirSorter/Scripts ~/miniconda/envs/virsorter/bin

cd ~/miniconda/envs/virsorter/bin wget http://metagene.nig.ac.jp/metagene/mga_x86_64.tar.gz tar -xvzf mga_x86_64.tar.gz

source activate virsorter

I am sorry, I am new in this things, what did I do wrong?

simroux commented 4 years ago

Not sure that anything was done wrong :-) If after activating the environment ("source activate virsorter"), BioPerl is stll not available, i.e. the command "perl -e "use Bio::Seq;" still replies "Can't locate Bio/Seq.pm", this means that something went wrong when conda tried to install BioPerl. Typically it's one of two things: (i) the BioPerl install failed but conda didn't say it clearly, or (ii) BioPerl is installed in a place where conda doesn't look.

Could you check the result of the following commands: conda install -n virsorter perl-bioperl and

cd /domus/h1/carolt/miniconda3/envs/virsorter/
find -name "Seq.pm"
kks-vir commented 4 years ago

Hi Simon! You were right! I had not installed BioPerl. Now I think everything is working, at least I got no errors hehe

Thank you very much for help! Caroline.

simroux commented 4 years ago

Glad that it worked !

kalonji08 commented 2 years ago

Hi @simroux I'm getting to the following error: irsorter) kalonji@kalonji-workstation:/mnt/sdb/VirSorter$ wrapper_phage_contigs_sorter_iPlant.pl -f test/4seq.fa --db 1 --wdir output --ncpu 2 --data-dir virDB Bin : /home/kalonji/miniconda3/envs/virsorter/bin Dataset : VIRSorter Input file : test/4seq.fa Db : 1 Working dir : output Custom phages : Data dir : virDB Num CPUs : 2 blastp : blastp

Started at Sat Mar 26 21:06:15 2022 Step 0.5 : perl /home/kalonji/miniconda3/envs/virsorter/bin/Scripts/Step_1_contigs_cleaning_and_gene_prediction.pl VIRSorter output/fasta output/fasta/input_sequences.fna 2 >> output/logs/out 2>> output/logs/err

Step 1 failed, we stop there: either output/fasta/VIRSorter_prots.fasta or output/fasta/VIRSorter_nett_filtered.fasta were not found

When i run perl -e "use Bio::Seq;"

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

I tried runnin the following: conda install -n virsorter perl-bioperl And i get this:

(virsorter) kalonji@kalonji-workstation:/mnt/sdb/VirSorter$ conda install -n virsorter perl-bioperl Collecting package metadata (current_repodata.json): done Solving environment: done

All requested packages already installed.

(virsorter) kalonji@kalonji-workstation:/mnt/sdb/VirSorter$

Any assistance will be highly appreciated :)

simroux commented 2 years ago

Hi,

Looks like it's the usual issue with Conda installing BioPerl in a path that is not included in the Perl library path (i.e ."@inc"). The fix I had in https://github.com/simroux/VirSorter#note-for-conda-installation suggested to add "/home/kalonji/miniconda3/envs/virsorter/lib/site_perl/5.26.2", but it may be that Conda updated BioPerl and the module may now be located in a different folder.

One way to check this would be to do something like:

> cd /home/kalonji/miniconda3/envs/virsorter/
> find -name "Seq.pm"

Then look at the folder in which Seq.pm is located, and add it to the library path.

Or, alternatively, you may want to move straight to VirSorter 2 :-) https://github.com/jiarong/VirSorter2

kalonji08 commented 2 years ago

Hi @simroux Thanks VirStorter 2 was actually easier to install and i managed :)