Tutorial:How To Install BioPerl Without Root Privileges in Ubuntu/Linxu
1
7
Entering edit mode
8.5 years ago
Shicheng Guo ★ 9.5k

How To Install BioPerl Without Root Privileges in Ubuntu/Linux

First step: Install local::lib so that you can install bioperl without root privileges

perl -MCPAN -Mlocal::lib -e 'CPAN::install(local::lib)'

Second step: Download latest bioperl from github

make dir /home/shg047/software/
cd /home/shg047/software/
git clone https://github.com/bioperl/bioperl-live.git
cd bioperl-live
perl Build.PL
./Build test

Step 3. build test error?? Don't worry, test them one by one and install missed package, such as

./Build test --test_files t/LocalDB/Taxonomy/sqlite.t --verbose
./Build test --test_files t/Root/RootIO.t --verbose

Step 4: install the failed library according build test result. maybe huge number of library need to be installed according to your own situation. For me 25 packages were installed by myself.

perl -MCPAN -Mlocal::lib -e 'CPAN::install(DBI)'
perl -MCPAN -Mlocal::lib -e 'CPAN::install(DBD::SQLite)'
perl -MCPAN -Mlocal::lib -e 'CPAN::install(LWP::UserAgent)'
perl -MCPAN -Mlocal::lib -e 'CPAN::install(LWP::UserAgent)'
perl -MCPAN -Mlocal::lib -e 'CPAN::install(Bio::Phylo)'
perl -MCPAN -Mlocal::lib -e 'CPAN::install(Bio::DB::Sam)'
perl -MCPAN -Mlocal::lib -e 'CPAN::install(Graph::Directed)'
perl -MCPAN -Mlocal::lib -e 'CPAN::install(XML::Twig)'
perl -MCPAN -Mlocal::lib -e 'CPAN::install(Bio::Ext::Align)'
perl -MCPAN -Mlocal::lib -e 'CPAN::install(XML::Parser::PerlSAX)'
perl -MCPAN -Mlocal::lib -e 'CPAN::install(XML::Simple)'
perl -MCPAN -Mlocal::lib -e 'CPAN::install(HTML::TableExtract)'
perl -MCPAN -Mlocal::lib -e 'CPAN::install(IO::Scalar)'
perl -MCPAN -Mlocal::lib -e 'CPAN::install(XML::SAX)'
perl -MCPAN -Mlocal::lib -e 'CPAN::install(Bio::SeqIO::staden::read)'
perl -MCPAN -Mlocal::lib -e 'CPAN::install(XML::Parser::PerlSAX)'
perl -MCPAN -Mlocal::lib -e 'CPAN::install(Bio::SeqIO::staden::read)'
perl -MCPAN -Mlocal::lib -e 'CPAN::install(XML::LibXML)'
perl -MCPAN -Mlocal::lib -e 'CPAN::install(Convert::Binary::C)'
perl -MCPAN -Mlocal::lib -e 'CPAN::install(XML::SAX::Writer)'
perl -MCPAN -Mlocal::lib -e 'CPAN::install(XML::Writer)'
perl -MCPAN -Mlocal::lib -e 'CPAN::install(Bio::SeqIO::staden::read)'

step 5. test again

./Build test 

Step 6: Test bioperl installation (you should get a version number)

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

Step 7: Install bioperl with the last kick!

./Build install

Now, Use it. Use it. Bioperl is still deserve to make deep exploration.

By the way, If you want install Bio::DB::Sam to use samtools in bioperl, you need recompile samtools again with the following method.

cd /home/shg047/software/samtools-1.3.1
make clean
make CXXFLAGS=-fPIC CFLAGS=-fPIC CPPFLAGS=-fPIC
> cpan
install Bio::DB::Sam

OK. Now, You can use Bio::DB::Sam in your perl script

use Bio::DB::Sam;
my $sam = Bio::DB::Sam->new(-bam  => $infile);
bioperl • 8.7k views
ADD COMMENT
0
Entering edit mode

Do you really think Bio-perl is useful ? For my opinion, I didn't use them unless some public softares need them. I didn't write any script which need to include Bio-perl at least.

ADD REPLY
1
Entering edit mode

I didn't use them unless some public softares need them

Yep, it might not be useful on a day to day basis, but it is one of those pesky dependencies that one will need at some point. I just did for an Ensembl script (variant_effect_predictor/filter_vep.pl).

ADD REPLY
4
Entering edit mode
8.4 years ago
A. Domingues ★ 2.7k

As an addendum, how to install it in a custom folder without local::lib or administrator privileges:

git clone https://github.com/bioperl/bioperl-live.git
cd bioperl-live/
perl Build.PL PREFIX=/home/adomingu/common_bin/bioperl-live LIB=/home/adomingu/common_bin/bioperl-live
./Build installdeps
./Build install

./Build installdeps is there for the event that some dependencies are missing. They probably are.

And then add the location to path with:

PERL5LIB=${PERL5LIB}:/home/adomingu/common_bin/bioperl-1.6.1
export PERL5LIB
ADD COMMENT
0
Entering edit mode

It might help me with other module that I'm facing problem linking it with the script, thanks!

ADD REPLY
0
Entering edit mode

Thank you so much! It's really helpful!

ADD REPLY

Login before adding your answer.

Traffic: 2066 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