Error / import rpy module

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Error / import rpy module

Sarah Maman-2
Hello,

Some Galaxy tools failed to import rpy module and displays the following
message:

Traceback (most recent call last):
  File "/usr/local/bioinfo/src/galaxy/galaxy-dist/tools/plotting/histogram.py", line 5, in <module>
    from rpy import *
ImportError: No module named rpy


For instance, the tool "Regrouping" (tools/stats/grouping.py) have been
refactored in 2011 by Kanwei Li to use numpy instead of rpy. And this
tool runs on my local instance of Galaxy.
But I would like to be able use rpy module instead of refactor the
others tools.

Could you, please, help me to understand why the eggs ' import does not
allow the use of rpy module? How to debug these tools?

Thnaks in advance,
Sarah


--
          --*--
Sarah Maman
INRA - LGC - SIGENAE
http://www.sigenae.org/
Chemin de Borde-Rouge - Auzeville - BP 52627
31326 Castanet-Tolosan cedex - FRANCE
Tel:   +33(0)5.61.28.57.08
Fax:   +33(0)5.61.28.57.53
         --*--

___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
Reply | Threaded
Open this post in threaded view
|

Re: Error / import rpy module

Ross-2


On Wed, Jun 5, 2013 at 6:19 PM, Sarah Maman <[hidden email]> wrote:
Hello,

Some Galaxy tools failed to import rpy module and displays the following message:

Traceback (most recent call last):
 File "/usr/local/bioinfo/src/galaxy/galaxy-dist/tools/plotting/histogram.py", line 5, in <module>
   from rpy import *
ImportError: No module named rpy


For instance, the tool "Regrouping" (tools/stats/grouping.py) have been refactored in 2011 by Kanwei Li to use numpy instead of rpy. And this tool runs on my local instance of Galaxy.
But I would like to be able use rpy module instead of refactor the others tools.

Could you, please, help me to understand why the eggs ' import does not allow the use of rpy module? How to debug these tools?

Thnaks in advance,
Sarah


--
         --*--
Sarah Maman
INRA - LGC - SIGENAE
http://www.sigenae.org/
Chemin de Borde-Rouge - Auzeville - BP 52627
31326 Castanet-Tolosan cedex - FRANCE
Tel:   <a href="tel:%2B33%280%295.61.28.57.08" value="+33561285708" target="_blank">+33(0)5.61.28.57.08
Fax:   <a href="tel:%2B33%280%295.61.28.57.53" value="+33561285753" target="_blank">+33(0)5.61.28.57.53         --*--

___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
 http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
 http://galaxyproject.org/search/mailinglists/



--
Ross Lazarus MBBS MPH;
Head, Medical Bioinformatics, BakerIDI; Tel: +61 385321444
http://scholar.google.com/citations?hl=en&user=UCUuEM4AAAAJ

___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
Reply | Threaded
Open this post in threaded view
|

Re: Error / import rpy module

Hans-Rudolf Hotz
In reply to this post by Sarah Maman-2
Hi Sarah

you need to install the rpy module:

http://rpy.sourceforge.net/rpy.html


As a warning: we have been struggling to get rpy to work with newer
versions of R. In or experience in only works with R version 2.9 and
older. Thanks to a recent effort of our sysadmin, we can now use it with
2.15 - which is good, but not great, as our default version of R is now 3.0

Although we haven't started to us it, I recommend using rpy2:

http://rpy.sourceforge.net/rpy2.html

Most tools have been refactored by John Chilton

see: http://dev.list.galaxyproject.org/rpy2-Core-Tools-td4659832.html


Regards, Hans-Rudolf




On 06/05/2013 10:19 AM, Sarah Maman wrote:

