prokka icon indicating copy to clipboard operation
prokka copied to clipboard

Prokka is not generating all the files while invoking prokka using shell script but working fine while running directly from commandline, why?

Open Unlock-ViV opened this issue 3 years ago • 14 comments

I have installed Prokka using Conda on the CentOS (7) server. Ans it is working fine when I'm invoking Prokka directly from the command line but as I want to invoke the Prokka from the web-browser I used PHP to run a shell file and inside that shell file I've my Prokka command. But the problem is while invoking Prokka from the shell script it is not generating all of the output files. The files generated using this way are :

seq.HAMAP.hmm.tmp.12617.faa
seq.HAMAP.hmm.tmp.12617.hmmer3
seq.fna
seq.log 

Whereas while invoking Prokka directly from the command line is generating all expected files.

So I check the error_log it showed me these lines of comment:

15:38:52] Will use hmmer3 to search against /home/group01/anaconda3/bin/../db/hmm/HAMAP.hmm with 20 CPUs [15:38:52] Running: cat \/home\/group01\/html\/csspred\/results\/27\-Oct\-15_38_078430112\/seq\/HAMAP\.hmm\.faa | parallel --gnu --plain -j 20 --block 220 --recstart '>' --pipe hmmscan --noali --notextw --acc -E 1e-06 --cpu 1 /home/group01/anaconda3/bin/../db/hmm/HAMAP.hmm /dev/stdin > \/home\/group01\/html\/csspred\/results\/27\-Oct\-15_38_078430112\/seq\/HAMAP\.hmm\.hmmer3 2> /dev/null Bio::SearchIO: hmmer3 cannot be found Exception ------------- EXCEPTION: Bio::Root::Exception ------------- MSG: Failed to load module Bio::SearchIO::hmmer3. Can't locate Bio/SearchIO/hmmer3.pm in @INC (@INC contains: /home/group01/anaconda3/bin/../perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/lib64/perl5/vendor_perl/Bio/Root/Root.pm line 520. STACK: Error::throw STACK: Bio::Root::Root::throw /usr/lib64/perl5/vendor_perl/Bio/Root/Root.pm:449 STACK: Bio::Root::Root::_load_module /usr/lib64/perl5/vendor_perl/Bio/Root/Root.pm:522 STACK: Bio::SearchIO::_load_format_module /usr/lib64/perl5/vendor_perl/Bio/SearchIO.pm:620 STACK: Bio::SearchIO::new /usr/lib64/perl5/vendor_perl/Bio/SearchIO.pm:217 STACK: /home/group01/anaconda3/bin/prokka:1029 ----------------------------------------------------------- For more information about the SearchIO system please see the SearchIO docs. This includes ways of checking for formats at compile time, not run time Can't call method "next_result" on an undefined value at /home/group01/anaconda3/bin/prokka line 1030.

The above error log showed me that Bio::SearchIO: hmmer3 cannot be found , so I installed the hmmer as mentioned here https://metacpan.org/pod/Bio::SearchIO::hmmer3 .

What should I do, what is wrong?

Unlock-ViV avatar Oct 27 '20 10:10 Unlock-ViV

I meet the same issue. I install prokka by conda and when I run the prokka on contigs.fa, I only got .faa, .fna, .hmmer3, .log files, And the last line in the log file is Running: cat /metagenomics/prokka/output/sh10/HAMAP.hmm.faa | parallel --gnu --plain -j 20 --block 572195 --recstart '>' --pipe hmmscan --noali --notextw --acc -E 1e-06 --cpu 1 /miniconda3/envs/prokka/bin/../db/hmm/HAMAP.hmm /dev/stdin > /metagenomics/prokka/output/sh10/HAMAP.hmm.hmmer3 2> /dev/null

How can I deal with it?

xzsword avatar Oct 27 '20 14:10 xzsword

