LoadReference: Load the reference RDS files

View source: R/helpers.R

LoadReferenceR Documentation

Load the reference RDS files

Description

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

Usage

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

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

## End(Not run)


satijalab/azimuth documentation built on Nov. 19, 2023, 8:34 a.m.