seurat-wrappers icon indicating copy to clipboard operation
seurat-wrappers copied to clipboard

Loading RNA and integrated assays with as.cell_data_set()

Open LuciaJim opened this issue 4 years ago • 1 comments

Hello, I've installed SeuratWrappers 0.3.0 to covert a Seurat object into a Monocle CDS: monocle_CDS_RNA <- as.cell_data_set(x = seurat_object, assays = "RNA", default.reduction = "UMAP")

however it seems that the CDS is not adding the info coming from the Seurat object as monocle_CDS_RNA@clusters (among other categories) is empty. So when I run monocle_CDS_RNA <- learn_graph(monocle_CDS_RNA, use_partition = TRUE) it throws the following error: Error: No cell clusters for UMAP calculated. Please run cluster_cells with reduction_method = UMAP before running learn_graph.

Any help will be welcome! Thanks

LuciaJim avatar Nov 27 '20 18:11 LuciaJim

Hi! I've realized that I had not provided “monocle3_clusters” and “monocle3_partitions” info as it's explained in R Documentation: Clustering information is transferred over in the following manner: if cell-level metadata entries “monocle3_clusters” and “monocle3_partitions” exist, then these will be set as the clusters and partitions, with no nearest neighbor graph being added to the object; otherwise, Seurat's nearest-neighbor graph will be converted to an igraph object and added to the cell_data_set object along with Seurat's clusters. No partition information is added when using Seurat's clsuters

So now, when I run monocle_CDS_RNA <- learn_graph(monocle_CDS_RNA, use_partition = TRUE) it works fine.

In any case, is it possible to load more that one assay into the monocle_CDS@assays with SeuratWrappers 0.3.0? Thanks!

LuciaJim avatar Nov 28 '20 19:11 LuciaJim