Comments (6)
Hi, @CodeInTheSkies ,
I managed to use my own UMAP projection in SeuratWrapper by using the function CreateDimReducObject(). You would need to set a matrix to store your projection and then assign it to the seurat object in use.
Here is what I did to project the UMAP coordinates and this should be done before you run velocity.
load("SAMPLE_UMAP.Robj")
numap <- as.matrix(umap.data[,1:2])
rownames(numap) <- rownames(bm@reductions[["umap"]]@cell.embeddings[,1:2])
colnames(numap) <- paste0("UMAP_", 1:2)
bm@reductions[["numap"]] <- CreateDimReducObject(embeddings = numap, key = "UMAP_", assay = DefaultAssay(bm))
from seurat-wrappers.
Thank you very much, @SUN-Changyu , for your response, and the code. Appreciate it!
Just for your information, and also for any others who may be having the same question, I found this thread #9 and ended up using the suggestion therein, to manually add the "spliced", "unspliced", and the "ambiguous" assays one by one to my existing Seurat object containing my pre-calculated tSNE embeddings. After that, simply following the rest of the steps did the trick in my case to draw velocity arrows on my existing tSNE.
Particular reference to @mojaveazure 's and @CoderMatthias 's suggestions in #9.
Special kudos to the SeuratWrappers
team (@mojaveazure , @satijalab )!!! Thanks to their efforts integrating RNA velocity into the Seurat framework, it has become much easier to run RNA velocity. Before that, it was a struggle, at least for me!
from seurat-wrappers.
Hi Changyu,
I'm confused about what you're trying to accomplish. For RunVelocity
, you can specify a reduction to use with the reduction
parameter for calculating the embedding distance matrix (see the docs for RunVelocity
). We do not provide a wrapper for visualization. Instead, we use velocyto.R's show.velocity.on.embedding.cor
function, for which you can simply pass the embeddings matrix of a dimensional reduction to use for visualization (see our vignette for more details).
from seurat-wrappers.
Hi, Paul,
I've already figured out how to do it! Thanks so much for the quick response.
What I wanted to do is to add a UMAP projections I generated earlier using Seurat to the Seurat object converted by SeuratWrappers from loom file. And to do so, I need to rename the column and row names of the embedding matrix and use CreateDimReducObject() to create a new reduction for the Seurat object. Problem solved. Thanks!
from seurat-wrappers.
Hi @SUN-Changyu ,
This is the exact problem I am facing now, and would appreciate some more clarification as to how you went about finding a solution!
So, if I do this first from the loom file,
ldat <- ReadVelocity(file="a.loom")
bm <- as.Seurat(x = ldat)
then my bm
object would have three assays, namely, "spliced" "unspliced" and "ambiguous".
Now, if I have another Seurat V2 object, which has the TSNE embeddings from earlier, then I first do
new_pbmc=UpdateSeuratObject(object = pbmc)
I also then do some steps to make sure the cell names for both bm
and new_pbmc
exactly match.
Can you please let me know what exactly is needed after this step to plot velocity projections onto the old TSNE embeddings?
Thanks a lot for your response!
from seurat-wrappers.
Hi, I run the velocyto using Seurat successfully on my dropest martices. Now, I found there are many doublets in my single-cell data. I want to filter these cells and again run the velocyto to avoid the noise.
Initially I have dropest matrices with 4000 cells and I want to filter 2000 cells.
from seurat-wrappers.
Related Issues (20)
- May I ask the author if there is a way for me to get wrappers that support seruat4? HOT 5
- Not able to convert loom to seurat HOT 5
- FastMNNIntegration not using "sketch" assay but "RNA" assay
- Learn_graph error Error: colnames(cds)!=names(cds@clusters[[reduction_method]]$partitions)
- Velocyto- Seurat - invalid class “LogMap” object: Duplicate rownames not allowed HOT 4
- Seurat-wrappers intsallation failure HOT 4
- Bug report(?) of adding support to v5
- negative extents to matrix
- Installing in a Conda environment
- past versions of seurat-wrappers that fits seurat v4 HOT 4
- Warning in install.packages :package ‘SeuratWrappers’ is not available for this version of R HOT 1
- Temporary Files
- Alra not using Scaled data
- Error converting Seurat object to cell_data_set, bug fix no longer exists HOT 1
- IntegrateLayers using FastMNN gives error: 'batch' must be specified if '...' has only one object HOT 2
- Error in .subscript.2ary(x, i, j, drop = TRUE) : subscript out of bounds
- The batch argument for FastMNNIntegration via IntegrateLayers is non-functional
- Warning: Layer counts isn't present in the assay object; returning NULL
- Error: No feature overlap between existing object and new layer data HOT 1
- Unable to open HDF5 file.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from seurat-wrappers.