In the previous version of Seurat, I was able to save the coordinates of tSNE plot by
write.csv([email protected], file = paste("tSNECoordinates",pc_num,"_",res,".csv",sep=""))
This does not work anymore. How can I save those coordinates to a .csv file. Thanks and regards
Hi,
You should rather use the following:
write.csv(seurat_mat@[email protected], file = paste("tSNECoordinates",pc_num,"_",res,".csv",sep=""))
Best,
Leon
thanks so much!
Also, since I found someone from Seurat, can I ask another question?
my data consists of 170,000 nuclei, and trying to figure out whether I have
enough sequencing depth to cluster these nuclei. I am trying different
min.genes cutoffs (200,500,700) and resolution (0.6-1), but cells dont
cluster well on tSNE plot (one huge cluster only). I used the same type of
cells before by sequencing 18000 nuclei and back then clusters were
seperated nicely. Probably this time sequencing depth wasnt good enough due
to the large number of cells. How should I determine whether I have enough
depth and using the right Seurat parameters?
best,
onur
On Thu, Nov 23, 2017 at 2:37 PM, leonfodoulian notifications@github.com
wrote:
Hi,
You should rather use the following:
write.csv(seurat_mat@dr[email protected], file =
paste("tSNECoordinates",pc_num,"_",res,".csv",sep="")).Best,
Leon—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/satijalab/seurat/issues/224#issuecomment-346687896,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AgXis4SNaM74dhdPwcqoZRr0kHvFmewvks5s5cl1gaJpZM4QpIFy
.
Hello Onur,
I am not from Seurat, only a user but willing to help. Regarding your min.genes cutoff, I would rather suggest to plot the number of expressed genes on a histogram, or use a violin plot, to look at its distribution in your data and then decide which cutoff to use. Cutoffs vary between datasets and are used to get rid of low quality cells (for cells having a very low number of expressed genes), and doublets (for cells having a very high number of expressed genes). Regarding the clustering resolution, you might consider increasing the resolution, since you've got a very high number of cells in your dataset. You can always over-cluster your data, and then merge those clusters that are not legitimate. You can use ValidateClusters() for this specific purpose (you can check the documentation of this function by running ?ValidateClusters() in R). Regarding the clusters themselves, do you see them as being intermingled on the tSNE plot, or separated from each other?
Best,
Leon
thanks so much for the response. They are quite intermingled. About the
number of expressed genes on a histogram, which command do you suggest?
the clusters are quite intermingled in the big data set. What is the range
of resolution? Increase to 1.0?
On Thu, Nov 23, 2017 at 3:10 PM, leonfodoulian notifications@github.com
wrote:
Hello Onur,
I am not from Seurat, only a user but willing to help. Regarding your
min.genes cutoff, I would rather suggest to plot the number of expressed
genes on a histogram, or use a violin plot, to look at its distribution in
your data and then decide which cutoff to use. Cutoffs vary between
datasets and are used to get rid of low quality cells (for cells having a
very low number of expressed genes), and doublets (for cells having a very
high number of expressed genes). Regarding the clustering resolution, you
might consider increasing the resolution, since you've got a very high
number of cells in your dataset. You can always over-cluster your data, and
then merge those clusters that are not legitimate. You can use
ValidateClusters() for this specific purpose (you can check the
documentation of this function by running ?ValidateClusters() in R).
Regarding the clusters themselves, do you see them as being intermingled on
the tSNE plot, or separated from each other?Best,
Leon—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/satijalab/seurat/issues/224#issuecomment-346691592,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AgXis8ROmzcYv3A0cU7HQ2GphjRmb-lpks5s5dE5gaJpZM4QpIFy
.
Hello Onur,
You can plot the density of the number of expressed genes using the following code:
plot(density([email protected]$nGene))
This should give you roughly an estimate of whether you've got rare cells that are very different from the majority of the remaining cells.
Alternatively, you can use VlnPlot(object = seurat_mat, features.plot = "nGene", group.by = "orig.ident") to look at the overall distribution in the number of expressed genes across all your cells. If you remove the group.by argument, and execute the code after FindClusters(), you can get a violin plot per cluster, and see whether some of your clusters are formed of cells that systematically have lower or higher number of expressed genes. Note that depending on cell type (e.g. neurons versus glia), the number of expressed genes can drastically change. So careful measures should be taken before discarding cells. Your advantage is that you've got a very high number of cells. So those cells that are of poor quality, or those that are doublets, should quickly show up in your data.
Regarding the resolution for the clustering, you can increase the value beyond 1. In the command list of the 33K PBMC dataset that you can find here, they increase their resolution value up to 4. Provided that there is no consensus on what value to use for the resolution of the clustering, I suggest that you explore your dataset, by over clustering, then merging non legitimate clusters using the ValidateClusters() function.
Hope this was helpful.
Best,
Leon
thanks so much, really appreciate. I will work on it soon
best,
onur
On Thu, Nov 23, 2017 at 5:42 PM, leonfodoulian notifications@github.com
wrote:
Hello Onur,
You can plot the density of the number of expressed genes using the
following code:
plot(density([email protected]$nGene))
This should give you roughly an estimate of whether you've got rare cells
that are very different from the majority of the remaining cells.Alternatively, you can use VlnPlot(object = seurat_mat, features.plot =
"nGene", group.by = "orig.ident") to look at the overall distribution in
the number of expressed genes across all your cells. If you remove the
group.by argument, and execute the code after FindClusters(), you can get
a violin plot per cluster, and see whether some of your clusters are formed
of cells that systematically have lower or higher number of expressed
genes. Note that depending on cell type (e.g. neurons versus glia), the
number of expressed genes can drastically change. So careful measures
should be taken before discarding cells. Your advantage is that you've got
a very high number of cells. So those cells that are of poor quality, or
those that are doublets, should quickly show up in your data.Regarding the resolution for the clustering, you can increase the value
beyond 1. In the command list of the 33K PBMC dataset that you can find
here http://satijalab.org/seurat/get_started.html, they increase their
resolution value up to 4. Provided that there is no consensus on what value
to use for the resolution of the clustering, I suggest that you explore
your dataset, by over clustering, then merging non legitimate clusters
using the ValidateClusters() function.Hope this was helpful.
Best,
Leon—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/satijalab/seurat/issues/224#issuecomment-346705818,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AgXis9F7fr71Ho-oBHii47awaNDiu0g1ks5s5fTvgaJpZM4QpIFy
.
I switched from Seurat version 2 to version 3. In version 2 I used the following script to save the tSNE or umap coordinates:
umapTable<-as.data.frame(seuratObj@[email protected], stringsAsFactors = F)
Where can I find this same information in a version 3 Seurat object?
Thanks!
You can use the Embeddings function to pull this information. E.g.
Embeddings(object = object[["umap"]])
You may also find this cheat sheet helpful for the transition.
For the record, as of v3.1.4, they are stored in seuratObj@reductions$umap.
Most helpful comment
You can use the
Embeddingsfunction to pull this information. E.g.You may also find this cheat sheet helpful for the transition.