frame_limits | R Documentation |
This function is useful for automatically cropping the images. It finds the edge points (min and max on both the X and Y axis) in pixels based on a particular image. This function takes advantage of the known design of Visium slides as documented at https://support.10xgenomics.com/spatial-gene-expression/software/pipelines/latest/output/spatial and https://kb.10xgenomics.com/hc/en-us/articles/360041426992. That is, that for a regular Visium slide, the array row has a range from 0 to 77, the array col from 0 to 127, the capture area has a 6.5 mm edge length, the the fiducial frame area has an edge of 8 mm, and spot centers are about 100 um from each other.
frame_limits(
spe,
sampleid,
image_id = "lowres",
visium_grid = list(row_min = 0, row_max = 77, col_min = 0, col_max = 127,
fiducial_vs_capture_edge = (8 - 6.5) * 1000/2/100)
)
spe |
A
SpatialExperiment-class
object. See |
sampleid |
A |
image_id |
A |
visium_grid |
A named list with the parameters known about the Visium grid. This can change for Visium HD vs regular Visium for example. |
A named list with y_min
, y_max
, x_min
, and x_max
pixels from
the selected image that can be used for cropping the image.
Louise Huuki-Myers and Leonardo Collado-Torres
Other Spatial cluster visualization functions:
vis_clus()
,
vis_clus_p()
,
vis_grid_clus()
if (enough_ram()) {
## Obtain the necessary data
if (!exists("spe")) spe <- fetch_data("spe")
## Obtain the frame limits for one sample
frame_limits(spe, sampleid = "151673")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.