2. Cell coordinates and cell indices {affxparser} | R Documentation

## 2. Cell coordinates and cell indices

### Description

This part describes how Affymetrix cells, also known as probes or features, are addressed.

### Cell coordinates

In Affymetrix data files, cells are uniquely identified by there cell coordinates, i.e. (x,y). For an array with N*K cells in N rows and K columns, the x coordinate is an integer in [0,K-1], and the y coordinate is an integer in [0,N-1]. The cell in the upper-left corner has coordinate (x,y)=(0,0) and the one in the lower-right corner (x,y)=(K-1,N-1).

### Cell indices and cell-index offsets

To simplify addressing of cells, a coordinate-to-index function is used so that each cell can be addressed using a single integer instead (of two). Affymetrix defines the cell index, i, of cell (x,y) as

i = K*y + x + 1,

where one is added to give indices in [1,N*K]. Continuing, the above definition means that cells are ordered row by row, that is from left to right and from top to bottom, starting at the upper-left corner. For example, with a chip layout (N,K)=(1600,1600) the cell at (x,y)=(0,0) has index i=1, and the cell at (x,y)=(1599,1599) has index i=2560000. A cell at (x,y)=(1498,3) has index i=6299.

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

Although not needed to use the methods in this package, to get the cell indices for the cell coordinates or vice versa, see `xy2indices` and `indices2xy()` in the affy package.

### Author(s)

Henrik Bengtsson (http://www.braju.com/R/)

[Package affxparser version 1.16.0 Index]