overlapToMatrix
overlapToMatrix.Rd
create a count matrix based on overlap results from
calculateOverlap
Usage
# S4 method for giotto
overlapToMatrix(
x,
name = "raw",
poly_info = NULL,
feat_info = NULL,
type = c("point", "intensity"),
count_info_column = NULL,
aggr_function = "sum",
return_gobject = TRUE,
verbose = TRUE,
...
)
# S4 method for giottoPolygon
overlapToMatrix(
x,
feat_info = "rna",
type = c("point", "intensity"),
count_info_column = NULL,
output = c("Matrix", "data.table"),
...
)
# S4 method for SpatVector
overlapToMatrix(
x,
col_names = NULL,
row_names = NULL,
count_info_column = NULL,
output = c("Matrix", "data.table"),
verbose = TRUE,
...
)
# S4 method for data.table
overlapToMatrix(x, aggr_function = "sum", output = c("Matrix", "data.table"))
Arguments
- x
object containing overlaps info. Can be giotto object or SpatVector points or data.table of overlaps generated from
calculateOverlap
- name
name for the overlap count matrix
- poly_info
character. Polygon information to use
- feat_info
character. Feature information to use
- type
character. Type of overlap data (either 'point' or 'intensity')
- count_info_column
column with count information
- aggr_function
function to aggregate image information (default = sum)
- return_gobject
return giotto object (default: TRUE)
- verbose
be verbose
- ...
additional params to pass to methods
- output
data format/class to return the results as
- col_names, row_names
character vector. (optional) Set of row and col names that are expected to exist. This fixes the dimensions of the matrix since the overlaps information does not directly report rows and cols where no values were detected.