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
First of all, thank you for creating such a fantastic tool. I am using Monocle 2 to analyze some splenic data. I was able to convert the splenic data from a Seurat object to a CellDataSet object, however, during the estimateDispersions() step, I received the following warning:
Removing 13 outliers
Warning message:
glm.fit: algorithm did not converge
I wanted to check the dispersion data and plotted the dispersion data against mean expression. The resulting plot (shown below) looked completely incorrect.
Could you please help me understand what might be the issue? I have also attached my code below:
# load in packages
library(monocle)
library(Seurat)
library(dplyr)
library(igraph)
# load in data
load("/path/to/harmonized_spleen.RData")
# set default assay to RNA
DefaultAssay(harmonized_spleen) <- "RNA"
# set idents to Seurat clusters
Idents(harmonized_spleen) <- "seurat_clusters"
# set seurat clusters as monocle clusters
harmonized_spleen$clusters <- harmonized_spleen@active.ident
# add current ident to metadata in order to color Monocle graphs by cluster identity
Idents(harmonized_spleen) <- harmonized_spleen$clusters
# create a CDS Monocle object using count data
phenoData = new("AnnotatedDataFrame", data = harmonized_spleen@meta.data)
fData <- data.frame(gene_short_name = row.names(harmonized_spleen), row.names = row.names(harmonized_spleen))
fd <- new('AnnotatedDataFrame', data = fData)
data_monocle <- newCellDataSet(cellData = as.matrix(harmonized_spleen@assays$RNA@counts),
phenoData = phenoData,
featureData = fd)
# estimate size factors and dispersions
data_monocle <- estimateSizeFactors(data_monocle)
data_monocle <- estimateDispersions(data_monocle)
# check the dispersion data vs. mean expression plot
dispersion_data <- data_monocle@dispFitInfo$blind$disp_table$disp
mean_expression <- data_monocle@dispFitInfo$blind$disp_table$mu
plot(mean_expression, dispersion_data)
Please let me know if I need to provide any additional information. Thank you in advance for your help!
The text was updated successfully, but these errors were encountered:
Hi there,
First of all, thank you for creating such a fantastic tool. I am using Monocle 2 to analyze some splenic data. I was able to convert the splenic data from a Seurat object to a CellDataSet object, however, during the estimateDispersions() step, I received the following warning:
Removing 13 outliers
Warning message:
glm.fit: algorithm did not converge
I wanted to check the dispersion data and plotted the dispersion data against mean expression. The resulting plot (shown below) looked completely incorrect.
Could you please help me understand what might be the issue? I have also attached my code below:
Please let me know if I need to provide any additional information. Thank you in advance for your help!
The text was updated successfully, but these errors were encountered: