STOmics / Stereopy

A toolkit of spatial transcriptomic analysis.
MIT License
184 stars 64 forks source link

Add a "Add selected area" button to PolySelect Interactive Spatial Scatter #194

Closed playgamemy closed 7 months ago

playgamemy commented 10 months ago

Currently when using the PolySelect Interactive Spatial Scatter plot to draw ROI, the only way to add selected area is by running the method add_selected_area() using code, which is very countertuitive.

Can we please add a button to the panel below the export button to execute the method instead?

playgamemy commented 10 months ago

Just checked the source code and confirmed, apparently the "export" button on click is calling the method add_selected_area(). I must have forgotten to first select the drawn ROI before pressing the button previously. Having said that, can we add a text field and use that as a key in order to store multiple ROI StereoExpData in selected_exp_data property instead? aka selected_exp_data is dictionary of StereoExpData instead of a single StereoExpData? It is not a very user-friendly solution at the moment when user need to extract multiple ROI (e.g. separate multiple samples mounted on one single chip), as they will need to o store the StereoExpData separately programmatically.

Zhenbin24 commented 8 months ago

Thank you very much for your suggestion, we will optimize it in the next version