VisualizeSlide: Visualize the Visium slide image

visualizeSlideR Documentation

Visualize the Visium slide image

Description

Generate and visualize the tissue image as a ggplot2 object. Users can manually add and modify layers (e.g. title, axis) following ggplot2's syntax.

Usage

visualizeSlide(slide_obj, title = "")

Arguments

slide_obj

A slide object created or inherited from createSlide().

title

(chr) Title of the plot. Default: ""

Value

A ggplot2 object.

Examples


data(mbrain_raw)
spatial_dir <- system.file(file.path("extdata",
                                     "V1_Adult_Mouse_Brain_spatial"),
                           package = "SpotClean")
mbrain_slide_info <- read10xSlide(tissue_csv_file=file.path(spatial_dir,
                                       "tissue_positions_list.csv"),
             tissue_img_file = file.path(spatial_dir,
                                       "tissue_lowres_image.png"),
             scale_factor_file = file.path(spatial_dir,
                                       "scalefactors_json.json"))
mbrain_obj <- createSlide(mbrain_raw,
                          mbrain_slide_info)
gp <- visualizeSlide(mbrain_obj)
plot(gp)

zijianni/SpotClean documentation built on June 12, 2024, 1:58 a.m.