LWP error (Bioperl on ubuntu)
3
0
Entering edit mode
10.4 years ago
Mohamed ▴ 70

I ran a bioperl script on ubuntu (installed on my laptop not work) and it gives:

Your system does not have one of LWP, HTTP::Request::Common, IO::String installed so the DB retrieval method is not available.

Full error message is:
at /home/mohamed/dag/BioPerl-1.6.1/Bio/Perl.pl line 476.
                Bio::Perl::get_sequence ('swissprot', 'ROA1_HUMAN') called at t3.pl line 7

Kindly, any suggestions.

Thank you,
Mohamed

software-error • 3.8k views
ADD COMMENT
3
Entering edit mode

Please have a closer look at the error message. For me this is not a bioinformatics question. Hint you need to install on of those packages

perl -MCPAN -e 'install Bundle::LWP'
ADD REPLY
0
Entering edit mode

Did you google the error message?

ADD REPLY
0
Entering edit mode

Once again, many thanks to Pierre and Michael for your prompt reply. I googled and it did not retrieve any answer understandable to me. Also, I tried the (perl ... LWP') and still no success. I have no experience at all in linux/ubuntu. I just tried to install bioperl and run it on ubuntu but it seems formidable for me. The tested script run flawlessly on biolinux.

Thanks,
Mohamed

ADD REPLY
2
Entering edit mode

As @Pierre and @Michael allude, the problem isn't with BioPerl but with missing dependencies (Michael's answer was to install Bundle::LWP from CPAN which would fix part of this, but you might also need IO::String).

If you don't have admin privileges you will need to set up a local or user-based library of perl modules, which is possible using local::lib. I also highly recommend cpanminus (aka cpanm) to make life easier.

ADD REPLY
0
Entering edit mode

If you do not have any experience with Linux and Ubuntu it will be very hard to install BioPerl correctly. It is very likely that you didn't install BioPerl correctly, otherwise the dependencies had been installed automatically. You need to consider one ore more of these points:

  • spend a few months on learning the basics of Linux/Unix and howto install packages and modules via CPAN
  • get some local admin to help you install it
  • why don't you use BioLinux if it is working there?

We cannot help you at the moment with the level of detail we are given.

ADD REPLY
0
Entering edit mode

Thanks everyone for your kind comments and suggestions. I will try what was mentioned here. If not, I'll stick to Biolinux. The computer is mine and I installed Ubuntu myself. I should have admin privilege on it. I'm coming from a long time in biology track and it took me ages to orient myself now in this new discipline (Linux/Ubuntu/Bioperl (or other programming)). But it is as suggested, I should first understand Linux system in more details.

Best regards,
Mohamed

ADD REPLY
0
Entering edit mode
10.4 years ago
Marc Perry ▴ 50

I would've thought that the LWP module is part of the standard Perl distribution, and I thought that all of the HTTP::Request modules were bundled into LWP, so I agree with Chris:

perl -MCPAN -e 'install IO::String' (or possibly sudo perl -MCPAN -e 'install IO::String') would be the next thing to try.

A quick trick to find out what modules you have installed is to run the perldoc command, like this:

perldoc HTTP::Request::Common

If the POD documentation scrolls by on your terminal then it is installed, if it is not installed you will get a STDERR message about that module being 'Not Found' or something similar. I think there is an even faster option, perldoc -l IO::String will just print the file's name if it is found.

If you don't have admin privileges on the host then as Chris says you will need to create your own local version of installed modules, but there are lots and lots of tips on the web about how to proceed (and I have used cpanm whenever I need to go this route).

ADD COMMENT
0
Entering edit mode
10.4 years ago
Mohamed ▴ 70

Just for your information, I found a solution or the problem of LWP (and HTTP::Request.....etc) is now fixed.

Simply, I re-installed ubuntu again and this time, I used software center to search for Bioperl. I installed "Perl tools for computational biology" and everything is now working fine.

Regards,
Mohamed

ADD COMMENT
0
Entering edit mode
10.4 years ago
hpmcwill ★ 1.2k

For reasons I've never understood the Perl packages for Debian based Linux distributions (e.g. Debian, Ubuntu, Bio-Linux, etc.) have a separate package for LWP (libwww-perl) which is not installed by default.

So you have a choice, you can go the package based way and install the relevant Debian packages, for example:

sudo apt-get install libwww-perl

Alternatively, since you are interested in BioPerl, just install the BioPerl package, which will pull in the appropriate dependencies:

sudo apt-get install bioperl

Note: if you want the BioPerl Run package as well you will also need to install the 'bioperl-run' Debian package.

Or you can manage the installed Perl modules the CPAN way as suggested by Michael.

In my experience mixing the two approaches can cause problems, so to begin with you will want to pick one option and stick with it.

If you decide to go the package managed way, you may find the DebianMed and DebianScience/Biology package collections a helpful way to install bioinformatics, biology and medicine related packages. The 'med-bio' and 'science-biology' meta-packages (packages of packages) provide a useful starting point.

ADD COMMENT
0
Entering edit mode

Many thanks for Marc Perry and hpmcwill for your kind suggestions.

ADD REPLY

Login before adding your answer.

Traffic: 1479 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6