jianhong / cdQuPath

Codex downstream analysis with QuPath
https://jianhong.github.io/cdQuPath/
GNU General Public License v3.0
0 stars 0 forks source link

seu <- fitGMM(seu) has an issue #3

Open vijithaduke opened 2 months ago

vijithaduke commented 2 months ago

fitGMM isn't working and I'm getting this error: seu <- fitGMM(seu)

Error in getGlobalsAndPackages(expr, envir = envir, globals = globals) : The total size of the 26 globals exported for future expression (‘FUN(X = structure(c(45, 2, 7, 0, 4, 14, 4, 234, 6, 9, 15, 7,; 4, 5, 1, 22, 8, 21, 0, 0, 11, 37, 11, 29, 28, 3, 11, 0, 5, 29,; 4, 220, 12, 8, 26, 6, 5, 5, 4, 24, 8, 22, 0, 0, 10, 40, 11, 29,; 42, 3, 11, 0, 5, 29, 4, 220, 12, 8, 26, 6, 5, 5, 2, 24, 8, 22,; 0, 0, 10, 40, 11, 30, 32, 3, 11, 0, 5, 29, 4, 220, 12, 8, 26,; 6, 5, 5, 2, 24, 8, 22, 0, 0, 10, 40, 11, 30, 29, 3, 11, 0, 5,; ...; 22, 55, 3, 3, 0, 4, 11, 5, 185, 7, 7, 8, 5, 4, 4, 2, 17, 6, 16,; 0, 0, 8, 20, 11, 26, 20, 2, 8, 0, 3, 32, 4, 200, 5, 4, 14, 4,; 3, 2, 0, 7, 6, 20, 0, 0, 10, 63, 10, 24, 34, 1, 5, 0, 2, 14,’) is 1.08 GiB.. This exceeds the maximum allowed size of 500.00 MiB (option 'future.globals.maxSize'). The three largest globals are ‘FUN’ (1.08 GiB of class ‘function’), ‘fitdistr’ (66.83 KiB of class ‘function’) and ‘Mclust’ (16.33 KiB of class ‘function’)
Screenshot 2024-08-22 at 12 07 20 PM

Please help me to resolve this. Thank you!

jianhong commented 2 months ago

This is memory issue. Try to decrease the processors by

library(future.apply)
plan(multisession, workers=1)
seu <- fitMM(seu) 

If it does not work, share me the seurat object. I will try to decrease the memory cost by playing the big data.

vijithaduke commented 2 months ago

Got it. Thank you!