gao-lab / SLAT

Spatial-Linked Alignment Tool
https://slat.readthedocs.io/en/latest/
MIT License
71 stars 7 forks source link

`draw_lines` method now uses zip to iterate over the pairs of indices… #2

Closed ajinkya-kulkarni closed 1 year ago

ajinkya-kulkarni commented 1 year ago

… and corresponding coordinates simultaneously

xiachenrui commented 1 year ago

Hi Ajinkya, Thanks for your efforts ! Use zip() function in Python is a graceful solution.

for pair, slice0, slice1 in zip(matching.T, slices[0].T, slices[1].T):
    color = 'grey'
    ....

But I am afraid this is not suitable for this scene , becasue the matching , slices[0].T and slices[1].T do not have same order. In fact, their do not sorted in same way. So I use the variable pair as the bridge between slices[0].T and slices[1].T

You could find different results when you run the original version and modified version.

Let me know if you have any questions.

Best! Chen-Rui

ajinkya-kulkarni commented 1 year ago

Ahh ok, well in that case, lets stick to the original version!