digitalcytometry / cytospace

CytoSPACE: Optimal mapping of scRNA-seq data to spatial transcriptomics data
Other
115 stars 19 forks source link

What's the reason of "Killed"? #72

Closed e-tomato closed 1 year ago

e-tomato commented 1 year ago

Hi,

I run with my ST and scRNA-seq data, I met the following error. Could you help to specify which step should I correct?

Thanks.

Read and validate data ... 100% |██████████████████████████████████████████████████| Reading data [done] Estimating cell type fractions 2023-04-07 18:29:14 Load ST data

2023-04-07 18:36:20 Load scRNA data Warning: Invalid name supplied, making object name syntactically valid. New object name is Cell.IDsCellType; see ?make.names for more details on syntax validity

2023-04-07 18:41:22 Integration Performing PCA on the provided reference using 2508 features as input. Projecting PCA Finding neighborhoods Finding anchors Found 9278 anchors Filtering anchors Retained 4232 anchors Finding integration vectors Finding integration vector weights 0% 10 20 30 40 50 60 70 80 90 100% [----|----|----|----|----|----|----|----|----|----| **| Predicting cell labels 100% |██████████████████████████████████████████████████| Reading data [done] Time to read and validate data: 900.85 seconds Estimating number of cells in each spot ... Time to estimate number of cells per spot: 10.18 seconds Down/up sample of scRNA-seq data according to estimated cell type fractions Time to down/up sample scRNA-seq data: 5.21 seconds Killed

hsjeon-k commented 1 year ago

Hi, thank you for the question.

The CytoSPACE run might be going out of memory due to the size of the input dataset. You can specify the subsampling flags -sss -nosss [number_of_cells_per_subset] -nop [number_of_cores], which will partition the ST data into smaller subsets and assign single cells to one subset at a time, reducing the memory requirement. You can reference the "Advanced options - Spot subsampling for parallelization" section of the documentation for further details, and #61 for a similar discussion.

Thank you, please let us know if this resolves the issue!

e-tomato commented 1 year ago

Thank you for your reply. I just tried again with your suggested parameters: -sss -nosss 1000 -nop 2 (or 5) it remains the same error.

When close to 'Killed' occuring, the mem used is 12G ( out of 16G), which means it doesn't reach to the limit of memeory. Don't understand how to solve this. What is the next step if not being killed?

There are about 10k cells in scRNA-seq data. I performed this in WSL2 Ubuntu 18.04.

Thank you in advance, Best,

hsjeon-k commented 1 year ago

Hi, thank you for the confirmation.

Killed I believe is a general message that can encompass a few different reasons for the process being killed, so the solution might be specific to your system configurations.

This is independent of CytoSPACE, but running dmesg -T | grep -i kill from the command line should give you some more information on why the process was killed (e.g., memory issues will give you lines about oom-kill and Out of memory: ...). I am on WSL2 (Ubuntu 22.04) and personally I have only seen the Killed message for CytoSPACE when running out of memory, so I am not sure which other reasons could lead to the error -- but please let us know what you see, and we can see if it can be resolved by an edit in our code.