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.
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):
- 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.)
- Overall, I followed two protocols listed here and here (under installing using CPAN).
- 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
- Open app store and search for xcode
- download it, open applications folder and double click on Xcode, install
- open terminal and type
xcode-select --install. Wait till it installed (again !!) (this step is mentioned here. 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)
Open Terminal, type
sudo cpan YAMLand accept default (simply press enter, do not write any letter)- type
qwhile you are at can prompt to quit cpan. - Open terminal again and type
sudo cpan - type
install Bundle::LWP - quit cpan, and re-load it again by typing
sudo cpan(if you are still in terminal window) or reload terminal. - type
cpan[1]> o conf prerequisites_policy followof course withoutcpan[1]>because you are already at it. - type
o conf commit(this step is not mentioned on the website but the system tells you to do so. - Quit cpan (by typing
q) and reload cpan (by typingcpan) (of course while you are at terminal). - Now go to the second website by doing the following
- While you are at cpan prompt, type
cpan>d /bioperl/, it will give you several response. - Now, type the latest edition you have
cpan>install CJFIELDS/BioPerl-1.6.924.tar.gz
Finished If you wish to test it, try
install textwrangleror 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);- 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, typeperl filename.pl(and then hit enter), it will create a new file on desktop.
Regards,
Mohamed
3 answers
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.
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
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
Log in to answer this question.
xcode-select --installin terminal?I installed bioperl following the generic instructions
Thanks 5heikki for your quick response. I followed it previously but I stuck at:
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
sudois 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..
If you're at the installation step, try:
Thanks 5heikki and Alex for the comment and suggestions. I did:
Then I get:
Thus, I tried:
Then, it replies:
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
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.
Thanks. I tried also this before but it does not continue at some point saying Terminal does not AddHistory.
Actually, I tried the following script on Mac OSX 10.9.3
but it retrieve:
So, I guess that I do not installed Bioperl properly.
Thanks a lot Michael.
Mohamed
This worked for me, thanks!