Function to create a new object
Usage
newCoProSingle(normalizedData, locationData, metaData, cellTypes)
# S4 method for class 'ANY,matrixOrDataFrame,data.frame,factorOrCharacter'
newCoProSingle(normalizedData, locationData, metaData, cellTypes)Arguments
- normalizedData
A
matrixobject to store normalized data.- locationData
A
data.frameobject to store the location. It should either contain two columns named by "x" and "y", or three columns named by "x", "y", and "z". No other names allowed- metaData
A
data.frameobject to store metadata for each cell.- cellTypes
A
vectorobject with elements being character. It should match the number of cells in the data matrix and each represents a cell type label of a cell.
See also
newCoProMulti(), CreateCoPro(), asCoProSingle()
Other object-creation:
asCoPro,
newCoProMulti(),
subsetData()
Examples
toy <- readRDS(system.file("extdata", "toy_copro_data.rds", package = "CoPro"))
obj <- newCoProSingle(
normalizedData = toy$normalizedData,
locationData = toy$locationData,
metaData = toy$metaData,
cellTypes = toy$cellTypes
)
obj
#> 'CoProSingle' object for spatial coordinated progression detection
#> ------------------------
#> Number of cells: 200
#> Number of genes: 80
#> Number of slides: 1 (single-slide analysis)
#>
#> Processing steps completed:
#>
#> Available metadata fields:
#> - cell_id
#> - cell_type
#>
#> Approx. object size: 0.20 MB