-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement bootstrapCluster for clusters generated in Seurat #75
Comments
If you write a function that accepts a log-normalized expression matrix (or a PC matrix, if Note that |
Thank you, I have written the following to extract the PC matrix from my Seurat object (named
How is Many thanks, |
Seems fine to me. As for the difference: there is none, other than the name change and movement to a new package. Just moved some functions out of scran because the package was getting a bit too cluttered. The new package and function should be available when BioC 3.12 comes out tomorrow. |
Great thanks. I tried the following, however I am getting strange results. I'm slightly confused as it seemed to be working yesterday!
data.use is a matrix with cell IDs as row names and PCs and column names. Any thoughts as to what might be happening here? Best wishes, |
Sorry, I just noticed this. Looks like you didn't set a seed, so that's probably why you got different results. I'm not quite sure why you got I should add that your matrix already looks pretty strange. It is pretty surprising to have low diagonal entries along with high off-diagonal entries. If you can give me a reproducible example, I can try to debug it. |
I think I got it: pairwiseRand(factor(sample(3, 100, replace=TRUE), levels=1:8), sample(3, 100, replace=TRUE))
## 1 2 3 4 5 6 7 8
## 1 0.005751586 0.03516088 0.002100879 NaN NaN NaN NaN NaN
## 2 NA 0.01338677 -0.037901716 NaN NaN NaN NaN NaN
## 3 NA NA -0.018066332 NaN NaN NaN NaN NaN
## 4 NA NA NA NaN NaN NaN NaN NaN
## 5 NA NA NA NA NaN NaN NaN NaN
## 6 NA NA NA NA NA NaN NaN NaN
## 7 NA NA NA NA NA NA NaN NaN
## 8 NA NA NA NA NA NA NA NaN Your clustering function may be returning unused levels - see how 11 is a level but is not used in the factor - causing the final matrix to have If this indeed the case, I'm guessing that Seurat is being a bit too smart for its own good when creating the cluster assignment. |
Hi,
I would like to establish the stability of the clusters that I have identified using Seurat (FindNeighbors and FindClusters). I was wondering how difficult it would be for me to reimplement the
bootstrapCluster
approach for this? Would the best way for this be to just write out a function that performs Seurat-like clustering on log normalised counts and then input this intobootstrapCluster
? Would I include the PCA function in there as well?Many thanks,
Lucy
The text was updated successfully, but these errors were encountered: