readVisiumHD | R Documentation |
This function reads Visium HD Space Ranger output into R.
readVisiumHD(
data_dir,
bin_size = c(2L, 8L, 16L),
sample_id = NULL,
type = c("HDF5", "sparse"),
data = c("filtered", "raw"),
images = c("lowres", "hires"),
unit = c("full_res_image_pixel", "micron"),
style = "W",
zero.policy = NULL,
row.names = c("id", "symbol"),
flip = c("geometry", "image"),
add_graph = FALSE,
rotate = FALSE
)
data_dir |
Directory |
bin_size |
One or more resolutions to load, must be 2, 8, or 16. Can be either integer or character. |
sample_id |
Which sample(s) in the SFE object to use for the graph. Can also be "all", which means this function will compute the graph for all samples independently. |
type |
Either "HDF5", and the matrix will be represented as
|
data |
character string specifying whether to read in filtered (spots mapped to tissue) or raw data (all spots). |
images |
character vector specifying which images to include.
Valid values are |
unit |
Whether to use pixels in full resolution image or microns as the unit. If using microns, then spacing between spots in pixels will be used to convert the coordinates into microns, as the spacing is known to be 100 microns. This is used to plot scale bar. |
style |
|
zero.policy |
default NULL, use global option value; if FALSE stop with error for any empty neighbour sets, if TRUE permit the weights list to be formed with zero-length weights vectors |
row.names |
String specifying whether to use Ensembl IDs ("ID") or gene symbols ("Symbol") as row names. If using symbols, the Ensembl ID will be appended to disambiguate in case the same symbol corresponds to multiple Ensembl IDs. |
flip |
Whether to flip the geometries or the images, because in
|
add_graph |
|
rotate |
Logical, whether to rotate the geometry, because usually the
grid of spots is slightly, but just very slightly, rotated from the perfect
horizontal line. The spots can be rotated so the square polygons are more
accurate, because for computational efficiency, |
An SFE object if 'length(bin_size) == 1L', otherwise a list of SFE
objects each element of which is for one bin size. They're not concatenated
since it might not make sense to perform joint analyses on the different
resolutions that benefit from having them in the same SFE object, unlike
different biological replica. Here unlike in
read10xVisiumSFE
, the centroids geometry is also added
because it will greatly facilitate plotting when there are many spots when
not zooming in. See the scattermore
argument in
plotSpatialFeature
.
#
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.