JEFworks-Lab / MERINGUE

characterizing spatial gene expression heterogeneity in spatially resolved single-cell transcriptomics data with nonuniform cellular densities
https://jef.works/MERINGUE
GNU General Public License v3.0
56 stars 5 forks source link

Parralel Computing #2 #17

Open Acaro12 opened 1 year ago

Acaro12 commented 1 year ago

Dear JEFworks team,

Thank you very much for the great package.

As described in https://github.com/JEFworks-Lab/MERINGUE/issues/15 , the first part of the pipeline to detect spatial patterns can be parallelized. Since the downstream steps such as filterSpatialPatterns and spatialCrossCorMatrix do not work genewise, I expect the mentioned block-wise processing of gene groups cannot be applied here. Could you think of another way to parallelize these downstream steps? I am currently working on a dataset with ~25.000 spots and 7.000 genes.

Thank you in advance, Best,

Christoph

bmill3r commented 1 year ago

Hi Christoph,

Thanks so much for your interest in MERINGUE and for your question! I apologize for the delay in response and just wanted to let you know that we are thinking about it.

Actually, I believe that filterSpatialPatterns() should work gene wise as it is filtering for genes whose expression is driven by less than x% of cells (5% by default) so in that case the genes should be able to be subsetted in a similar fashion as #15.

However, with respect to spatialCrossCorMatrix(), each gene is compared to every other gene and so this might take more creative thinking. That said, I imagine many users would apply spatialCrossCorMatrix() to only the significant genes that also passed the LISA threshold in filterSpatialPatterns(). So perhaps the final list of significant genes here will be substantially smaller than the initial list of 7,000.

Hope this helps for now and will get back to you after we think about this a little deeper.

Thanks again, Brendan