| RunGGML.SingleCellExperiment | R Documentation |
High-level, Seurat-style entry point: extracts the expression matrix from the
object, runs the requested operation on the GGML backend (Vulkan GPU with CPU
fallback) and writes the result back into the object. Returns the updated
object, so it slots into a %>% / |> pipeline next to
Seurat::RunPCA(). Methods exist for Seurat and
SingleCellExperiment objects (and a .default for bare matrices).
## S3 method for class 'SingleCellExperiment'
RunGGML(
object,
op = "embed",
assay = NULL,
layer = NULL,
n_components = 50L,
reduction_name = "ggml",
device = "auto",
genes = NULL,
cells = NULL,
reduction = NULL,
dims = NULL,
...
)
RunGGML(
object,
op = "embed",
assay = NULL,
layer = NULL,
n_components = 50L,
reduction_name = "ggml",
device = "auto",
genes = NULL,
cells = NULL,
reduction = NULL,
dims = NULL,
...
)
## Default S3 method:
RunGGML(
object,
op = "embed",
assay = NULL,
layer = NULL,
n_components = 50L,
reduction_name = "ggml",
device = "auto",
genes = NULL,
cells = NULL,
...
)
## S3 method for class 'Seurat'
RunGGML(
object,
op = "embed",
assay = NULL,
layer = NULL,
n_components = 50L,
reduction_name = "ggml",
device = "auto",
genes = NULL,
cells = NULL,
reduction = NULL,
dims = NULL,
...
)
object |
A |
op |
Operation name; see |
assay |
Assay to read (Seurat); defaults to the object's default assay. |
layer |
Layer/slot to read; default |
n_components |
Number of components for |
reduction_name |
Name of the reduction slot to create. Default
|
device |
|
genes, cells |
Optional feature/cell subsets passed to extraction. |
reduction |
Optional name of an existing reduction to use as the input
feature space (e.g. |
dims |
Optional integer vector selecting columns of |
... |
Additional parameters forwarded to the engine. A notable one is
|
Supported operations include "embed" (PCA), "normalize",
"scale", "umap", "neighbors" and "largest_gene"
(per-cell highest-expressed gene QC metric); see
ggml_ops_registry.
For a Seurat object, the updated object with a new reduction. For a
bare matrix, a ggml_result.
## Not run:
library(Seurat)
pbmc <- RunGGML(pbmc, op = "embed", n_components = 30)
DimPlot(pbmc, reduction = "ggml")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.