[SOLVED] Installing Bioperl on Mac Mavericks v10.9.3 (Actually on Yosemite 10.10.2)
3
2
Entering edit mode
9.9 years ago
Mohamed ▴ 70

Dear Biostar people,

Is there a working and tested way of installing Bioperl on Mac OSX Mavericks v10.9.3. I tried latest version of xcode and installing command line but there is no command line option (under properties/downloads) in xcode.

When I test for gcc in the terminal window, it retrieve clang error.

Any idea will be appreciated.

Thanks in advance,

Mohamed

[SOLVED STEPS] - updated and written on 9 March 2015:

The following is tested and working (you need internet connection and whole steps took 30 minutes at fast connection):

  1. First, my situation is that I have a new and clan install of Yosemite, then upgrade from App store whatever it takes. (this is not important but just to describe my situation.)
  2. Overall, I followed two protocols listed here and here (under installing using CPAN).
  3. Detailed steps: a. Follow STEPS ONE, TWO & FIVE listed in this website as I mentioned by doing this (note that STEPS THREE AND FOUR does not work with me and seems not needed):

STEPS ONE & TWO

  1. Open app store and search for xcode
  2. download it, open applications folder and double click on Xcode, install
  3. open terminal and type xcode-select --install. Wait till it installed (again !!) (this step is mentioned here.
  4. Now install macports by going to this website (https://www.macports.org/install.php) and under "QuickStart" title, click on Yosemite 10.10. Install the pkg file.

    NOW STEP FIVE (in http://www.sysarchitects.com/bioperl)

  5. Open Terminal, type sudo cpan YAML and accept default (simply press enter, do not write any letter)

  6. type q while you are at can prompt to quit cpan.
  7. Open terminal again and type sudo cpan
  8. type install Bundle::LWP
  9. quit cpan, and re-load it again by typing sudo cpan (if you are still in terminal window) or reload terminal.
  10. type cpan[1]> o conf prerequisites_policy follow of course without cpan[1]> because you are already at it.
  11. type o conf commit (this step is not mentioned on the website but the system tells you to do so.
  12. Quit cpan (by typing q) and reload cpan (by typing cpan) (of course while you are at terminal).
  13. Now go to the second website by doing the following
  14. While you are at cpan prompt, type cpan>d /bioperl/, it will give you several response.
  15. Now, type the latest edition you have cpan>install CJFIELDS/BioPerl-1.6.924.tar.gz
    Finished
  16. If you wish to test it, try install textwrangler or whatever suitable text editor and type the following and save as perl file (taken from here:

    use Bio::Perl;
    
    # this script will only work with an internet connection
    # on the computer it is run on
    $seq_object = get_sequence('swissprot',"ROA1_HUMAN");
    
    write_sequence(">roa1.fasta",'fasta',$seq_object);
    
  17. I save it on desktop. Open terminal, and go to desktop (by typing cd Desktop (no worries about capital or small letter, both works), when you are at desktop, type perl filename.pl (and then hit enter), it will create a new file on desktop.

Regards,
Mohamed

software-error • 11k views
ADD COMMENT
0
Entering edit mode

xcode-select --install in terminal?

I installed bioperl following the generic instructions

ADD REPLY
0
Entering edit mode

Thanks 5heikki for your quick response. I followed it previously but I stuck at:

> perl Build.PL

The terminal reply that I have no permission. I am new to such topics and read that I might harm the OSX itself. Aslo, I do not even know how to change the permission or allow it.

Thanks,
Mohamed

ADD REPLY
0
Entering edit mode

sudo is an easy way around any permissions, but it seems like you're likely to ruin your OS X install. I'd recommend you read about this stuff thoroughly (google is your friend) and only then proceed to install..

edit. As I recall, I installed bioperl with sudo following the "Installing using CPAN" method..

edit2. Since you're installing the build.pl way, did you actually read the instructions? They discuss permissions, they discuss how the linked packages are ancient.. read, then re-read, and only then take action..

ADD REPLY
0
Entering edit mode

If you're at the installation step, try:

$ sudo perl Build.PL install
ADD REPLY
0
Entering edit mode

Thanks 5heikki and Alex for the comment and suggestions. I did:

$ sudo perl Build.PL install

Then I get:

Too early to specify a build action 'install'. Do 'Build install' instead.

Thus, I tried:

$ sudo perl Build install

Then, it replies:

Module::Build version 0.42 required--this is only version 0.3901 at Build line 41.

Anyway, thanks for your support. I'll search for a solution to this. If not, I'll stick to bioperl on windows 7 or 8.1.

Regards,
Mohamed

ADD REPLY
0
Entering edit mode

You're not following the instructions to the letter. You could try this to install the latest bioperl like this. Might work. Might break your system.

sudo perl -MCPAN -e shell
install CJFIELDS/BioPerl-1.6.923.tar.gz
ADD REPLY
0
Entering edit mode

Thanks. I tried also this before but it does not continue at some point saying Terminal does not AddHistory.

ADD REPLY
0
Entering edit mode

Actually, I tried the following script on Mac OSX 10.9.3

use Bio::Perl;

# this script will only work with an internet connection
# on the computer it is run on
$seq_object = get_sequence('swissprot',"ROA1_HUMAN");

write_sequence(">roa1.fasta",'fasta',$seq_object);

but it retrieve:

Can't locate Bio/Perl.pm in @INC (@INC contains: /Library/Perl/5.16/darwin-thread-multi-2level /Library/Perl/5.16 /Network/Library/Perl/5.16/darwin-thread-multi-2level /Network/Library/Perl/5.16 /Library/Perl/Updates/5.16.2 /System/Library/Perl/5.16/darwin-thread-multi-2level /System/Library/Perl/5.16 /System/Library/Perl/Extras/5.16/darwin-thread-multi-2level /System/Library/Perl/Extras/5.16 .) at c2.pl line 1.

So, I guess that I do not installed Bioperl properly.

ADD REPLY
0
Entering edit mode

Thanks a lot Michael.

Mohamed

ADD REPLY
0
Entering edit mode

This worked for me, thanks!

ADD REPLY
0
Entering edit mode
9.9 years ago
Michael 54k

You really need to get the basics right, possibly you did not install BioPerl correctly. Rule of thumb, if there is an error message ("Error"), then there was an error ;) You need to report that error.

I strongly advise against using the system perl under MacOS, it might break at any time. Instead, use e.g. perlbrew to install a clean and independent perl and add-on packages as complex as bio perl. Do not follow the MacOS instructions to install BioPerl unless you want to use Fink. Instead, follow the unix instructions using subsection "CPAN install".

Then use the cpan method to install bioperl (use CPAN shell, do not attempt to install from tar ball unless you know exactly what you are doing. Installing BioPerl often works only with using force or even fforce

sudo cpan
> install Bundle::CPAN
> install Module::Build
> fforce install  CJFIELDS/BioPerl-1.6.923.tar.gz

Screw the tests, one of them will always fail.

To test if you can load the package, you can just run:

perl -MBio::Perl -e 1;

No error means, it loaded ok.

ADD COMMENT
0
Entering edit mode
9.8 years ago

The easiest and safest way to install BioPerl on Mac is using fink.

Instruction for OS X Mavericks is found here.

http://www.BlastStation.com/freestuff/en/howtoBioPerlMac.html#109

ADD COMMENT
0
Entering edit mode

Fink and MacPorts install their packages in a way that can conflict with Homebrew, which is perhaps a more popular or more current option for installing scientific software. If the user has Homebrew installed already, the most agnostic way to go about this is to use the Xcode command-line tools, update the Perl installation and then compile the BioPerl source directly per generic instructions linked above.

ADD REPLY
0
Entering edit mode
9.8 years ago
Mohamed ▴ 70

Thanks a lot @support for your kind comment. I already tried this but the first step require installing command tool from xcode and I could not find it. Many thanks for your suggestion.

[update] I found how to get the command tool. I'll try it and If it works and finally able to install Bioperl, then I will let you know.

Best regards,
Mohamed

ADD COMMENT
0
Entering edit mode

It will take long long time to build BioPerl.

You can install BioPerl in a few minutes with pre-built binary package available at section 4 entitled Pre-built binary package in the same page.

ADD REPLY
0
Entering edit mode

Many thanks support for your kind suggestion.

ADD REPLY

Login before adding your answer.

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