Re: [Rpy] How to specify na_rm=True?

2011-10-07 Thread Laurent Gautier
This is happening because the signature of the R function is: base::mean(x, ...) No na.rm in sight, therefore no na_rm by default on the Python side - see http://rpy.sourceforge.net/rpy2/doc-dev/html/robjects_functions.html r['mean_default'](data_NA, na_rm=True) or r.mean(data_NA, **{'na.rm':

Re: [Rpy] rpy2: Bugfix for setup.py

2011-10-07 Thread Laurent Gautier
Thanks. The fix is in the repository. Consider using the bitbucket issue tracker for more bug reports or patches. Things can be missed on the mailing list. Laurent On 2011-10-07 02:27, Brendan Moloney wrote: > Hello, > > I had to fix a bug in setup.py in order to get rpy2 to build. > > Line 26

Re: [Rpy] Problems with DESeq library in rpy

2011-10-07 Thread Laurent Gautier
May be with deseq.estimateVarianceFunctions ? On 2011-10-07 16:09, Nick Schurch wrote: on a related matter, I've put a local install of pyr2 on my machine (also running R2.12.1) and tried the script you suggested: Python 2.6.4 (r264:75706, Sep 10 2010, 16:37:14) [GCC 4.1.2 20071124 (Red Hat 4

Re: [Rpy] Problems with DESeq library in rpy

2011-10-07 Thread Nick Schurch
on a related matter, I've put a local install of pyr2 on my machine (also running R2.12.1) and tried the script you suggested: Python 2.6.4 (r264:75706, Sep 10 2010, 16:37:14) [GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2 Type "help", "copyright", "credits" or "license" for more information. (

Re: [Rpy] Problems with DESeq library in rpy

2011-10-07 Thread Nick Schurch
Doh! You are, of course, correct. Thansk again for the help it is working fine now. The rpy2 way looks a lot nicer than the horrible hacks I'm writing now though, so I guess I should make the effor to start using that and convert all mu old codes. Thanks again! Nick On 7 October 2011 14:37, Lau

Re: [Rpy] Problems with DESeq library in rpy

2011-10-07 Thread Laurent Gautier
Did you terminate your session and restarted ? If not, it won't work until you clear "estimateVarianceFunction" from the current R GlobalEnv. L. On 2011-10-07 15:33, Nick Schurch wrote: Thanks for the swift replies! I've tried renaming the function and running things again and unfortunat

Re: [Rpy] Installing RPY2-2.2.3 with R 2.13 and python 2.7 on XP

2011-10-07 Thread Laurent Gautier
Ideas, certainly. Commitment, I'd like to see more of it ;-) https://bitbucket.org/lgautier/rpy2/issue/27/patch-to-fix-build-on-win32 On 2011-10-06 00:39, Hajas, Wayne wrote: I'm trying to get RPY2 working with python 2.7. I downloaded the .tar file and extracted the installation directori

Re: [Rpy] Problems with DESeq library in rpy

2011-10-07 Thread Laurent Gautier
On 2011-10-07 13:05, Thomas Kluyver wrote: On 7 October 2011 11:57, Nick Schurch > wrote: r('estimateVarianceFunctions <- function(){load("mySavedR.rdata")\nx=estimateVarianceFunctions(z)\nreturn(x)}') and then call it from python: >>> test = r.e

Re: [Rpy] Problems with DESeq library in rpy

2011-10-07 Thread Thomas Kluyver
On 7 October 2011 11:57, Nick Schurch wrote: > r('estimateVarianceFunctions <- > function(){load("mySavedR.rdata")\nx=estimateVarianceFunctions(z)\nreturn(x)}') > > and then call it from python: > > >>> test = r.estimateVarianceFunctions() > > I get: > > Traceback (most recent call last): > Fil

[Rpy] Problems with DESeq library in rpy

2011-10-07 Thread Nick Schurch
dear Rpyers, I'm having some problems using parts of the DESeq library from rpy, specifically when I try to use theestimateVarianceFunctions function. I have a saved R CountDataSet object. If I load this object in R (as variable z), load the DESeq library and then run: > x=estimateVarianceFuncti