Prepares the input of PlotCellMap(): the cells inside a square field
(or all cells for a whole-section map), the field geometry and, when
requested, the interface zone, i.e. the points of a regular grid that lie
within radius of a reference cell type (for example the tumour-stroma
interface within 20 micrometres of a tumour cell).
Usage
CellMapData(
cells,
centre = NULL,
size = NULL,
centre_cell = NULL,
id = "row",
grid = NULL,
offset = NULL,
interface = NULL,
classes = NULL,
margin = 0,
x = "x",
y = "y",
label = "label"
)Arguments
- cells
Data frame of cells (positions, label and further columns).
- centre
Optional
c(x, y)or a data frame with columnsx,y.- size
Optional field width;
NULLfor a whole-section map.- centre_cell
Optional cell identifier giving the centre.
- id
Column holding cell identifiers for
centre_cell.- grid
Optional list with
stepandoffset: the centre is moved to the nearestmin(coordinate) + offset + k * step.- offset
Optional shift
c(dx, dy)added to the centre.- interface
Optional list with
labels(reference cell labels),radiusandstep(grid spacing).- classes
Optional list with
column,map(named list of value to class) andto(new column name; default"class"); unmapped values becomedefault(defaultNA).- margin
Extra width kept around the field (cells drawn partly inside).
- x, y, label
Column names.
Value
A list of class phenoscapR_cellmap with cells, interface
(data frame of grid points in the zone, or NULL), centre, size,
step and extent (c(xmin, xmax, ymin, ymax)).