kstreet13 / slingshot

Functions for identifying and characterizing continuous developmental trajectories in single-cell data.
265 stars 43 forks source link

[Question] Is there any way to force a single trajectory/disable splitting? #253

Open yashuap opened 3 months ago

yashuap commented 3 months ago

We have a single cell time series data set (same cell type) that we're trying to get pseudotime for. We want it to have a single trajectory with no branching since the only variable factor is time. Is there any way to force a single trajectory/disable splitting?

Here is what the plot looks like right now (and also a plot with just the discrete timepoints). image

image

Thank you!

kstreet13 commented 3 months ago

Hi @yashuap ,

Yeah, that's definitely feasible! In situations like this, I think it's actually easiest to ignore the clustering step altogether. I know that Slingshot requires a set of cluster labels, but if you just provide a vector of 1s (ie. all cells belong to one cluster), then it will just draw a single curve.

The one problem with this approach is that the directionality may be reversed. If you want to control that, you could make one split, based on the timepoint information. We did something similar with a spatial trajectory here. In your case, it looks like you could make "clusters" representing timepoint 22 and then all the rest. That would still guarantee that you only get one lineage, while also allowing you to specify the correct starting point.

Best, Kelly

yashuap commented 2 months ago

Hi Kelly,

Thank you for your solution, it worked great! Unfortunately, we're running into another issue regarding another dataset. We used your suggestion to prevent splitting in this dataset, but the start point for the trajectory seems to be a ways off. Any suggestions as to how make the trajectory start where the majority of the 22hr samples are?

image

image

Best, Yash

kstreet13 commented 2 months ago

Hi @yashuap,

Unfortunately, I think the trajectory structure is just not very clear in this second dataset. If you ignore the timepoint labels, the this UMAP plot looks pretty much circular. The largest gap is in the upper right, between the two large groups of timepoint 28 cells, so that's where Slingshot put the start/end points. You might want to try different dimensionality reduction methods. In particular, we don't recommend running Slingshot on a UMAP embedding, as these are not always reproducible.

Best, Kelly