> Hello,
>
> Some Galaxy tools failed to import rpy module and displays the following
> message:
>
> Traceback (most recent call last):
>   File
> "/usr/local/bioinfo/src/galaxy/galaxy-dist/tools/plotting/histogram.py",
> line 5, in <module>
>     from rpy import *
> ImportError: No module named rpy
>
>
> For instance, the tool "Regrouping" (tools/stats/grouping.py) have been
> refactored in 2011 by Kanwei Li to use numpy instead of rpy. And this
> tool runs on my local instance of Galaxy.
> But I would like to be able use rpy module instead of refactor the
> others tools.
>
> Could you, please, help me to understand why the eggs ' import does not
> allow the use of rpy module? How to debug these tools?
>
> Thnaks in advance,
> Sarah
>
>
___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
Reply | Threaded
Open this post in threaded view
|

Re: Error / import rpy module

Peter Cock
On Wed, Jun 5, 2013 at 9:42 AM, Hans-Rudolf Hotz <[hidden email]> wrote:

> Hi Sarah
>
> you need to install the rpy module:
>
> http://rpy.sourceforge.net/rpy.html
>
>
> As a warning: we have been struggling to get rpy to work with newer versions
> of R. In or experience in only works with R version 2.9 and older. Thanks to
> a recent effort of our sysadmin, we can now use it with 2.15 - which is
> good, but not great, as our default version of R is now 3.0

According to the rpy list, using the latest code from SVN
you should be able to get rpy v1 to work under R 3.0.1,
http://sourceforge.net/mailarchive/message.php?msg_id=30999482

> Although we haven't started to us it, I recommend using rpy2:
>
> http://rpy.sourceforge.net/rpy2.html

Indeed - rpy v1 is still being maintained in SVN, but
hasn't had an official release with these fixed for
over two years.

> Most tools have been refactored by John Chilton
>
> see: http://dev.list.galaxyproject.org/rpy2-Core-Tools-td4659832.html

We're not making heavy use of rpy in Galaxy yet, but I
hope John's good work switching to rpy2 gets integrated
soon.

Peter
___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
Reply | Threaded
Open this post in threaded view
|

Re: Error / import rpy module

Sarah Maman-2
In reply to this post by Hans-Rudolf Hotz
Thanks a lot for these explantions,

I have downloded refactored tools (rpy2 is more suited to our R version).
Unfortunatly, galaxy still do not import rpy2 ..

Traceback (most recent call last):
  File "/usr/local/bioinfo/src/galaxy/galaxy-dist/tools/plotting/histogram.py", line 6, in <module>
    import rpy2.robjects as robjects
ImportError: No module named rpy2.robjects


Moreover our rpy2 module is avalaible and listed in our python. Maybe a
problem with Python ?

Thanks in advance,
Sarah

Hans-Rudolf Hotz a écrit :

> Hi Sarah
>
> you need to install the rpy module:
>
> http://rpy.sourceforge.net/rpy.html
>
>
> As a warning: we have been struggling to get rpy to work with newer
> versions of R. In or experience in only works with R version 2.9 and
> older. Thanks to a recent effort of our sysadmin, we can now use it
> with 2.15 - which is good, but not great, as our default version of R
> is now 3.0
>
> Although we haven't started to us it, I recommend using rpy2:
>
> http://rpy.sourceforge.net/rpy2.html
>
> Most tools have been refactored by John Chilton
>
> see: http://dev.list.galaxyproject.org/rpy2-Core-Tools-td4659832.html
>
>
> Regards, Hans-Rudolf
>
>
>
>
> On 06/05/2013 10:19 AM, Sarah Maman wrote:
>> Hello,
>>
>> Some Galaxy tools failed to import rpy module and displays the following
>> message:
>>
>> Traceback (most recent call last):
>>   File
>> "/usr/local/bioinfo/src/galaxy/galaxy-dist/tools/plotting/histogram.py",
>> line 5, in <module>
>>     from rpy import *
>> ImportError: No module named rpy
>>
>>
>> For instance, the tool "Regrouping" (tools/stats/grouping.py) have been
>> refactored in 2011 by Kanwei Li to use numpy instead of rpy. And this
>> tool runs on my local instance of Galaxy.
>> But I would like to be able use rpy module instead of refactor the
>> others tools.
>>
>> Could you, please, help me to understand why the eggs ' import does not
>> allow the use of rpy module? How to debug these tools?
>>
>> Thnaks in advance,
>> Sarah
>>
>>


--
          --*--
