[Bioc-devel] Tips for using R-2.15 with BioC 2.10 and 2.11

Robert Castelo robert.castelo at upf.edu
Tue Apr 17 23:05:35 CEST 2012


Dan, and everybody else trying to help, i found it.

the problem was that in my linux box i use the alias Rdevel and R 
(instead of Rrelease) because i like to type just 'R' for release and it 
worked just fine, but these definitions in Mac OSX although they seem to 
give the correct aliases:

$ alias R
alias R='R_LIBS_USER=~/Library/R/2.15-bioc-release/library R'
$ alias Rdevel
alias Rdevel='R_LIBS_USER=~/Library/R/2.15-bioc-devel/library R'

they don't work because the alias for the release is 'R', if i put 
'Rrelease' or just anything but 'R', such as 'R2', 'Rl', etc:

$ alias R2
alias R2='R_LIBS_USER=~/Library/R/2.15-bioc-release/library R'
$ alias Rdevel
alias Rdevel='R_LIBS_USER=~/Library/R/2.15-bioc-devel/library R'

then it works! i get

 > .libPaths()
[1] "/Users/rcastelo/Library/R/2.15-bioc-devel/library"
[2] "/Library/Frameworks/R.framework/Versions/2.15/Resources/library"

when i start from Rdevel and the corresponding for release when i start 
from R2 or Rrelease, etc..


if i had sticked to the precise instructions using 'Rrelease' as alias 
for the release version i would not have had this problem. i was 
confused by the fact that it worked aliasing 'R' in linux. i guess the 
explanation must have to do with the different flavors of unix or bash 
that run in these two systems, but i'm not an expert.

sorry for bothering you with this and thanks again for all your help.

robert.



On 4/17/12 7:13 PM, Dan Tenenbaum wrote:
> On Tue, Apr 17, 2012 at 10:08 AM, Robert Castelo<robert.castelo at upf.edu>  wrote:
>> Hi Dan, thanks for your hint. I'm however opening a new terminal window each
>> time I modify the bash_profile script. Let me add that the approach worked
>> perfectly for me on my linux box. The problem is only with my laptop which
>> runs Mac OSX.
>
> I would suggest typing
> alias Rrelease
> and
> alias Rdevel
> at the command line to make sure the aliases are doing what you expect.
>
> Also, try the command lines without any alias mechanism:
> R_LIBS_USER=~/Library/R/2.15-bioc-devel/library R
> and
> R_LIBS_USER=~/Library/R/2.15-bioc-release/library R
>
> Do those work as expected? If so maybe it's a problem in the alias
> setup. I'm assuming that bash is your login shell? These instructions
> probably won't work unchanged in other shells.
> Dan
>
>
>>
>> Robert.
>>
>> Sent from my HTC
>>
>>
>> ----- Reply message -----
>> From: "Dan Tenenbaum"<dtenenba at fhcrc.org>
>> To: "Robert Castelo"<robert.castelo at upf.edu>
>> Cc:<bioc-devel at r-project.org>
>> Subject: [Bioc-devel] Tips for using R-2.15 with BioC 2.10 and 2.11
>> Date: Tue, Apr 17, 2012 18:43
>>
>>
>>
>> On Tue, Apr 17, 2012 at 9:36 AM, Dan Tenenbaum<dtenenba at fhcrc.org>  wrote:
>>> On Tue, Apr 17, 2012 at 6:00 AM, Robert Castelo<robert.castelo at upf.edu>
>>> wrote:
>>>> Dear Dan, and specially those using mac osx for developing packages,
>>>>
>>>> i've tried to follow the instructions below for Mac OSX, concretely
>>>>
>>>> On 04/03/2012 01:04 AM, Dan Tenenbaum wrote:
>>>>>
>>>>> Hello BioC Developers,
>>>>>
>>>> [...]
>>>>
>>>>
>>>>> On Linux and Mac OS X, You can create bash aliases (called e.g. Rdevel
>>>>> and Rrelease) that will invoke the command line above. (Note that the
>>>>> "devel" in "Rdevel" refers not to the development version of R, but to
>>>>> that of Bioconductor; slightly confusing). Put the following in
>>>>> ~/.bash_profile:
>>>>>
>>>>> # Mac OS X
>>>>> alias Rdevel='R_LIBS_USER=~/Library/R/2.15-bioc-devel/library R'
>>>>> alias Rrelease='R_LIBS_USER=~/Library/R/2.15-bioc-release/library R'
>>>>
>>>>
>>>> i've created this ~/.bash_profile in my laptop running Mac OSX 10.6.8 and
>>>> when i start with
>>>>
>>>> $ Rdevel
>>>>
>>>> my .libPaths() always reports the release directory and never the devel
>>>> directory, i.e.,
>>>>
>>>>> .libPaths()
>>>> [1] "/Users/rcastelo/Library/R/2.15-bioc-release/library"
>>>> [2] "/Library/Frameworks/R.framework/Versions/2.15/Resources/library"
>>>>
>>>> if i rename '~/Library/R/2.15-bioc-release' to 'tmp' or i comment the
>>>> alias
>>>> line about the release in the .bash_profile (i.e., trying to force the
>>>> system to see only ~/Library/R/2.15-bioc-devel/library) i only get the
>>>> default path, i.e.,
>>>>
>>>>> .libPaths()
>>>> [1] "/Library/Frameworks/R.framework/Versions/2.15/Resources/library"
>>>>
>>>> i've checked permissions and both directories
>>>> ~/Library/R/2.15-bioc-release/library and
>>>> ~/Library/R/2.15-bioc-devel/library are exactly the same in this regard
>>>> (drwxr-xr-x).
>>>>
>>>> can any Mac OSX user replicate this problem?
>>>>
>>>
>> One more thing to check--after modifying .bash_profile, you have to
>> either source it or open a new terminal window, before the changes you
>> made will be active. Could that be the problem?
>> Dan
>>
>>
>>
>>
>>> I was having a similar problem until I realized that I hadn't created
>>> both directories (I had only created one of them). After I did that,
>>> my aliases worked just fine.
>>>
>>> Creating them in .bash_profile has also not been a problem for me.
>>>
>>> Nico, thanks for sharing your script, but if you are working with
>>> R-devel (2.16) I'm not sure you need it. R 2.16 will keep all its
>>> packages in a separate directory from 2.15 automatically. The
>>> R_LIBS_USER trick is intended for using R 2.15 with two different
>>> versions of Bioconductor.
>>>
>>> Thanks,
>>> Dan
>>>
>>>
>>>> if not, i guess i must be doing something wrong, but i have no clue what
>>>> it
>>>> could be, any hint to a possible diagnostic/QC will be very much
>>>> appreciated.
>>>>
>>>> thanks,
>>>> robert.



More information about the Bioc-devel mailing list