Closed honghh2018 closed 6 months ago
You can set adata.obsm['X_umap'] to the array you have, given that the row order is conserved. Also creating a specific matrix is ok, say adata.obsm['X_seurat'], then use that as basis for all visualizations and calculations (e.g. scv.pl.scatter(adata, basis='seurat'…))
Very appreciate your reply @dawe. it was fine by me. But i confused the order of AnnData's obsm['X_umap'] 's barcode ,because of it was array without rownames, so how can i obtain the cell barcode that was identical with X_umap order. i want to save the X_umap coordinate with the cell barcode into csv file. how should i do for this condition. any advice would be appreciated Best, hanhuihong
Retrieve cell names in the Seurat object used to create the embedding, then simply reorder AnnData accordingly (adata = adata[cell_names]).
Hi @dawe , I follow your code and it work well, but the result showing weird, the scvelo arrow indicate the development direction just was in contrast to the monocle direction. In the other word, the scvelo's 'scv.pl.velocity_embedding_stream' showing terminal differentiation cells develop to original cells. this was incorrected logically. why the scvelo showed the inverted result contrast with monocle result. I guess what i make the cell order was wrong ? i follow your code-adata = adata[cell_names]- to order the cell , i wonder whether the code just sorted the cell barcode on annData.obs but the annData.X's matrix? why was the order runing so quickly that the matrix of annData not be sorted at the same time? Best, hanhuihong
Hi @honghh2018,
There are several cases where scvelo doesn't work as expected such as for blood, early development, etc. I would report this in the scvelo github repo, where you can get a more specific answer about this.
In the other word, the scvelo's 'scv.pl.velocity_embedding_stream' showing terminal differentiation cells develop to original cells. this was incorrected logically. why the scvelo showed the inverted result contrast with monocle result.
As @LuckyMD said, this is a question for scvelo
.
I guess what i make the cell order was wrong ?
The best way to check if ordering went wrong is to plot an embedding colored by some known grouping. If colors are all mixed up you know a mistake has done.
i wonder whether the code just sorted the cell barcode on annData.obs but the annData.X's matrix? why was the order runing so quickly that the matrix of annData not be sorted at the same time?
Luckily AnnData
is quite robust and it reorder any slot (obs
, obsp
, obsm
…) according to the specified cell names.
d
Hello @LuckyMD
There are several cases where scvelo doesn't work as expected such as for blood, early development, etc.
That's interesting! Do you have any resource supporting this? I'm asking as I'm using scvelo
a lot these days on a developmental model.
Hi @dawe,
@VolkerBergen is just writing a manuscript on this as it has been coming up a in scvelo issues. He will be able to explain a lot better, but I can try to give you an idea. For developmental datasets time scales of splicing kinetics and development don't really match up very well, so you often don't observe a fixed kinetic for a sufficient time to model it before it changes. Also, you may be observing multiple different kinetics e.g., in the blood.
Hi @honghh2018,
There are several cases where scvelo doesn't work as expected such as for blood, early development, etc. I would report this in the scvelo github repo, where you can get a more specific answer about this. Thanks the reply, this tools was great so far, but still had improve space on your reported. i hope this issue can be solved. Best, hanhuihong
In the other word, the scvelo's 'scv.pl.velocity_embedding_stream' showing terminal differentiation cells develop to original cells. this was incorrected logically. why the scvelo showed the inverted result contrast with monocle result.
As @LuckyMD said, this is a question for
scvelo
.I guess what i make the cell order was wrong ?
The best way to check if ordering went wrong is to plot an embedding colored by some known grouping. If colors are all mixed up you know a mistake has done.
i wonder whether the code just sorted the cell barcode on annData.obs but the annData.X's matrix? why was the order runing so quickly that the matrix of annData not be sorted at the same time?
Luckily
AnnData
is quite robust and it reorder any slot (obs
,obsp
,obsm
…) according to the specified cell names.d Thanks i would check currently, and reported the result as soon as possible. Best, hanhuihong
您好!已经收到邮件,祝好! 洪汉辉
Hi @ALL, I had the scVelo object of 'adata' to run the scv.tl.umap(adata) with different coordinate bewteen seurat's umap coordinate and the scVelo object's umap coordinate. So, i hope to visulize the umap plot using the seurat's umap coordinate. based on this request, i hope to substitute the scVelo's X_umap coordinate with seurat's umap coordinate. how can i do for above request? any advice would be appreciated. Best, hanhuihong