Comments (6)
Hi @pariaaliour,
I think this should be fine, yes. It might take a few minutes to run, but it shouldn't be an unreasonable amount of time. I haven't heard this recommendation before, so I'm a little curious about that. But in general, thanks to the approx_points
argument introduced by princurve
and added to slingshot
around version 1.5.0, both packages can handle very large numbers of cells. The only potential concern would be the number of lineages, since each cell needs to be projected onto each lineage. But if this is less than 10 (which is already a pretty large number of lineages), I don't think it should be too inconvenient.
Best,
Kelly
from slingshot.
Thanks for your quick response @kstreet13!
I did use approx_points argument this time. However, when I run Slingshot as below my umap plot is cyclic and the orientation of my cell type is not as expected. I was wondering how should I interpret this or if you think I did sth wrong how I can improve. Also, In this publication: [(https://www.biorxiv.org/content/10.1101/2021.12.22.473434v1.full#sec-19] I read that when there is a cyclic shape in clusters Slingshot cannot accurately model it. Could this wrong orientation be because of this issue?
#subset the OPC and OL clusters
OL_clusters <- c("0", "1", "4", "6", "7", "12", "15", "18", "11", "14", "25", "29")
OL_data <- subset(seurat_integrated, seurat_clusters %in% OL_clusters)
OL_data <- RenameIdents(OL_data, "0" = "Olig6", "1" = "Olig3", "4" = "Olig5", "6" = "Olig4", "7" = "Olig2", "11" = "OPC1", "12" = "Olig1", "14" = "OPC2", "15" = "Olig7", "18" = "Olig8", "25" = "OPC3", "29" = "COPC")
#re_run UMAP
OL_data <- RunUMAP(OL_data, reduction = "pca", dims = 1:20, reduction.name = "OL_UMAP", min.dist=0.1, spread = 5, n.neighbors = 100)
#convert the seurat SingleCellExperiment object
sce_OL <- as.SingleCellExperiment(OL_data)
#perform slingshot trajectory analysis
sce_OL <- slingshot(sce_OL, reducedDim = "PCA", extend = "n",
clusterLabels = colData(sce_OL)$cluster_id,
start.clus = "OPC1",
approx_points = 150)
Here is my map plotter running Slingshot (I expected the red cluster, OPC, on the left hand side not right hand side)
Many thanks,
Paria
from slingshot.
Hi @pariaaliour,
I have a few thoughts as to what might be going on here. For starters, you are correct that Slingshot cannot handle cyclic trajectories (things like cell cycle stage), so if you believe that is the correct model for your data, you might need to use a different tool. Based on the UMAP plot alone, I wouldn't say this looks cyclical, but UMAP plots can be deceiving.
Anyway, the fact that there are four lineages here suggests that there is probably an issue with the underlying MST, which is based on the clustering. Weird, short, and/or overlapping lineages like this are often a result of over-clustering leading to spurious branching events. I would suggest revisiting the clusters that you use as input for Slingshot and perhaps merging some of them or adjusting some parameters.
Best,
Kelly
from slingshot.
Thanks @kstreet13 for your explanation.
I think you are right. So, I did recluster my oligodendrocyte dataset and run the Slingshot and it makes sense now:
I have some questions regarding this plot.
First, as this plot shows it is one lineage but how come I have slingPseudotime_1, slingPseudotime_2, and slingPseudotime_3? I think there might be sth I don't know (I should mention it here that the imbalance score plot of this dataset shows more imbalance spot rather than balanced one. could it be because there could not be a global lineage for both condition? but it still does not show in this plot).
Second, running Slingshot does not output cellWeights. I need this value to select the number of knots.
Third, I was wondering if you could share the code to visualize density estimates for the two groups across pseudo time.
Many thanks,
Paria
from slingshot.
Hi @pariaaliour,
Glad you got it working! Regarding your first question, I'm guessing this is an artifact of re-running slingshot on the same SCE object. If you ran it once and got three lineages, it will produce 3 variables, up to slingPseudotime_3
, in the colData
. When you run it again, it will overwrite slingPseudotime_1
, but it won't delete the other two. These are created for convenience, but the most stable way to access the pseudotime values is with the slingPseudotime()
function.
Similarly, for question 2, you can get the cell weights with slingCurveWeights()
, though this should just be a vector of 1s, given that you now only have a single lineage.
And there's some code for the density estimate plots in the condiments
vignette as well as our BioC 2022 workshop.
Hope this helps!
Kelly
from slingshot.
Thank you so much Kelly for clarification. You were right and these different slingPseudotime_1:3 was because I applied Slingshot more than one time on sce object.
Paria
from slingshot.
Related Issues (20)
- Is there any way that I could fit the NB-GAM for all the gene in my large dataset? HOT 1
- getCurves() Missing values HOT 8
- Curves and lineages HOT 3
- Error in igraph::shortest_paths(tree, from = l, to = ends, mode = "out", : At core/paths/dijkstra.c:360 : Weight vector must not contain NaN values, Invalid value HOT 3
- Average curve weights and Pseudotime HOT 1
- slingshot analysis on PCA but visualization on UMAP HOT 3
- how to analyze with 3 different treatments HOT 4
- how to calclate the POS to compare other algorithm? HOT 2
- Pulling and plotting Differential pseudotime data across different conditions/metadata slots HOT 1
- `embedCurves` should also map MST into new space HOT 1
- Slingshot followed by CellRank HOT 1
- is slingshot using only the variable genes? HOT 2
- Pick one lineage from many for conditiontest HOT 3
- How do I extract feature_info in my rds file? HOT 4
- What does a curve represent biologically? HOT 7
- Overlapping curve issue - change to code needed? HOT 3
- Removing a lineage from a `PseudotimeOrdering` object? HOT 3
- Error in graph.adjacency.dense: Adjacency matrix should be symmetric to produce an undirected graph. Invalid value HOT 5
- pseudotime in two lineage? HOT 2
- Slingshot error HOT 1
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.