kstreet13 / slingshot

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

Can I use more than two dimensions as the input for Slingshot? #254

Open zczali4403 opened 2 months ago

zczali4403 commented 2 months ago

Hi,

Thank you for producing and maintaining this package; it gives me a good insight into lineage trending. I have a question: Can I use more than two dimensions as the input for Slingshot? For example, three-dimensional PCA results.

Best regards, Chengzhi Zhao

kstreet13 commented 1 month ago

Hi @zczali4403,

Yes, absolutely! Slingshot uses Euclidean distances between the points, so we wouldn't recommend going too high-dimensional, but you can certainly use more than 2 (we have often gone up to 20 PCs to see if we get consistent results across different numbers of dimensions).

Best, Kelly

zczali4403 commented 1 month ago

I tried to perform slingshot on a 3 dimensions input in the following way. However, there was no response after I executed 'plot3d.SlingshotDataSet', and no graphics were returned either.

sce <- slingshot(subset_rnaslot.sce, clusterLabels = 'Cell_type', reducedDim = 'GRAPHDR_XYZ',start.clus ="zygote") plot3d.SlingshotDataSet(SlingshotDataSet(sce), col = cell_colors, pch=16)

Can you help me? Thank you very much!

kstreet13 commented 1 month ago

Hm, this code looks correct, I'm not sure why it wouldn't be working. Can you provide the sessionInfo()?