Skip to contents

Some features will no longer be available when updating an STUtility v1 object. STUtility v1 objects do not store information about scaling factors to convert between pixels and real distances which will set limitations on some of the visualization methods and spatial functions. To mitigate these issues, you can either reload the data from the raw space ranger output files or manually add the missing information stored in the "scalefactors_json.json" files.

Usage

UpdateSTUtilityV1Object(object, verbose = TRUE)

Arguments

object

A Seurat object created with STUtility v1

verbose

Print messages

Value

A Seurat object compatible with semla

Details

Note that valid image paths need to be available from the STUtility v1 object. If not, you can set the paths manually before updating the object: old_se@tools$Staffli@imgs <- c("path/to/im1.jpg", "path/to/im2.jpg", ...)

Author

Ludvig Larsson

Examples


if (FALSE) { # \dontrun{
se_old_url <- file.path("https://data.mendeley.com/public-files/datasets/kj3ntnt6vb/files",
                        "8f9d3dee-a026-40f0-be66-2df693f9db66/file_downloaded")

# Load old STUtility object
se_old <- readRDS(url(se_old_url))

# Update imgs slot of Staffli object to a valid path or URL (H&E image)
he_img <- file.path("https://data.mendeley.com/public-files/datasets/kj3ntnt6vb/files",
                    "d97fb9ce-eb7d-4c1f-98e0-c17582024a40/file_downloaded")
se_old@tools$Staffli@imgs <- he_img

# Update old STUtility object
se_new <- UpdateSTUtilityV1Object(se_old)
} # }