[Bioc-devel] RFC: xy2i and i2xy in *cdf packages

James W. MacDonald jmacdon at med.umich.edu
Fri Mar 23 14:22:56 CET 2007

Hi Laurent,

lgautier at altern.org wrote:
> Hi,
> Here is an RFC.
> Background:
> The functions "xy2i" and "i2xy" are defined in each "cdf" annotation
> package for Affymetrix arrays. The code for a particular package depends
> on the
> size of the corresponding array (e.g., for 133A2
> xy2i = function(x,y) {y*732+x+1}
> where 732 is the size of the array).
> Problem:
> In the case one loads several such packages in the course of the same
> session,
> the function names are masking each others. This is a real danger as it
> becomes too easy to call the "wrong" functions "xy2i" or "i2xy"
> (both by functions that did not anticipate that several cdf packages could
> be loaded in the same session, or by a user during an interactive
> session).

I know the affy package doesn't use these functions, and a quick grep of 
other packages that I thought might possibly use them came up empty as 
well. Do you know of any packages that use these functions?

Given the fact that they do get masked on loading of other cdf packages, 
the apparent lack of use, and the existence of safer indices2xy() and 
xy2indices() functions, I would advocate deprecation/deletion rather 
than using a namespace.



> Proposed change:
> - drop the functions "xy2i"/"i2xy" in the cdf packages and use of the
> functions "indices2xy" or "xy2indices" in affy.
> *or*
> - hide "xy2i"/"i2xy" in the namespace of their respective packages,
> enforcing an explicit function call (e.g., "hgu133a2cdf:::xy2i").
> Regards,
> Laurent
> _______________________________________________
> Bioc-devel at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel

James W. MacDonald, M.S.
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109

Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.

More information about the Bioc-devel mailing list