Read in data from Vitessce-formatted JSON files
Usage
ReadVitessce(
counts = NULL,
coords = NULL,
molecules = NULL,
type = c("segmentations", "centroids"),
filter = NA_character_
)
LoadHuBMAPCODEX(data.dir, fov, assay = "CODEX")Arguments
- counts
Path or URL to a Vitessce-formatted JSON file with expression data; should end in “
.genes.json” or “.clusters.json”; passNULLto skip- coords
Path or URL to a Vitessce-formatted JSON file with cell/spot spatial coordinates; should end in “
.cells.json”; passNULLto skip- molecules
Path or URL to a Vitessce-formatted JSON file with molecule spatial coordinates; should end in “
.molecules.json”; passNULLto skip- type
Type of cell/spot spatial coordinates to return, choose one or more from:
“segmentations” cell/spot segmentations
“centroids” cell/spot centroids
- filter
A character to filter molecules by, pass
NAto skip molecule filtering- data.dir
Path to a directory containing Vitessce cells and clusters JSONs
- fov
Name to store FOV as
- assay
Name to store expression matrix as
Value
ReadVitessce: A list with some combination of the
following values:
“
counts”: ifcountsis notNULL, an expression matrix with cells as columns and features as rows“
centroids”: ifcoordsis notNULLandtypeis contains“centroids”, a data frame with cell centroids in three columns: “x”, “y”, and “cell”“
segmentations”: ifcoordsis notNULLandtypecontains “centroids”, a data frame with cell segmentations in three columns: “x”, “y” and “cell”“
molecules”: ifmoleculesis notNULL, a data frame with molecule spatial coordinates in three columns: “x”, “y”, and “gene”
LoadHuBMAPCODEX: A Seurat object
Note
This function requires the jsonlite package to be installed
Progress Updates with progressr
This function uses
progressr to
render status updates and progress bars. To enable progress updates, wrap
the function call in with_progress or run
handlers(global = TRUE) before running
this function. For more details about progressr, please read
vignette("progressr-intro")
Examples
if (FALSE) { # \dontrun{
coords <- ReadVitessce(
counts =
"https://s3.amazonaws.com/vitessce-data/0.0.31/master_release/wang/wang.genes.json",
coords =
"https://s3.amazonaws.com/vitessce-data/0.0.31/master_release/wang/wang.cells.json",
molecules =
"https://s3.amazonaws.com/vitessce-data/0.0.31/master_release/wang/wang.molecules.json"
)
names(coords)
coords$counts[1:10, 1:10]
head(coords$centroids)
head(coords$segmentations)
head(coords$molecules)
} # }