willtownes / nsf-paper

Nonnegative spatial factorization for multivariate count data
GNU Lesser General Public License v3.0
54 stars 11 forks source link

NSF on Multiple visium samples #9

Closed yeswzc closed 8 months ago

yeswzc commented 11 months ago

Hi, is there are way to perform NSF using merged visium data from multiple samples?

Thank you!

willtownes commented 11 months ago

There's probably a way to do it, but the current implementation was designed only for a single slice at a time and I haven't had time to make any updates. @luisdiaz1997 is this something you are working on?

tmchartrand commented 8 months ago

I'm not sure how relevant this is, but I've been running successfully using 3D coordinates across multiple sections of the same dataset. I would assume that even if your sections are completely different samples, you could artificially add a third dimension to space them sufficiently far apart as to not interact spatially. You'll need to skip the spatial normalization so it doesn't pull them back together, and perhaps some other minor tweaks to the preprocessing that I've forgotten. Normalizing by mean counts will likely also be important since detection efficiency tends to vary across samples (sz="mean").

yeswzc commented 8 months ago

I'm not sure how relevant this is, but I've been running successfully using 3D coordinates across multiple sections of the same dataset. I would assume that even if your sections are completely different samples, you could artificially add a third dimension to space them sufficiently far apart as to not interact spatially. You'll need to skip the spatial normalization so it doesn't pull them back together, and perhaps some other minor tweaks to the preprocessing that I've forgotten. Normalizing by mean counts will likely also be important since detection efficiency tends to vary across samples (sz="mean").

Thank you! I was thinking about this kind of method too because I saw somewhere else used similar strategy. I haven't trid yet.