Giotto import functionalities for Stereo-seq datasets. This function generates a `StereoSeqReader` instance with convenient reader functions for loading individual pieces of Stereo-seq data into Giotto-compatible representations when the param `stereoseq_dir` is provided. A function that creates the full `giotto` object is also available. These functions should have all param values provided as defaults, but can be flexibly modified to look in alternative directories or paths.
filepath to the Stereo-seq `outs` directory.
character. One of `"bin"` (square bin, default) or `"cell"` (cell bin / cellbin).
character. Bin size level to load when `type = "bin"`. One of `"bin1"`, `"bin5"`, `"bin10"`, `"bin20"`, `"bin50"`, `"bin100"`, `"bin150"`, `"bin200"`. Default is `"bin100"`. List available bins in your sample with `rhdf5::h5ls("path/to/*.tissue.gef")`.
character. Which column to use as feature identifiers. One of `"geneName"` (default) or `"geneID"`.
logical. Map data to negative y spatial values (default `TRUE`). Origin is placed at the upper-left instead of lower-left.
`StereoSeqReader`
additional params to pass
`StereoSeqReader` object
Loading functions are generated after `stereoseq_dir` is set.
if (FALSE) { # \dontrun{
# Create a StereoSeqReader
reader <- importStereoSeq(
stereoseq_dir = "path/to/outs",
type = "bin",
bin_size = "bin100"
)
# Load expression or spatial locations individually
expr <- reader$load_expression()
sl <- reader$load_spatlocs()
img <- reader$load_image()
# Create a full giotto object
g <- reader$create_gobject()
# Change bin size and recreate
reader$bin_size <- "bin50"
g <- reader$create_gobject()
} # }