View source: R/geometry_operation.R
removeEmptySpace | R Documentation |
For each sample independently, all geometries and spatialCoords
are
translated so the origin is at the minimum coordinates of the bounding box
of all geometries of the sample. This way coordinates of different samples
will be more comparable. This removes empty space in the images if present.
removeEmptySpace(sfe, sample_id = "all")
sfe |
An SFE object. |
sample_id |
Sample to remove empty space. |
An SFE object with empty space removed.
Unlike other functions in this package, this function operates on all samples by default.
library(SFEData)
library(SingleCellExperiment)
sfe <- McKellarMuscleData("full")
# Only keep spots on tissue
sfe <- sfe[, colData(sfe)$in_tissue]
# Move the coordinates of the tissue
sfe <- removeEmptySpace(sfe)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.