prep_stitched_data: Prepare stitched data for plotting

View source: R/prep_stitched_data.R

prep_stitched_dataR Documentation

Prepare stitched data for plotting

Description

Given a SpatialExperiment built with visiumStitched::build_spe() http://research.libd.org/visiumStitched/reference/build_spe.html, drop excluded spots (specified by spe$exclude_overlapping) and compute an appropriate spot size for plotting with vis_gene() or vis_clus(), assuming the plot will be written to a PDF of default dimensions (i.e. width = 7 and height = 7).

Usage

prep_stitched_data(spe, point_size, image_id)

Arguments

spe

A SpatialExperiment built with visiumStitched::build_spe(), containing a logical spe$exclude_overlapping column specifying which spots to display in plots

point_size

A numeric(1) specifying the size of the points. Defaults to 1.25. Some colors look better if you use 2 for instance.

image_id

A character(1) with the name of the image ID you want to use in the background.

Value

A list with names spe and point_size containing a filtered, ready-to-plot SpatialExperiment and an appropriate spot size (passed to vis_gene() or vis_clus()), respectively

Author(s)

Nicholas J. Eagles


LieberInstitute/spatialLIBD documentation built on Nov. 4, 2024, 11:57 a.m.