[Bioc-devel] Nasty function collision

Robert Gentleman rgentlem at fhcrc.org
Tue Oct 31 22:16:28 CET 2006


please consider the option of importing getURL, that is the better way 
to do it, then you get the one you want for all functions, and it is 
obvious. using RCurl::getURL, should not be the preferred option

Steffen Durinck wrote:
> I agree with Colin and will modify the biomaRt code so it uses 
> RCurl::getURL().
> Thanks Jim, for pointing out this problem.
> 
> Cheers,
> Steffen
> 
> Colin A. Smith wrote:
>> 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) {
>>
>>      RCurl::getURL(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.
>>
>> -Colin
>>
>> 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
>>>     
>> _______________________________________________
>> Bioc-devel at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>>
> 
> _______________________________________________
> Bioc-devel at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
> 

-- 
Robert Gentleman, PhD
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
PO Box 19024
Seattle, Washington 98109-1024
206-667-7700
rgentlem at fhcrc.org



More information about the Bioc-devel mailing list