| ggml_extract | R Documentation |
Pulls an expression matrix out of a Seurat object, a
SingleCellExperiment, a sparse dgCMatrix or a plain
matrix, returning a dense numeric matrix with features in rows and
cells in columns — the layout the GPU engine expects. Optional
genes/cells subsetting happens before any sparse-to-dense
materialisation.
ggml_extract(x, assay = NULL, layer = "data", genes = NULL, cells = NULL, ...)
## S3 method for class 'matrix'
ggml_extract(x, assay = NULL, layer = "data", genes = NULL, cells = NULL, ...)
## S3 method for class 'dgCMatrix'
ggml_extract(
x,
assay = NULL,
layer = "data",
genes = NULL,
cells = NULL,
keep_sparse = FALSE,
...
)
## S3 method for class 'Seurat'
ggml_extract(
x,
assay = NULL,
layer = "data",
genes = NULL,
cells = NULL,
keep_sparse = FALSE,
...
)
## S3 method for class 'SingleCellExperiment'
ggml_extract(
x,
assay = NULL,
layer = "logcounts",
genes = NULL,
cells = NULL,
keep_sparse = FALSE,
...
)
x |
A |
assay |
Assay to read from. Seurat: defaults to the object's default assay. Ignored for bare matrices. |
layer |
Layer / slot to read. Seurat v5: a layer name (default
|
genes |
Optional character/integer vector selecting feature rows. |
cells |
Optional character/integer vector selecting cell columns. |
... |
Passed to methods. |
keep_sparse |
If |
For a SingleCellExperiment the layer argument names an
assay (default "logcounts", the log-normalised matrix); it is read
with SummarizedExperiment::assay().
A dense numeric matrix, features x cells.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.