You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scCustomize contains the conversion function `as.LIGER()`. This function has a few advantages over the conversion function `rliger::seuratToLiger()`.
73
-
74
-
-`as.liger` will *keep all meta data* and transfer it to LIGER by default.
75
-
- If a dimensionality reduction is transferred `as.liger` will also store a reduction key for use with scCustomize LIGER plotting functions to correctly set plot axes.
76
-
- If converting a list of Seurat objects and keeping Seurat variable genes then `as.liger` can either take union or intersection of genes between objects.
77
-
-`as.liger` has additional internal checks to ensure compatibility with both Seurat V3/4 & V5 object structures.
The liger/rliger package already contains a function `rliger::seuratToLiger()` to convert LIGER objects to Seurat Objects. However, during this transfer a few things have issues crop up:
94
-
95
-
* All meta data except the "dataset" column from liger_object\@cell.data is lost.
96
-
* Seurat dimensionality reduction is set to tSNE regardless of method used in LIGER analysis
97
-
* Seurat assay name not specified
98
-
99
-
As of scCustomize v2.1.0 converting to Seurat objects from Liger can be accomplished using `as.liger` function which functions identically to previous function `Liger_to_Seurat()`. `Liger_to_Seurat()` will continue to work until v2.2.0 at which point it will be completely deprecated.
100
-
101
-
scCustomize contains modified version of this function which extends the Seurat function [`as.Seurat()`](https://github.com/samuel-marsh/scCustomize/blob/develop/docs/reference/as.Seurat.html) that solves these issues with some extra parameters:
102
-
103
-
*`keep_meta` logical. Whether to keep meta data from the \@cell.data slot in LIGER object. Default is TRUE.
104
-
*`reduction_label` Name of dimensionality reduction technique used (e.g., tSNE, UMAP, etc). Ensures dim names are set correctly in Seurat object.
105
-
*`seurat_assay` Name of assay to use for data in Seurat object. Default is "RNA".
106
-
*`assay_type` Specify whether to create V3/4 vs V5 Seurat assays.
## Convert Seurat or LIGER objects to Anndata objects
114
73
scCustomize also allows for the conversion of Seurat or LIGER objects to python [anndata](https://anndata.readthedocs.io/en/latest/) objects for analysis in [scanpy](https://scanpy.readthedocs.io/en/stable/) or other compatible python packages via the function `as.anndata`. These functions were inspired/modified/updated from [sceasy R package](https://github.com/cellgeni/sceasy) (see `as.anndata` documentation).
0 commit comments