ReadVitessce {Seurat} | R Documentation |
Read Data From Vitessce
Description
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 “ |
coords |
Path or URL to a Vitessce-formatted JSON file with cell/spot
spatial coordinates; should end in “ |
molecules |
Path or URL to a Vitessce-formatted JSON file with molecule
spatial coordinates; should end in “ |
type |
Type of cell/spot spatial coordinates to return, choose one or more from:
|
filter |
A character to filter molecules by, pass |
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
”: ifcounts
is notNULL
, an expression matrix with cells as columns and features as rows -
“
centroids
”: ifcoords
is notNULL
andtype
is contains“centroids”, a data frame with cell centroids in three columns: “x”, “y”, and “cell” -
“
segmentations
”: ifcoords
is notNULL
andtype
contains “centroids”, a data frame with cell segmentations in three columns: “x”, “y” and “cell” -
“
molecules
”: ifmolecules
is notNULL
, a data frame with molecule spatial coordinates in three columns: “x”, “y”, and “gene”
LoadHuBMAPCODEX
: A Seurat
object
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")
Note
This function requires the jsonlite package to be installed
Examples
## Not run:
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)
## End(Not run)