Skip to contents

Utility function to prepare data for FeatureViewer. The exported JSON file should be exported to the same directory as the H&E image tiles generated with TileImage

Usage

export_coordinates(
  object,
  sampleNumber = 1L,
  outdir,
  overwrite = FALSE,
  verbose = TRUE
)

Arguments

object

A Seurat object created with semla

sampleNumber

An integer specifying a sample ID to export spatial network for

outdir

Name of a directory to export JSON file to

overwrite

Should an existing coordinate file be overwritten?

verbose

Print messages

Value

No return value, writes coordinates to a file

Details

Coordinates are located outside the H&E images will not be shown in the viewer.

Examples

library(semla)

se_mbrain <- readRDS(system.file("extdata/mousebrain",
                                 "se_mbrain",
                                 package = "semla"))

export_coordinates(se_mbrain, outdir = tempdir(), overwrite = TRUE)
#>  Fetching coordinates for sample 1
#>  Exporting Visium coordinates to <DATADIR>/coords_Visium_1.json