Spatial-eXpression-R: Cell type identification (including cell type mixtures) and cell type-specific differential expression for spatial transcriptomics
This PR includes a series of commits intended to reduce the computational time when running the algorithm in doublet mode. Mostly intended for high definition assays (big number of spots), but usable with all other methods.
Main changes:
1. Change parallelization approach
Use foreach + DoParallel for the multicore implementation. This prevents launching multiple R sessions and we also included a progress bar for a cleaner UI.
2. Speed up gather_results
Bottle neck in the algorithm. Fully vectorized the function to remove unnecessary loops. Added progress bar as well
3. General speed up
Modified existing functions to improve overall performance.
4. Add MIN_OBS as parameter to create.RCTD
Adds MIN_OBS as a variable to allow running in specific scenarios. Allows more control and customized running, but user should be aware of the drawbacks (i.e. sampling noise). Kept the original default value.
To do list:
[ ] Adapt new parallelization approach to other modes (full & multi)
[ ] Improve screen messages for easier progress tracking
This PR includes a series of commits intended to reduce the computational time when running the algorithm in doublet mode. Mostly intended for high definition assays (big number of spots), but usable with all other methods.
Main changes:
1. Change parallelization approach
2. Speed up gather_results
3. General speed up
4. Add MIN_OBS as parameter to create.RCTD
To do list: