ShobiStassen / VIA

trajectory inference
https://pyvia.readthedocs.io/en/latest/
MIT License
76 stars 20 forks source link

IndexError: non-empty take from an empty axes #35

Closed Stefan-Stefan1 closed 9 months ago

Stefan-Stefan1 commented 1 year ago

Hey team, i was using your tool for several datasets but this error is new to me.

error_via

I normalized and log transformed the data. The umap result looked like this

grafik

ShobiStassen commented 1 year ago

Hi @Stefan-Stefan1 Stefan,

A couple of suggestions, it seems like the pruning level is potentially too high as Via is detecting two graph components - so unless this is expected, you can adjust the jac_std_global and dist_std_local to a value between 1.5-3 (3 should incur almost no pruning) and also the cluster_graph_pruning to 1.5-3. if you are indeed looking for multiple components then set preserve_disconnected_after_pruning = True when you initialize Via.

ShobiStassen commented 1 year ago

@Stefan-Stefan1 Hi Stefan,

a little correction to my comment: when you expect multiple major trajectories, then when you initialize via, set: preserve_disconnected = True (the default value is False as we dont usually expect multiple disconnected trajectories) and leave preserve_disconnected_after_pruning = False (which is its default and usually doesnt need to be changed). Though based on your umap I would suggest first changing the pruning levels of the graph to retain more connectivity, and leaving the preserve_disconnected = False (the default)