kstreet13 / slingshot

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

Increase the number of branching points #215

Closed astrid12345 closed 1 year ago

astrid12345 commented 1 year ago

Hi Kelly,

I'm working with your tool with the aim to compare the trajectory computed by monocle3 and slingshot. In general, both trajectories seem to correspond quite nicely. The main difference standing out is that monocle3 creates more end nodes and branching points, while slingshot create two very smooth curves. As my data is quite complex, I benefited from having this detail in the monocle3 trajectory.

I was wondering if you have any recommendation to increase the number of branching points in slingshot? I thought about forcing multiple end points with end.clus and see if i get the same branching points as in monocle3, but it seems like a very biased way to do analysis. Is there a parameter in slingshot I could change to get a more "branched" structure?

Thank you!

kstreet13 commented 1 year ago

Hi @astrid12345,

That's a very good question! You're right that there isn't a Slingshot parameter that directly adjusts this, but you can generally get higher complexity or more branching points by adjusting the cluster labels used by Slingshot. More clusters will lead to more opportunities for branching points, so generally more complex trajectories. For example, if your input clusters were generated by k-means or Louvain clustering, you could try increasing the k or resolution parameters, respectively. Separately, and this might not make much of a difference, but it might be worth switching the distance metric (dist.method) to mnn, so that connections between clusters are based on cells in close proximity rather than overall shape.

Best, Kelly

astrid12345 commented 1 year ago

Thank you! Those are very helpful suggestions! I will give it a go.