Create a CoPro object, automatically choosing Single vs Multi and splitting large slices.
Source:R/01_constructors.R
CreateCoPro.RdBehavior:
one slice and ncell < p -> newCoProSingle()
one slice and ncell > p -> newCoProMulti() with artificial blocks
multi slices, all < p -> newCoProMulti() with original slideID
multi slices, some > p -> newCoProMulti() with refined slideID (origin + block)
Usage
CreateCoPro(
normalizedData,
locationData,
metaData,
cellTypes,
slideID = NULL,
maxCell = 50000L,
plot = FALSE,
seed = 1L
)Arguments
- normalizedData
matrix (cells x genes)
- locationData
data.frame (cells x coords; needs x,y, optionally z)
- metaData
data.frame (cells x annotations)
- cellTypes
vector length nrow(normalizedData)
- slideID
optional vector length nrow(normalizedData); if NULL, treated as one slice
- maxCell
integer max cells per (sub)slice (default 50000)
- plot
logical; if TRUE, plot the auto-slicing result (default FALSE)
- seed
integer seed for reproducible splitting (default 1)