R/convenience_stereoseq.r
createGiottoStereoSeqObjectCell.RdConvenience function to create a Giotto object from a Stereo-seq `outs` directory using cell bin (cellbin) expression data. Point `stereoseq_dir` directly at the `outs` directory produced by the SAW pipeline. For lower-level loading of individual pieces of data, see [importStereoSeq()].
createGiottoStereoSeqObjectCell(
stereoseq_dir,
gene_column = c("geneName", "geneID"),
negative_y = TRUE,
gef_type = c("adjusted_cellbin", "cellbin"),
load_expression = TRUE,
load_spatlocs = TRUE,
load_binpoints = FALSE,
load_image = TRUE,
load_polygons = TRUE,
load_mask = FALSE,
gef_path = NULL,
image_path = NULL,
mask_path = NULL,
instructions = NULL,
verbose = NULL
)filepath to the Stereo-seq `outs` directory.
character. Feature identifier column. One of `"geneName"` (default) or `"geneID"`.
logical. Map data to negative y spatial values (default `TRUE`). Origin is placed at the upper-left.
character. Which .gef to use, "adjusted_cellbin" (default) or "cellbin".
logical. Whether to load the expression matrix. Uses `Matrix::sparseMatrix()` directly from the gef triplet data for memory efficiency. Set to `FALSE` to skip.
logical. Whether to load spatial locations.
logical (default `FALSE`). Whether to also load a [giottoBinPoints-class] object — the most memory-efficient representation. Data stays as integer triplets + `SpatVector`; no matrix is created.
logical. Whether to load the H&E registered image.
logical. Whether to load the cell boundaries polygons.
logical (default `TRUE`). Whether to create cell polygons from the `*_HE_mask.tif` file in `stereoseq_dir/image/`. Uses [createGiottoPolygonsFromMask()] with `calc_centroids = TRUE`.
(optional) direct filepath to the `*.adjusted.cellbin.gef` file. Auto-detected from `stereoseq_dir` when not provided.
(optional) filepath or directory for the image. Auto-detected from `stereoseq_dir/image/` when not provided.
(optional) direct filepath to the `*_HE_mask.tif` file. Auto-detected from `stereoseq_dir/image/` when not provided.
giotto instructions to apply.
verbosity
giotto object
[importStereoSeq()] [createGiottoStereoSeqObjectBin()]
if (FALSE) {
g <- createGiottoStereoSeqObjectCell(
stereoseq_dir = "path/to/outs"
)
}