Skip to content

Commit 8dd9d44

Browse files
committed
fix vignette
1 parent 0255683 commit 8dd9d44

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

vignettes/articles/Object_Conversion.Rmd

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -68,47 +68,6 @@ pbmc$sample_id <- sample(c("sample1", "sample2", "sample3", "sample4", "sample5"
6868
```
6969

7070

71-
## Convert Seurat Objects to LIGER Objects
72-
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.
78-
79-
```{r message=TRUE}
80-
pbmc_liger <- as.LIGER(x = pbmc, group.by = "sample_id")
81-
82-
pbmc_liger
83-
```
84-
85-
Confirm that information from meta.data slot was transferred to LIGER object.
86-
```{r}
87-
head(colnames(x = [email protected]), 10)
88-
```
89-
90-
91-
92-
## Convert LIGER objects to Seurat Objects
93-
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.
107-
108-
```{r message=TRUE}
109-
new_seurat <- as.Seurat(x = pbmc_liger, reduction_label = "UMAP")
110-
```
111-
11271

11372
## Convert Seurat or LIGER objects to Anndata objects
11473
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

Comments
 (0)