Sarah Maman
INRA - LGC - SIGENAE
http://www.sigenae.org/
Chemin de Borde-Rouge - Auzeville - BP 52627
31326 Castanet-Tolosan cedex - FRANCE
Tel:   +33(0)5.61.28.57.08
Fax:   +33(0)5.61.28.57.53
         --*--

___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
Reply | Threaded
Open this post in threaded view
|

Re: Error / import rpy module

John Chilton
In reply to this post by Peter Cock
Three quick comments on this thread:

- A real short-coming of my colleague JJ is that he doesn't possess a
tenth the ego that I do, so he doesn't care, but I think it is
important he gets credit. He did 85% of the work, and the harder 85%
at that, so they should be called the JJ changes.

- It is possible to get rpy working with newer versions of R (at least
3.0.0) because CloudBioLinux is configured this way and it seems to
work for me. (Not that there aren't other problems -
https://github.com/chapmanb/cloudbiolinux/commit/302072341696390dc1cf3ae1dd88a9c1ca35a4fa).
CloudBioLinux is configured to get its rpy packages here
http://watson.nci.nih.gov/cran_mirror/bin/linux/ubuntu/{precise,quantal}
which has versions compatible with R 3.0.0.

- Finally, an idea - "Death to RPY - The BoF". Everyone with a stake
in this meets with laptops at the Galaxy conference together and we
divvy up the remaining tools to convert (hopefully one tool per
person). Every person is also assigned two of the existing converted
tools to retest and clean up. As they are completed they are given to
a core Galaxy developer (Nate, Dannon, Daniel, any volunteers?) to
collect, re-retest, and okay. The changes are then committed all
together at the end and the next Galaxy release contains no
dependencies on rpy.

These tools are not updated frequently, so the advantage of these all
being upgraded in one commit before being shipped off to the tool shed
is that an institution that is really stuck on rpy1 for whatever
reason can just undo that single commit and keep going with the old
tools indefinitely.

If anybody with commit access signs on I will be happy create a BoF
page and attend this.

Thanks,
-John






On Wed, Jun 5, 2013 at 4:23 AM, Peter Cock <[hidden email]> wrote:

> On Wed, Jun 5, 2013 at 9:42 AM, Hans-Rudolf Hotz <[hidden email]> wrote:
>> Hi Sarah
>>
>> you need to install the rpy module:
>>
>> http://rpy.sourceforge.net/rpy.html
>>
>>
>> As a warning: we have been struggling to get rpy to work with newer versions
>> of R. In or experience in only works with R version 2.9 and older. Thanks to
>> a recent effort of our sysadmin, we can now use it with 2.15 - which is
>> good, but not great, as our default version of R is now 3.0
>
> According to the rpy list, using the latest code from SVN
> you should be able to get rpy v1 to work under R 3.0.1,
> http://sourceforge.net/mailarchive/message.php?msg_id=30999482
>
>> Although we haven't started to us it, I recommend using rpy2:
>>
>> http://rpy.sourceforge.net/rpy2.html
>
> Indeed - rpy v1 is still being maintained in SVN, but
> hasn't had an official release with these fixed for
> over two years.
>
>> Most tools have been refactored by John Chilton
>>
>> see: http://dev.list.galaxyproject.org/rpy2-Core-Tools-td4659832.html
>
> We're not making heavy use of rpy in Galaxy yet, but I
> hope John's good work switching to rpy2 gets integrated
> soon.
>
> Peter
> ___________________________________________________________
> Please keep all replies on the list by using "reply all"
> in your mail client.  To manage your subscriptions to this
> and other Galaxy lists, please use the interface at:
>   http://lists.bx.psu.edu/
>
> To search Galaxy mailing lists use the unified search at:
>   http://galaxyproject.org/search/mailinglists/
___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
Reply | Threaded
Open this post in threaded view
|

Re: Error / import rpy module

Peter Cock
On Wed, Jun 5, 2013 at 2:18 PM, John Chilton <[hidden email]> wrote:

> Three quick comments on this thread:
>
> - A real short-coming of my colleague JJ is that he doesn't possess a
> tenth the ego that I do, so he doesn't care, but I think it is
> important he gets credit. He did 85% of the work, and the harder 85%
> at that, so they should be called the JJ changes.
>
> - It is possible to get rpy working with newer versions of R (at least
> 3.0.0) because CloudBioLinux is configured this way and it seems to
> work for me. (Not that there aren't other problems -
> https://github.com/chapmanb/cloudbiolinux/commit/302072341696390dc1cf3ae1dd88a9c1ca35a4fa).
> CloudBioLinux is configured to get its rpy packages here
> http://watson.nci.nih.gov/cran_mirror/bin/linux/ubuntu/{precise,quantal}
> which has versions compatible with R 3.0.0.
>
> - Finally, an idea - "Death to RPY - The BoF". Everyone with a stake
> in this meets with laptops at the Galaxy conference together and we
> divvy up the remaining tools to convert (hopefully one tool per
> person). Every person is also assigned two of the existing converted
> tools to retest and clean up. As they are completed they are given to
> a core Galaxy developer (Nate, Dannon, Daniel, any volunteers?) to
> collect, re-retest, and okay. The changes are then committed all
> together at the end and the next Galaxy release contains no
> dependencies on rpy.
>
> These tools are not updated frequently, so the advantage of these all
> being upgraded in one commit before being shipped off to the tool shed
> is that an institution that is really stuck on rpy1 for whatever
> reason can just undo that single commit and keep going with the old
> tools indefinitely.
>
> If anybody with commit access signs on I will be happy create a BoF
> page and attend this.
>
> Thanks,
> -John

If you all can pull that off in Oslo, great. Otherwise a piecewise
conversion seems a sensible plan B, where both rpy (v1) and rpy2
are installed and things are updated on a tool by tool basis.

The BoF group might also have some collective wisdom on how
to deal with the question of multiple versions of R/BioConductor
given this is important for reproducibility of many more complex
and rapidly developed R tools.

Peter
___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
Reply | Threaded
Open this post in threaded view
|

Death to RPY - The BoF

Hans-Rudolf Hotz


On 06/05/2013 03:33 PM, Peter Cock wrote:
> On Wed, Jun 5, 2013 at 2:18 PM, John Chilton <[hidden email]> wrote:

//

>> - Finally, an idea - "Death to RPY - The BoF". Everyone with a stake
>> in this meets with laptops at the Galaxy conference together and we
>> divvy up the remaining tools to convert (hopefully one tool per
>> person). Every person is also assigned two of the existing converted
>> tools to retest and clean up. As they are completed they are given to
>> a core Galaxy developer (Nate, Dannon, Daniel, any volunteers?) to
>> collect, re-retest, and okay. The changes are then committed all
>> together at the end and the next Galaxy release contains no
>> dependencies on rpy.
>>
>> These tools are not updated frequently, so the advantage of these all
>> being upgraded in one commit before being shipped off to the tool shed
>> is that an institution that is really stuck on rpy1 for whatever
>> reason can just undo that single commit and keep going with the old
>> tools indefinitely.
>>
>> If anybody with commit access signs on I will be happy create a BoF
>> page and attend this.
>>
>> Thanks,
>> -John
>
> If you all can pull that off in Oslo, great. Otherwise a piecewise
> conversion seems a sensible plan B, where both rpy (v1) and rpy2
> are installed and things are updated on a tool by tool basis.
>
> The BoF group might also have some collective wisdom on how
> to deal with the question of multiple versions of R/BioConductor
> given this is important for reproducibility of many more complex
> and rapidly developed R tools.
>
> Peter
>

I like the BoF suggestion, I am just afraid we will be too busy in Oslo
to do it...we probably have to go for Peter's back-up plan. And, thank
to JJ's efforts we are already well into the piecewise conversion.

As part of our current work to set up a new box for our Galaxy
development server at the FMI, we will use the already converted tools.
I'll keep you posted.

Regarding "the question of multiple versions of R/BioConductor": we
intend to keep them, and if necessary 'freeze' a tool...but we are
looking for a better solution.

Regards, Hans-Rudolf





___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/