splitByCol | R Documentation |
The split
methods for SFE split an SFE object into multiple SFE
objects by geometries (all cells/spots intersecting with each geometry will
become a separate SFE object). The splitSamples
function splits the
SFE object by sample_id
so each sample will become a separate SFE
object. The splitContiguity
function splits the SFE object by
contiguity of an annotGeometry
, which by default is "tissueBoundary".
## S4 method for signature 'SpatialFeatureExperiment,sf'
splitByCol(x, f, sample_id = "all", colGeometryName = 1L, cover = FALSE)
## S4 method for signature 'SpatialFeatureExperiment,sfc'
splitByCol(x, f, sample_id = 1L, colGeometryName = 1L, cover = FALSE)
## S4 method for signature 'SpatialFeatureExperiment,list'
splitByCol(x, f, sample_id = "all", colGeometryName = 1L, cover = FALSE)
splitSamples(x)
splitContiguity(
x,
colGeometryName = 1L,
annotGeometryName = "tissueBoundary",
min_area = 0,
cover = FALSE
)
x |
An SFE object |
f |
It can be a |
sample_id |
Which samples to split. |
colGeometryName |
Which |
cover |
Logical, whether the geometries in |
annotGeometryName |
Name of |
min_area |
Minimum area in the same unit as the geometry coordinates (squared) for each piece to be considered a separate piece when splitting by contiguity. Only pieces that are large enough are considered. |
A list of SFE objects.
# example code
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.