STOmics / Stereopy

A toolkit of spatial transcriptomic analysis.
MIT License
180 stars 59 forks source link

"High Resolution Matrix Export" is not selecting regions of interest #223

Closed bmill3r closed 6 months ago

bmill3r commented 7 months ago

Hello,

I am trying to select a specific region of a stereo-seq dataset using the instructions here: https://stereopy.readthedocs.io/en/latest/Tutorials/High_Resolution_Export.html

If I do:

ins = tissue_bin50_a2.plt.interact_spatial_scatter(width=500, height=500, poly_select=False)

and then use the lasso selection, the shaded lasso region appears, but then after dragging it over my region of interest and releasing my left mouse button, the region disappears and nothing happens. In contrast, in the tutorial GIF, the lasso region seems to remain while the rest of the dataset disapears but this does not happen for me.

I have also tried:

ins = tissue_bin50_a2.plt.interact_spatial_scatter(width=500, height=500, poly_select=True)

Here, I can select my region of interest using the PolyAnnotator Tool and I get the polygon coordinates after clicking the shaded region. I then try:

ins.add_selected_area()

But when I try to export the high resolution selected region, I get a message that says:

processing selected 1 area
selections not found, please choose a selection area

See the attached screenshot Screenshot 2023-12-11 at 5 50 25 PM

It seems like the polygon coordinates are not ending up in the ins object I created. I even have tried clicking the "export" button but nothing happens.

What am I doing wrong?

Zhenbin24 commented 7 months ago

Hello, I have not found your problem here yet. What version do you have? If it is not the latest version, please upgrade to the latest version and try.

bmill3r commented 7 months ago

Hi @Zhenbin24

I am using stereopy 0.12.1 installed via pypi. I can try updating the version and see if that helps.

Thanks, Brendan

bmill3r commented 7 months ago

I just updated to version 1.0.0.

Now, when I do:

ins = tissue_bin50_a2.plt.interact_spatial_scatter(width=500, height=500, poly_select=True)

I create the polygon, select it, see the polygon coordinates appear. But then when I do:

ins.add_selected_area()

I get an Exception error: The selected area's data cannot be empty

Any idea why it isn't working?

Thanks, Brendan

Zhenbin24 commented 7 months ago

Hello, you can refer to this reply to see if the steps you performed are correct. I tried it here, if done correctly there will be no problem