Read and load in MERFISH data from Vizgen-formatted files
ReadVizgen(
data.dir,
transcripts = NULL,
spatial = NULL,
molecules = NULL,
type = "segmentations",
mol.type = "microns",
metadata = NULL,
filter = NA_character_,
z = 3L
)LoadVizgen(data.dir, fov, assay = "Vizgen", z = 3L)
ReadVizgen
: A list with some combination of the
following values:
“transcripts
”: a
sparse matrix with expression data; cells
are columns and features are rows
“segmentations
”: a data frame with cell polygon outlines in
three columns: “x”, “y”, and “cell”
“centroids
”: a data frame with cell centroid
coordinates in three columns: “x”, “y”, and “cell”
“boxes
”: a data frame with cell box outlines in three
columns: “x”, “y”, and “cell”
“microns
”: a data frame with molecule micron
coordinates in three columns: “x”, “y”, and “gene”
“pixels
”: a data frame with molecule pixel coordinates
in three columns: “x”, “y”, and “gene”
“metadata
”: a data frame with the cell-level metadata
requested by metadata
LoadVizgen
: A Seurat
object
Path to the directory with Vizgen MERFISH files; requires at least one of the following files present:
“cell_by_gene.csv
”: used for reading count matrix
“cell_metadata.csv
”: used for reading cell spatial
coordinate matrices
“detected_transcripts.csv
”: used for reading molecule
spatial coordinate matrices
Optional file path for counts matrix; pass NA
to
suppress reading counts matrix
Optional file path for spatial metadata; pass NA
to
suppress reading spatial coordinates. If spatial
is provided and
type
is “segmentations”, uses dirname(spatial)
instead of
data.dir
to find HDF5 files
Optional file path for molecule coordinates file; pass
NA
to suppress reading spatial molecule information
Type of cell spatial coordinate matrices to read; choose one or more of:
“segmentations”: cell segmentation vertices; requires
hdf5r to be
installed and requires a directory “cell_boundaries
” within
data.dir
. Within “cell_boundaries
”, there must be
one or more HDF5 file named “feature_data_##.hdf5
”
“centroids”: cell centroids in micron coordinate space
“boxes”: cell box outlines in micron coordinate space
Type of molecule spatial coordinate matrices to read; choose one or more of:
“pixels”: molecule coordinates in pixel space
“microns”: molecule coordinates in micron space
Type of available metadata to read; choose zero or more of:
“volume”: estimated cell volume
“fov”: cell's fov
A character to filter molecules by, pass NA
to skip
molecule filtering
Z-index to load; must be between 0 and 6, inclusive
Name to store FOV as
Name to store expression matrix as
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")
This function uses
future to enable
parallelization. Parallelization strategies can be set using
plan
. Common plans include “sequential
”
for non-parallelized processing or “multisession
” for parallel
evaluation using multiple R sessions; for other plans, see the
“Implemented evaluation strategies” section of
?future::plan
. For a more thorough introduction
to future, see
vignette("future-1-overview")