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

lgautier at altern.org lgautier at altern.org
Fri Mar 23 02:25:55 CET 2007


Here is an RFC.

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).

In the case one loads several such packages in the course of the same
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

Proposed change:
- drop the functions "xy2i"/"i2xy" in the cdf packages and use of the
functions "indices2xy" or "xy2indices" in affy.


- hide "xy2i"/"i2xy" in the namespace of their respective packages,
enforcing an explicit function call (e.g., "hgu133a2cdf:::xy2i").



More information about the Bioc-devel mailing list