I have installed Prokka using Conda on the CentOS (7) server. Ans it is working fine when I'm invoking Prokka directly from the command line but as I want to invoke the Prokka from the web-browser I used PHP to run a shell file and inside that shell file I've my Prokka command. But the problem is while invoking Prokka from the shell script it is not generating all of the output files. The files generated using this way are :

seq.HAMAP.hmm.tmp.12617.faa
seq.HAMAP.hmm.tmp.12617.hmmer3
seq.fna
seq.log 

Whereas while invoking Prokka directly from the command line is generating all expected files.

So I check the error_log it showed me these lines of comment:

15:38:52] Will use hmmer3 to search against /home/group01/anaconda3/bin/../db/hmm/HAMAP.hmm with 20 CPUs [15:38:52] Running: cat \/home\/group01\/html\/csspred\/results\/27\-Oct\-15_38_078430112\/seq\/HAMAP\.hmm\.faa | parallel --gnu --plain -j 20 --block 220 --recstart '>' --pipe hmmscan --noali --notextw --acc -E 1e-06 --cpu 1 /home/group01/anaconda3/bin/../db/hmm/HAMAP.hmm /dev/stdin > \/home\/group01\/html\/csspred\/results\/27\-Oct\-15_38_078430112\/seq\/HAMAP\.hmm\.hmmer3 2> /dev/null Bio::SearchIO: hmmer3 cannot be found Exception ------------- EXCEPTION: Bio::Root::Exception ------------- MSG: Failed to load module Bio::SearchIO::hmmer3. Can't locate Bio/SearchIO/hmmer3.pm in @INC (@INC contains: /home/group01/anaconda3/bin/../perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/lib64/perl5/vendor_perl/Bio/Root/Root.pm line 520. STACK: Error::throw STACK: Bio::Root::Root::throw /usr/lib64/perl5/vendor_perl/Bio/Root/Root.pm:449 STACK: Bio::Root::Root::_load_module /usr/lib64/perl5/vendor_perl/Bio/Root/Root.pm:522 STACK: Bio::SearchIO::_load_format_module /usr/lib64/perl5/vendor_perl/Bio/SearchIO.pm:620 STACK: Bio::SearchIO::new /usr/lib64/perl5/vendor_perl/Bio/SearchIO.pm:217 STACK: /home/group01/anaconda3/bin/prokka:1029 ----------------------------------------------------------- For more information about the SearchIO system please see the SearchIO docs. This includes ways of checking for formats at compile time, not run time Can't call method "next_result" on an undefined value at /home/group01/anaconda3/bin/prokka line 1030.

The above error log showed me that Bio::SearchIO: hmmer3 cannot be found , so I installed the hmmer as mentioned here https://metacpan.org/pod/Bio::SearchIO::hmmer3 .

What should I do, what is wrong?

I solved my issue by this way: I redownload prokka 1.14.6 (git clone) from the github and compile it instead of downloading it by conda which I just download prokka 1.12, and the issue solved. I think you can try to download the prokka and compile it.

xzsword avatar Oct 28 '20 02:10 xzsword

I tried doing as you suggested, but the problem persists.

again the Prokka is working fine directly from the command line but while invoking Prokka from the shell script all output files are still not generated. this time the files generated are:

seq.fna
seq.log
seq.sprot.tmp.32607.blast
seq.sprot.tmp.32607.faa

and in the error log I got this error:

[00:29:00] Running: cat \/home\/group01\/html\/csspred\/results\/29\-Oct\-00_28_860867665\/seq\/seq\.sprot\.tmp\.32607\.faa | parallel --gnu --plain -j 20 --block 1311 --recstart '>' --pipe blastp -query - -db /home/group01/html/csspred/prokka/db/kingdom/Bacteria/sprot -evalue 1e-09 -qcov_hsp_perc 80 -num_threads 1 -num_descriptions 1 -num_alignments 1 -seg no > \/home\/group01\/html\/csspred\/results\/29\-Oct\-00_28_860867665\/seq\/seq\.sprot\.tmp\.32607\.blast 2> /dev/null                      
[00:29:01] Could not run command: cat \/home\/group01\/html\/csspred\/results\/29\-Oct\-00_28_860867665\/seq\/seq\.sprot\.tmp\.32607\.faa | parallel --gnu --plain -j 20 --block 1311 --recstart '>' --pipe blastp -query - -db /home/group01/html/csspred/prokka/db/kingdom/Bacteria/sprot -evalue 1e-09 -qcov_hsp_perc 80 -num_threads 1 -num_descriptions 1 -num_alignments 1 -seg no > \/home\/group01\/html\/csspred\/results\/29\-Oct\-00_28_860867665\/seq\/seq\.sprot\.tmp\.32607\.blast 2> /dev/null

