Skip to contents

Create an S4 spatLocsObj

Usage

createSpatLocsObj(
  coordinates,
  name = "test",
  spat_unit = "cell",
  provenance = NULL,
  misc = NULL,
  verbose = TRUE
)

Arguments

coordinates

spatial coordinates

name

name of spatLocsObj

spat_unit

spatial unit of aggregated expression (e.g. 'cell')

provenance

origin data of aggregated expression information (if applicable)

misc

misc

verbose

be verbose

Value

spatLocsObj

Examples

x <- data.frame(
    cell_ID = c("cell_1", "cell_2", "cell_3"),
    sdimx = c(6637.881, 6471.978, 6801.610),
    sdimy = c(-5140.465, -4883.541, -4968.685)
)

createSpatLocsObj(coordinates = x, name = "raw")
#> There are non numeric or integer columns for the spatial location
#>  input at column position(s): 1
#>  The first non-numeric column will be considered as a cell ID
#>  to test for consistency with the expression matrix
#>  Other non numeric columns will be removed
#> An object of class spatLocsObj : "raw"
#> spat_unit : "cell"
#> dimensions: 3 3 
#> preview   :
#>       sdimx     sdimy cell_ID
#>       <num>     <num>  <char>
#> 1: 6637.881 -5140.465  cell_1
#> 2: 6471.978 -4883.541  cell_2
#> 3: 6801.610 -4968.685  cell_3
#> 
#> ranges:
#>         sdimx     sdimy
#> [1,] 6471.978 -5140.465
#> [2,] 6801.610 -4883.541
#>