Closed sopenaml closed 1 year ago
Hi Miriam,
Thanks for submitting and I appreciate you taking the time to look at some related issues. If I had to guess, I would say it's probably the small clusters that are causing issues (specifically, when Slingshot tries to calculate the distance between cluster 5 and cluster 14, there are only 6 cells present in what looks to be at least 10 dimensions, so it won't be able to use its standard method).
That said, I think you should be able to avoid this issue entirely. I actually wouldn't recommend subsetting the data before running tradeSeq, as tradeSeq is designed to work with (standard) Slingshot output. I'm also not sure why you are running Slingshot a second time on the subset data? Anyway, after you run Slingshot the first time, you should be able to go straight into running fitGAM
on the same SingleCellExperiment object.
Also, some minor points: I'm pretty sure as.SingleCellExperiment
automatically converts the reduced dimensional spaces. And you don't need to convert back to a Seurat object in order to subset (SingleCellExperiment objects can be subset just like matrices, so you could achieve the same thing with sce <- sce[, !is.na(sce$slingPseudotime_1)]
).
Let me know if I'm missing something or if you have any follow-up issues. Kelly
Closing due to lack of response. Feel free to re-open.
Had a similar problem with a subsetted Seurat object where some clusters had < 10 cells. Subsetted out clusters with 10 cells or less, then it worked
discard.pile<-Seur_obj@meta.data$seurat_clusters%>%
table() %>%
as.data.frame() %>%
dplyr::rename(.,Clust=.) %>% filter(Freq<10)
Discard<-discard.pile$Clust %>% as.character() %>% intersect(Idents(Seur_obj) %>% levels())
Seur_obj <-subset(Seur_obj, idents=Discard, invert=TRUE)
Hi, I'm running slingshot in a dataset with 95000 cells. When I subset my data into lineages to then run TradeSeq for each slingshot lineage. I run into a problem:
I have looked at previous issues https://github.com/kstreet13/slingshot/issues/35 and https://github.com/kstreet13/slingshot/issues/87 and using the code in the latter, I have checked if my clusters are highly linear, if I understood the thread properly, but that's not my case see example included for one cluster.![clusters](https://user-images.githubusercontent.com/26624217/221571914-1d43a733-90dd-4207-a841-82076096195c.png)
I have also tried to add
dist_clusters_diag
todist.fun
with no success.I have clusters with few cells or not cells at all: table(lin1@meta.data$seurat_clusters)
Do you think this is the problem, if so, should I subset my data on clusters belonging to one lineage or using the
Lineage
values generated by slingshot? Why would Lineage1 ( composed of cluster 0,2,9,1,4,7) have cells in other clusters? is this expected or do you think there's something wrong with my data? Apologies for a long thread and thank you for your time. Miriam