What to do?

Unlock-ViV avatar Oct 28 '20 19:10 Unlock-ViV

I did not meet the problem yet. Prokka needs specific version of many software like blast. You can first check the version of blast (I remember that its version need higher than 2.9.0).

xzsword avatar Oct 29 '20 00:10 xzsword

Yes I have the latest version of blast it's 2.10.1

Unlock-ViV avatar Oct 29 '20 04:10 Unlock-ViV

cpanm Bio::SearchIO::hmmer

chenhu77 avatar Dec 19 '20 09:12 chenhu77

Same issue here. I submitted a batch job on cluster A and I got the error mentioned by @Unlock-ViV, while the same script on shell did not generate any issue. Same batch job, with same dataset, submitted to cluster B is working like a charm. Do you have any updates on the status of this issue?

amalacrino avatar Feb 13 '21 22:02 amalacrino

I am also having a similar issue on a cluster. It seems to run successfully for some but not all samples. I'm trying to re-run some samples now to see if the problem persists. I've checked that my software is up to date and have tried with some of the suggestions for reinstalling various packages. My only current hypothesis is that perhaps there is an issue with resource (memory or thread?) use, since the last command seems to run just fine when I don't submit it to the cluster and because the particular samples that fail, are not consistent.

hhollandmoritz avatar Mar 25 '21 00:03 hhollandmoritz

I don't have a good understanding of how Perl modules work/conventions for installation/etc, so YMMV -- but I was running into this exact error when running Prokka through Snakemake in an ~Ubuntu container.

Adding

apt-get install -y libbio-searchio-hmmer-perl

to my initial apt-gets (bioperl, libdatetime-perl, libxml-simple-perl, and libdigest-md5-perl were already getting installed) seemed to have fixed the issue.

aruginkgo avatar Jul 21 '21 17:07 aruginkgo

I did:

# mamba is same as conda, just faster :)
mamba create -y -n prokka prokka==1.14.6
conda activate prokka

mamba install -y perl-app-cpanminus
cpanm Bio::SearchIO::hmmer --force

and then everything worked.

ctb avatar Feb 10 '22 17:02 ctb

Unfortunately, the last command given by @ctb is working only if you are root. Doesn't work on a cluster. I have contacted the admin to solve that problem.

ltalignani avatar Sep 29 '22 13:09 ltalignani

Unfortunately, the last command given by @ctb is working only if you are root. Doesn't work on a cluster. I have contacted the admin to solve that problem.

But conda doesn't require root and I don't have root on my cluster ;).

My guess would be that conda activate prokka is not working properly, so you might be executing the system cpan with cpanm Bio::SearchIO::hmmer --force, not the one installed in conda.

ctb avatar Sep 29 '22 13:09 ctb

I met the error: Bio::SearchIO: hmmer3 cannot be found And one of my schoolmates suggested I run this command: conda install -c bioconda perl-bio-searchio-hmmer and it seems worked.

botu0w0 avatar Dec 09 '22 14:12 botu0w0

I met the error: Bio::SearchIO: hmmer3 cannot be found And one of my schoolmates suggested I run this command: conda install -c bioconda perl-bio-searchio-hmmer and it seems worked.

It doesn't work for me.

bioinfotec avatar Mar 11 '24 09:03 bioinfotec