View source: R/dimGeometries.R
rowGeometries | R Documentation |
rowGeometries
are geometries that corresponding to rows of the gene
count matrix, such as smFISH transcript spots. The txSpots()
function
is a convenience wrapper for transcript spots, although this entirely depends
on the rowGeometry
being named txSpots
.
rowGeometry(x, type = 1L, sample_id = 1L, withDimnames = TRUE)
rowGeometry(
x,
type = 1L,
sample_id = 1L,
withDimnames = TRUE,
partial = FALSE,
translate = TRUE
) <- value
rowGeometries(x, sample_id = "all", withDimnames = TRUE)
rowGeometries(
x,
sample_id = "all",
withDimnames = TRUE,
partial = FALSE,
translate = TRUE
) <- value
rowGeometryNames(x)
rowGeometryNames(x) <- value
txSpots(x, sample_id = 1L, withDimnames = TRUE)
txSpots(
x,
sample_id = 1L,
withDimnames = TRUE,
partial = FALSE,
translate = TRUE
) <- value
x |
A |
type |
An integer specifying the index or string specifying the name of the *Geometry to query or replace. If missing, then the first item in the *Geometries will be returned or replaced. |
sample_id |
Sample ID to get or set geometries. |
withDimnames |
Logical. If |
partial |
In setters, if a |
translate |
Logical. Only used if |
value |
Value to set. For |
When there are multiple samples in the SFE object, rowGeometries
for
each sample has the sample_id
appended to the name of the geometry.
For example, if the name is txSpots
and the sample ID is
sample01
, then the actual name of the rowGeometry
is
txSpots_sample01
. In the getter, one can still specify
rowGeometry(sfe, "txSpots", sample_id = "sample01")
.
Appending the sample_id
is unnecessary when there is only one sample,
but sample_id
will be appended when to SFE objects are combined with
cbind
. It is necessary to distinguish bewteen different samples
because they can have overlapping coordinate values.
[dimGeometries()], [colGeometries()]
library(SFEData)
library(RBioFormats)
fp <- tempdir()
dir_use <- XeniumOutput("v2", file_path = file.path(fp, "xenium_test"))
# RBioFormats issue
try(sfe <- readXenium(dir_use, add_molecules = TRUE))
sfe <- readXenium(dir_use, add_molecules = TRUE)
rowGeometries(sfe)
rowGeometryNames(sfe)
tx <- rowGeometry(sfe, "txSpots")
txSpots(sfe)
unlink(dir_use, recursive = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.