The main reason I was trying to move to the low level interface is speed. So what I am doing is calculating several times the p-value for the same python object. So I bind phyper to the object and then just perform the test several times. This already improved the speed a lot, compared to simply calling rinterface.phyper everytime. But the problem is that I am using this in huge sequence datasets, taking hours for a single run. And the bottleneck is on the significance calculation which is taking 3x more time than all the rest.
In a very small dataset that I use for test using the low level interface gives me less time to run it. Dropping from ~0.9s to ~0.8s so I expect that using it on a large dataset will give me even more saving. I will take a look at the code and try to make sense of it. I just though there was a better solution since it kind of points to that on the documentation. Thank you very much once more, Bruno 2010/2/3 Laurent Gautier <lgaut...@gmail.com> On 2/3/10 12:32 PM, B.A.D.C.M.D Santos wrote: Hello again, Today I was trying to port my phyper from the high-level interface to the low-level interface. My problem is again how I map the arguments with dot. According to the documentation I should be able to use the special **Kwargs again. But I have no idea how to do this. I tried directly but it obviously didn't work because the function was expecting Sexp_Type object. Can someone give some light on this. Also is there any easy way to pass four parameters to phyper without needing to create four Sexp_Type vectors individually? Unless you have good reasons to move to the lower-level interface, I would advice you to stay with the higher level interface. The higher level interface is mostly abstracting those details from you. If you really really want to do it at the lower level, you can study how the higher level interface is doing it itself (it is implemented in Python). An answer to your question would just be that code ;-) . L. Thanks in advance, Bruno 2010/2/2 B.A.D.C.M.D Santos<bac...@cam.ac.uk> Thank you Laurent. I had completely forget that solution. It seems to be working know, although I am getting some weird values. But I think the problem is on my script. Thank you very much, Bruno 2010/2/2 Laurent Gautier<lgaut...@gmail.com> On 2/2/10 12:40 PM, B.A.D.C.M.D Santos wrote: Hello everyone, I am currently using rpy2 in order to use phyper function from R into my Python script. Nevertheless I have a problem because I want to use the argument log.p=TRUE. The last time I checked there was a problem with the mapping of the arguments with dots in the middle. Is this still a bug? If it is, is there any workaround to solve this? Did the link given earlier work for you ? http://www.mail-archive.com/rpy-list@lists.sourceforge.net/msg02313.html Or does the new rpy2 alpha solves this problem? It does provide a syntactic sugar for this. You can read more at: http://rpy.sourceforge.net/rpy2/doc-2.1/html/robjects.html#functions (the doc also tells to make a blind 'turn "." into "_"' function) Hoping this helps, L. I am using: Python 2.6.4 R version 2.10.1 rpy2 2.0.4 Thanks in advance, Bruno ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list