Comments (4)
It might be a little easier to diagnose this issue if you showed a plot with the curves produced by Slingshot. But just from looking at this, I would say that cluster 4 appears to be fairly centrally located and well connected, so I can see why it would be difficult. If you really believe that cluster 4 should be an endpoint, you may want to use a higher dimensional embedding (eg. 10 PCs or 3D UMAP), as it can be hard to fully characterize 4 lineages in just two dimensions.
Best,
Kelly
from slingshot.
Thanks for your help, Kelly :)
I try to choose less variable gene in fastMNN intergate, and I get a little better result for me. (I am sorry the cluster number is not same as above, which may confuse you). And I am very sorry I can not reproduce same result as above.
You can see cluster 2(which is same as cluster 4 above) is less linked to other clusters but it still mixed some clusters.
And I am confused by the
a higher dimensional embedding (eg. 10 PCs or 3D UMAP), as it can be hard to fully characterize 4 lineages in just two dimensions.
Here is my whole code, I use fastMNN
in batchelor
to intergate data, and the then use the corrected
value to calcluate slingshot.
dec.sce <- modelGeneVar(mergeCell, block = mergeCell$batch)
mergeCell <- multiBatchNorm(mergeCell,batch = mergeCell$batch)
chosen.hvgs <- rownames(dec.sce)[dec.sce$bio > 0]
chosen.hvgs <- chosen.hvgs[!chosen.hvgs %in% protoplast_genes]
set.seed(20160806)
mnn.out <- fastMNN(mergeCell,
batch = mergeCell$batch,
merge.order = c("CIM0d", "CIM1d", "CIM3d", "CIM7d"),
subset.row = chosen.hvgs,
BSPARAM=BiocSingular::RandomParam())
set.seed(20160806)
mnn.out <- runUMAP(mnn.out,
dimred="corrected",
n_neighbors = 15)
clusters.mnn.50 <- clusterCells(mnn.out,
use.dimred="corrected",
BLUSPARAM=NNGraphParam(k = 50,
cluster.fun="louvain",
type="jaccard"))
colLabels(mnn.out) <- clusters.mnn.50
mnn_slingshot <- mnn.out
reducedDim(mnn_slingshot, "corrected") <- reducedDim(mnn_slingshot, "corrected")[, 1:49]
sce.sling <- slingshot(mnn_slingshot,
reducedDim='corrected',
cluster = colLabels(mnn.out),
start.clus = "1",
end.clus = c("7", "2", "8", "10"))
embedded <- slingCurves(embedCurves(sce.sling, "UMAP"))
gg <- plotUMAP(sce.sling,text_by = "label",
colour_by = "label", point_size = 0.5)
for (path in embedded) {
embedded <- data.frame(path$s[path$ord,])
gg <- gg + geom_path(data=embedded, aes(x=Dim.1, y=Dim.2), size=1.2)
}
from slingshot.
Oh ok, I think that's a very good pipeline, then (using MNN and running Slingshot on the corrected
coordinates). I thought you might be running Slingshot on the UMAP coordinates, which wouldn't be as appropriate. But using UMAP for visualization is fine.
Also, just to make sure, you said that you used the "less variable gene[s]", but your code uses hvg
, which is a common abbreviation for "highly variable genes". Generally speaking, you probably want the highly variable genes, not the less variable genes (which will be mostly zeros).
from slingshot.
Oh ok, I think that's a very good pipeline, then (using MNN and running Slingshot on the
corrected
coordinates). I thought you might be running Slingshot on the UMAP coordinates, which wouldn't be as appropriate. But using UMAP for visualization is fine.Also, just to make sure, you said that you used the "less variable gene[s]", but your code uses
hvg
, which is a common abbreviation for "highly variable genes". Generally speaking, you probably want the highly variable genes, not the less variable genes (which will be mostly zeros).
sorry, it is my mistake. I should say I use "fewer hvg"……
from slingshot.
Related Issues (20)
- Trajectories with multiple starting clusters HOT 7
- Installing Slingshot with R version 4.0.5 HOT 2
- trajectory bootstrapping and uncertainty HOT 3
- Slingshot pseudotime with CellRank HOT 8
- error when trying to overlay the lineage trajectory on umap HOT 2
- Slingshot curves look weird HOT 2
- Trajectory over condtions not ending in center HOT 1
- steps you have to take after slingshot HOT 1
- one question about psuedo time inference HOT 1
- pseudotime distribution is uneven when run slingshot on a subset of dimensionality reduction HOT 6
- What assay to use after Seurat integration HOT 2
- Error plotting the trajectory HOT 2
- Clustering discrepancy with Slingshot and Seurat HOT 5
- Error with SlingshotDataSet(): as(<dsCMatrix>, "dgCMatrix") is deprecated HOT 5
- Porting slingshot to Python HOT 4
- Calculating cell weights HOT 4
- Scale or not to scale the genes by their variance in real datasets HOT 2
- Running Multiple Times Results In Some Cells Not Plotting HOT 3
- How to plot the pseudotime for all lineages together in one UMAP plot? HOT 3
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 slingshot.