Read in a reference Seurat object and annoy index. This function can read either from URLs or a file path. In order to read properly, there must be the following files:

  • “ref.Rds” for the downsampled reference Seurat object (for mapping)

  • “idx.annoy” for the nearest-neighbor index object

LoadReference(path, seconds = 10L)

Arguments

path

Path or URL to the two RDS files

seconds

Timeout to check for URLs in seconds

Value

A list with two entries:

map

The downsampled reference Seurat object (for mapping)

plot

The reference Seurat object (for plotting)

Examples

if (FALSE) {
# Load from a URL
ref <- LoadReference("https://seurat.nygenome.org/references/pbmc")
# Load from a directory
ref2 <- LoadReference("/var/www/html")
}