Given the cell index $i$, the coordinate $(x,y)$ can be calculated as $$y = floor((i-1)/K)$$ $$x = (i-1)-K*y.$$ Continuing the above example, the coordinate for cell $i=1$ is be found to be $(x,y)=(0,0)$, for cell $i=2560000$ it is $(x,y)=(1599,1599)$, for cell $i=6299$ is it $(x,y)=(1498,3)$.
xy2indices()
and indices2xy()
in the All methods of the
In order to conveniently work with cell indices in R, the
convention in affxparser is to use one-based
indices.
Hence the addition (and subtraction) of 1:s in the above equations.
This is all taken care of by
Note that, in addition to (x,y) coordinates, a CDF file also contains
a one-based "index" for each cell. This "index" is redundant to
the (x,y) coordinate and can be calculated analogously to the
above cell index while leaving out the addition (subtration)
of 1:s.
Importantly, since this "index" is redundant (and exists only in
CDF files), we have decided to treat this field as an internal field.
Methods of