[Bioc-devel] Nasty function collision

Colin A. Smith colin at colinsmith.org
Tue Oct 31 21:22:02 CET 2006

This is sort of passing the buck but it seems like it is the  
responsibility of client code to resolve collisions like this when  
both colliding packages already use namespaces. I think the best  
option would be to have biomaRt use RCurl::getURL() instead of getURL 
(). Short of that, you might be able to write a function in  
affycoretools which redefines the behavior of getURL with an "ANY"  
argument in the global namespace:

setMethod("getURL", "ANY", function(object) {


Because annaffy is in its own namespace, it shouldn't be affected by  
that change. (?) I'm not sure if this suggestion would actually work  
and it could be regarded as messy hackery.

Just my two cents.


On Oct 31, 2006, at 11:08 , James W. MacDonald wrote:

> Thanks for the input. However, I am not sure if any of these  
> suggestions
> are applicable. I don't ever call getURL() directly; it gets called  
> as a
> result of calling saveHTML() in annaffy, which outputs an HTML  
> table, or
> it gets called by useMart() in biomaRt when trying to connect to a
> Biomart using the RCurl package.
> It seems to me that Laurent has the best suggestion - getURL() in
> annaffy has a method:
> setMethod("getURL", "ANY", function(object) {
>      return(character(0))
> })
> Which to an S4 maven may be useful, but pretty much torches the  
> getURL()
> in RCurl. It seems to me that this method isn't particularly useful  
> (is
> it?), so maybe the best course of action is to convince Colin Smith to
> remove this particular method.
> The other possibility is to get Steffen Durinck to change biomaRt  
> to use
> RCurl::getURL().
> Or am I still missing something?
> Best,
> Jim

More information about the Bioc-devel mailing list