Open hfberg opened 5 years ago
Yeah, seems like SingleR.Combine isn't combining properly with all the different types of usage that I didn't expect... My best suggestion now is to dig into the code of that function to find the inconsistencies.
Try the following - create a new R file with the code of the function convertSingleR2Browser, and source this file. Now, rerun the procedure. This will allow identifying the exact line where this is failing.
Pval and cell.names are not used in the convertSingleR2Browser, so it is not the reason. I just fixed these issues, but pretty sure there is another issue that is still hidden from us.
Yes, I know I'm not supposed to use the program this way, but SingleR is VERY useful to us in it's ability to identify the cells. (We have a problem clustering because of very heterogeneous data). Anyway, I found out a way to work around the problem with convertSingleR2Browser, and now I can analyze ctrl and stim samples parallel in your browser. :):) I will have a look at your suggestion and update here, but this works fine for now! :)
What was your work around in covertSingleR2Browser? I'm getting the same rownames error without using SingleR.Combine. It seems to work fine when I use CreateSinglerSeuratObject but it throws me that error when I try to use CreateSinglerObject and pass it clusters from a Seurat object. I haven't figured out a different way to get the clustering I want...
Yeah, the problem is that SingleR.Combine doesn't rerun the analysis for clusters.
For now just do something like this:
singler$singler[[1]]$SingleR.clusters = NULL
singler$singler[[1]]$SingleR.clusters.main = NULL
singler$singler[[2]]$SingleR.clusters = NULL
singler$singler[[2]]$SingleR.clusters.main = NULL
Well drtrix90, I had kind of a different problem where I didn't care about the clusters (my data is too heterogenous to create clusters, that's why SingleR is such a good tool for me). Instead I wanted to compare two different samples in SingleRs differential expression function. Try Dvirs solutions, he knows this code waay better, and my solution is a bit tedious, I'm still new, but basically this is what I did:
Guess you can do the same if you only need the cluster annotations for DE. Create an annotations file with UMI and cluster, extract the DGE from your Seurat object and pass it back in to CreateSinglerSeuratObject with the cluster annotations.
Tell me if u need the code and I'll send it to you. Good luck!
Hi! I'm still trying to combine my different data sets in SingleR.Combine. That part works now, but convertSingleR2Browser is complaining. I updated SingleR since I saw someone post a similar issue here a couple of days ago, but I still got the same error message.
I noticed that in my SingleR.Combine object (called singler) some parts does not seem to have been combined properly.(?) For example in the screenshot below there is always 1464 cells, except for in pval where it's 708 values (the same number of cells as in singler_ctrl). "cell names" in SingleR.single.main also has a dodgy number, and so on. In the original singler_ctrl and singler_stim lists, these numbers are the same throughout the list. (708 and 756).
The full code I use if you need to look at it: SingleR.pdf