as.ligerDataset.ligerDataset | R Documentation |
Works for converting a matrix or container object to a single ligerDataset,
and can also convert the modality preset of a ligerDataset. When used with
a dense matrix object, it automatically converts the matrix to sparse form
(dgCMatrix-class
). When used with container objects
such as Seurat or SingleCellExperiment, it is highly recommended that the
object contains only one dataset/sample which is going to be integrated with
LIGER. For multi-sample objects, please use as.liger
with
dataset source variable specified.
## S3 method for class 'ligerDataset'
as.ligerDataset(
object,
modal = c("default", "rna", "atac", "spatial", "meth"),
...
)
## Default S3 method:
as.ligerDataset(
object,
modal = c("default", "rna", "atac", "spatial", "meth"),
...
)
## S3 method for class 'matrix'
as.ligerDataset(
object,
modal = c("default", "rna", "atac", "spatial", "meth"),
...
)
## S3 method for class 'Seurat'
as.ligerDataset(
object,
modal = c("default", "rna", "atac", "spatial", "meth"),
assay = NULL,
...
)
## S3 method for class 'SingleCellExperiment'
as.ligerDataset(
object,
modal = c("default", "rna", "atac", "spatial", "meth"),
...
)
as.ligerDataset(object, ...)
object |
Object. |
modal |
Modality setting for each dataset. Choose from |
... |
Additional arguments passed to |
assay |
Name of assay to use. Default |
a liger object.
ctrl <- dataset(pbmc, "ctrl")
ctrl
# Convert the modality preset
as.ligerDataset(ctrl, modal = "atac")
rawCounts <- rawData(ctrl)
class(rawCounts)
as.ligerDataset(rawCounts)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.