Installing rpy and rpy2 on RHEL6
I wanted to install rpy and rpy2 on Red Hat Enterprise Linux 6. Here's how I did it. There have been several fixes in the rpy SVN repository that have not shown up in the version downloadable from SourceForge. Hopefully that's been fixed by now, but here's how I installed it by retrieving rpy directly from the repository.
First I made sure that the python-devel package was installed to avoid the error src/RPy.h:63:20: error: Python.h: No such file or directory:
yum install python-devel
Then I installed R and R-devel from EPEL:
rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm
yum install R R-devel
Then I downloaded rpy and extracted it:
curl http://rpy.svn.sourceforge.net/viewvc/rpy/trunk/rpy/?view=tar > rpy.tar.gz
tar xvzf rpy.tar.gz
cd rpy
python setup.py install
Lo and behold, it imports without error:
python -c "import rpy"
Yay!
Besides R and R-devel, rpy2 requires that the readline-devel package be installed, otherwise installation fails with ./rpy/rinterface/_rinterface.c:79:31: error: readline/readline.h: No such file or directory.
yum install readline-devel
After that, rpy2 installs easily:
curl http://pypi.python.org/packages/source/r/rpy2/rpy2-2.2.0.tar.gz#md5=a42a7f1e6ddb10dc3a1886c2f4309fab > rpy2-2.2.0.tar.gz
tar xvzf rpy2-2.2.0.tar.gz
cd rpy2-2.2.0
python setup.py install
Adding threads support to perl built by MacPorts
I had installed perl5.12 from MacPorts. sudo port installed listed
perl5 @5.12.3 lang/perl5
perl5.12 @5.12.3 lang/perl5.12
perl5.8 @5.8.9 lang/perl5.8
To enable threading support, I used
sudo port upgrade --enforce-variants perl5.12 +threads
Installing miRNAkey on Mac OS X 10.6 Snow Leopard
The following is a transcript of an installation of miRNAkey on Mac OS X 10.6. Actually it has more do with installation of the prerequisites. There is a handy script included with the miRNAkey distribution but I elected to do it by hand since some version numbers had changed and the Fastx-Toolkit binaries were for 10.5, not 10.6.
Step 1: Install bwa
The Burrows-Wheeler Aligner can be downloaded from Sourceforge.
tar xvfj bwa-0.5.9.tar.bz2
cd bwa-0.5.9
make
sudo cp bwa /usr/local/bin/bwaStep 2: Install Required Perl Modules
I should note that my Perl is a MacPorts install.
sudo cpan
cpan[1]> install Math::CDFSpreadsheet::WriteExcel and Getopt::Long were already fine on our machine:
cpan[2]> install Spreadsheet::WriteExcel
Spreadsheet::WriteExcel is up to date (2.37).
cpan[3]> install Getopt::Long
Getopt::Long is up to date (2.38).Prior to installing GD::Graph::bars I needed to install libgd:
curl -O http://www.libgd.org/releases/gd-2.0.35.tar.bz2
tar xfjv gd-2.0.35.tar.bz2
cd gd-2.0.35
./configure
make
sudo make installThe GD perl module would not install because some tests would not pass:
Running make test
PERL_DL_NONLAZY=1 /opt/local/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/GD.t ........ 1/12 Testing using png support.
t/GD.t ........ Failed 1/12 subtests
(less 1 skipped subtest: 10 okay)
t/Polyline.t .. ok
Test Summary Report
-------------------
t/GD.t (Wstat: 0 Tests: 12 Failed: 1)
Failed test: 10
Files=2, Tests=13, 0 wallclock secs ( 0.02 usr 0.01 sys + 0.07 cusr 0.02 csys = 0.12 CPU)
Result: FAIL
Failed 1/2 test programs. 1/13 subtests failed.
make: *** [test_dynamic] Error 255
LDS/GD-2.45.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports LDS/GD-2.45.tar.gz
Running make install
make test had returned bad status, won't install without forceSo I decided to install it with force:
sudo perl -MCPAN -e "CPAN::Shell->force(qw(install GD));"Then I could install GD::Graph::bars:
sudo cpan
cpan[1]> install GD::Graph::barsStep 3: Install FASTX-Toolkit
First, libgtextutils:
curl -O http://hannonlab.cshl.edu/fastx_toolkit/libgtextutils-0.6.tar.bz2
tar xvjf libgtextutils-0.6.tar.bz2
cd libgtextutils-0.6
./configure
make
sudo make installThen the FASTX-Toolkit itself. Note the need to define PKG_CONFIG_PATH:
curl -O http://hannonlab.cshl.edu/fastx_toolkit/fastx_toolkit-0.0.13.tar.bz2
tar xjvf fastx_toolkit-0.0.13.tar.bz2
cd fastx_toolkit-0.0.13
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
./configure
make
sudo make installStep 4: Install miRNAkey
For this, I simply put miRNAkey into the /Applications directory.
curl -O http://ibis.tau.ac.il/miRNAkey/downloads/miRNAkey.tar.gz
tar xvzf miRNAkey.tar.gz
mv miRNAkey /Applications/miRNAkey
Installing BioPerl on Mac OS 10.6 Snow Leopard in 6 Easy Steps
The strategy I used to install BioPerl was as follows:
1. Use MacPorts to install Perl.
2. Use CPAN to install BioPerl.
Here are the nitty gritty details. You need a live internet connection, as both MacPorts and CPAN expect to be able to download packages.
Step One: XCode Tools
Before MacPorts can be installed, XCode Tools needs to be installed. This is free from Apple and can be installed from the original OS X 10.6 DVD or downloaded from Apple's developer site.
You can tell that XCode Tools is installed by looking for a Developer directory at the root of your hard drive.
Step Two: MacPorts
I simply downloaded the MacPorts Package Installer from the MacPorts site.
Step Three: Install Perl
sudo port install perl5.12
Step Four: Install GraphViz
This is a prerequisite of BioPerl and the BioPerl build will fail if it is not installed. It will download a ton of prequisites first. After typing the following, get a coffee and a sandwich.
sudo port install graphviz
Step Five: Configure CPAN
CPAN likes to have YAML installed. So:
sudo cpan YAML
At this point cpan will realize it's being run for the first time and ask you some questions like
Would you like me to configure as much as possible automatically? [yes]
Selecting the defaults worked fine.
It's nice to have LWP too.
To install LWP, first get to the cpan command prompt:
sudo cpan
Then install it:
install Bundle::LWP
Step Six: Build BioPerl
To install BioPerl, first get to the cpan command prompt:
sudo cpan
At the command prompt, tell CPAN that you want it to automatically get and install any prerequisites it comes across (this saves you hours of choosing "Yes"):
cpan[1]> o conf prerequisites_policy follow
And now, at the cpan prompt, install BioPerl:
install C/CJ/CJFIELDS/BioPerl-1.6.1.tar.gz
It will stop several times along the way. Except for the following question where my selection was to install all optional external modules, the defaults were fine.
Install [a]ll optional external modules, [n]one, or choose [i]nteractively? [n] a
During the tests that BioPerl runs, I saw the following:
Replacement list is longer than search list at Bio/Range.pm line 251.
According to this post, The above are warnings from perl 5.12 that can be ignored (they have been fixed in bioperl-live on github).
For a quick test of BioPerl, put the following into a file named test.pl:
use Bio::Perl;
# this script will only work if you have an internet connection on the
# computer you're using, the databases you can get sequences from
# are 'swiss', 'genbank', 'genpept', 'embl', and 'refseq'
$seq_object = get_sequence('embl',"AI129902");
write_sequence(">roa1.fasta",'fasta',$seq_object);Then run it:
perl test.pl
and sure enough, a file named roa1.fasta gets written. Yay!
If you are installing BioPerl on a Mac that has multiple user accounts, you'll need to make sure that the following exists in each user's .profile file (at /Users/john/.profile, for example):
# MacPorts Installer addition on 2010-10-04_at_15:32:08: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.This makes it so that when you type perl the Mac will find and use the Perl from MacPorts instead of the system Perl. Also, be aware of scripts that say #!/usr/bin/perl at the top.
Thanks for testing, OWC
Other World Computing tested whether the 2009 Mac Pro could go to 64GB (no affiliation; I'm just a happy customer). I can now confirm this.

I only wish it were my machine. :)
Solution for "Could not create the Java Virtual Machine"
The problem: we wanted to give more memory to Blast2GO running on Windows 7 x64, but we kept getting the error *beep* "Could not create the Java Virtual Machine".
Looking at the makeJnlp.php file that the Blast2GO website gives you, I noticed the max-heap-size line:
<jnlp spec="1.0+" codebase="http://bioinfo.cipf.es/blast2go/webstart" href="http://bioinfo.cipf.es/blast2go/webstart/makeJnlp.php?mem=2048">
<information>
<title>Blast2GO 2048M</title>
<vendor>CIPF - UPV - IVIA</vendor>
<homepage href="http://www.blast2go.org"/>
<description>Blast2GO 2048M</description>
<description kind="short">Blast2GO 2048M</description>
<icon href="splash.gif"/>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.5+" initial-heap-size="64m" max-heap-size="2048M"/>
...
When I removed the max-heap-size assignment the JNLP file started just fine with Java Web Start (javaws.exe). Conclusion: somehow the machine could not actually allocate the amount of heap space we were asking for.
Sure enough, further investigation showed that the 32-bit version of Java had been installed instead of the 64-bit version.
After installing the 64-bit version and running the JNLP file with 64-bit javaws.exe, everything was fine.
Blast2GO BLAST results not opening in Mac web browser
If you use Blast2GO on Mac OS X 10.5 Leopard (and haven't been derailed completely by Apple moving Java Web Start around), you might have run into the issue of not being able to view BLAST results in a web browser. Blast2GO even helpfully opens a window for you to choose which browser you want to use, but no matter what you select, nothing happens. Except the following gets written to the Application Messages pane:
Error with choosen Browser! /Applications/Firefox.app: cannot execute
The solution is to tell Blast2GO which browser you want to use. You do that by specifying a path in the blast2go.properties file. You can find the file at /Users/yourusername/blast2go/blast2go.properties.
When you open the file in your text editor* you'll see a property entry under User Pathes (sic) called BlastBrowser.Explorer. You may be tempted to put /Applications/Firefox.app here or even, if you're clever, /Applications/Firefox.app/Contents/MacOS/firefox. But don't do that. Firefox will just complain at you about more than one instance running at a time. Rather, use /usr/bin/open and it will automatically launch the appropriate browser.
// User Pathes
MainGui.Workspace=/Volumes/Data/blast2go_datafile.dat
MainGui.Favorites=/Volumes/Data/blast2go_datafile.dat,
BlastBrowser.Explorer=/usr/bin/open
I ensured that Firefox was the default application to open .fcgi files by creating a text file called foo.fcgi and then selecting Get Info. Probably unnecessary because /usr/bin/open opens URLs in the default browser anyway.
*I used TextWrangler -- if you're still opening files in TextEdit do yourself a favor and download TextWrangler, then make it the default text editor.



