Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Destripe VisiumHD #215

Open
NadineBestard opened this issue Feb 18, 2025 · 3 comments
Open

Destripe VisiumHD #215

NadineBestard opened this issue Feb 18, 2025 · 3 comments

Comments

@NadineBestard
Copy link

I am starting to look into options to analyse a VisiumHD dataset. I am really excited to see that Sopa supports this technology now.
I was testing before the bin2cell workflow, and something that got my attention is that in that workflow there is a "destriping" step. I paste its functionality below:

"Visium HD suffers from variable bin sizing. When printing the chips, the 2um bins have some variability in their width/height. Inspecting the total counts per spot reveals a characteristic striped appearance, with some rows/columns capturing visibly fewer transcripts than others.
To overcome this, b2c.destripe() identifies a user-specified quantile (by default 0.99) of total counts for each row, then divides the counts of the spots in that row by that value. This procedure is then repeated for the columns. .obs[adjusted_counts_key] (by default "n_counts_adjusted") is obtained by multiplying the resulting per-spot factor by the global quantile of count totals, and the count matrix is by default rescaled to match it."

This seemed an interesting correction and I was wondering if it would be possible to implement something similar with the SpacialData object used in Sopa?

@quentinblampey
Copy link
Collaborator

quentinblampey commented Feb 19, 2025

Hi @NadineBestard, thanks for sharing this! Do you know if this "striping issue" happens only on the 2-microns bins or also on the 8-microns bins?

If it happens only of the 2-microns, then I imagine that this "destriping" operation wouldn't change much, as one cell contains multiple 2-microns bins from various columns and rows (i.e., if one row has more counts, it gets canceled by the other rows having fewer counts when aggregating the bins inside one cell). But, if the issue also happens at a higher level, then it means it really needs to be corrected.

I'll keep this in mind and have a deeper look one day, and see whether it is important or not.
Meanwhile, could you let me know if you see a huge difference with/without applying this "destriping" operation from bin2cell?
And, do you have any other feedback regarding the Sopa usage on Visium HD? It's still relatively new, so I would appreciate feedback!

@NadineBestard
Copy link
Author

Hi! I tested the stripping effect at 8um and it is not there.

Image

See the same tissue (not exactly the same ROI, as the scale was different, but similar area) before and after destriping at 2um

Image

It is hard to say other than with this subjective visual outcome how much effect does the correction have downstream, once the spots are are binned into cells. Maybe bin2cell developer noticed some differences when they implemented the function in their package?

@quentinblampey
Copy link
Collaborator

Hi @NadineBestard, thanks for the plots! Indeed, I don't see any striping effect on the 8um bins either.

In their paper, they only provide a supplementary figure (the same as yours) to show the visual impact of de-striping, but they don't discuss whether it impacts the quality at the single-cell level after aggregating the bins.

As mentioned above, my naive opinion on this is that it would not really impact the downstream analysis because for each cell we will aggregate between 10 and 80 neighbor bins, and not just one row/column. Since there is no experiment in their paper about this, I don't feel very comfortable adding this feature, mostly knowing that it could probably introduce bias (since it artificially scales each row/column).

Yet, it could still be interesting for visualization. Do you often visualize the 2um bins directly, or is it enough to visualize the cells themselves (as we do in Sopa) or even the 8um bins?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants