prokka icon indicating copy to clipboard operation
prokka copied to clipboard

bioperl v1.7.8 kills the prokka πŸΏπŸ”«

Open lskatz opened this issue 2 years ago β€’ 1 comments

Prokka checks for bioperl >= 1.0006002 numerically using this code on line 257.

my $minbpver = "1.006002"; # for Bio::SearchIO::hmmer3
my $bpver = $Bio::Root::Version::VERSION;
msg("You have BioPerl $bpver");
err("Please install BioPerl $minbpver or higher") if $bpver < $minbpver;

However when you have bioperl v1.7.8, it returns the semver 3-integer notation like

$ perl -MBio::Perl -le 'print $Bio::Root::Version::VERSION'
1.7.8

Therefore it will exit because the comparison will compare 1.006002 < 1.7.8. I am not sure what the correct fix is yet but I am willing to look it up if you would accept a pull request.

lskatz avatar Sep 17 '21 18:09 lskatz

Hi, I faced the same Bioperl version error with prokka v1.14.5 (which I installed using Conda) and the run was aborted. Prokka v1.14.6 (installed from source) still shows the error as a warning, but it runs the code and doesn't abort. I guess the code has changed. Not sure what prokka_version you are using.

Here's how I solved it on v1.14.5:

Need this module. use Perl::Version;

Changed the code a bit on those specific lines (starts from line 259)

my $minbpver = "1.006002"; # for Bio::SearchIO::hmmer3
my $bpver0 = Perl::Version->new($Bio::Root::Version::VERSION);
my $bpver = $bpver0->numify;
msg("You have BioPerl $bpver");
err("Please install BioPerl $minbpver or higher") if $bpver < $minbpver;

arif-tanmoy avatar Oct 23 '21 11:10 arif-tanmoy