Dead kernel when computing neighbours
See original GitHub issueGood day,
I am having a problem running scVelo
. I am doing all the preprocessing steps in Seurat
(integrated two different samples), and then, I exported the loom file and read it into scVelo
successfully. Then I combined the loom files obtained after running velocyto
into one using loompy.combine
. I can merge both objects using scv.utils.merge
without losing any cells, and the AnnData
object seems ok to me (I am new using python for single-cell RNA processing so that I may be wrong). However, the problem comes when I want to run scv.tl.velocity
. The command will start the normalization, but once it starts to compute the neighbors, it kills the kernel.
I am working on an HPC and have tried increasing the number of cores and memory (12 cores and 256GB), thinking that that could be the problem, but still, the problem occurs again. the dataset is not huge (AnnData object with n_obs × n_vars = 14542 × 17586
), so I do not have any clue where the problem is. I have run the pipeline with non-merged samples, and it finishes with no issues.
I am quite puzzled about where the problem could be. I am sorry if this is a trivial question. I hope you may have some ideas about how to solve it.
Thanks in advance.
Issue Analytics
- State:
- Created 3 years ago
- Comments:29 (13 by maintainers)
I found my problem and it seems unrelated to
obsp
: I can calculate neighbors when callingmoments()
only once. The second time it fails with the dead kernel issue. I noticed that within the executed cell in my notebook,scv.logging.print_version()
is called. As soon as I removed that line, I could calculate moments/neighbors repeatedly without any problem. It seems as ifscv.logging.print_version()
must not be called again afterneighbors()
was called at least once. In my case, this was an unfortunate combination of a for loop and multiple anndata objects.Steps to reproduce:
scv.pp.moments()
scv.logging.print_version()
scv.pp.moments()
again, either on the same or a different object <- kernel deathThe line the kernel dies is this one here: https://github.com/theislab/scvelo/blob/4395ae0e4ecf0452a100488692205bd054e3c009/scvelo/preprocessing/neighbors.py#L144
I checked and observed this behavior with scvelo from 0.1.9 to the lastest dev version. Though this special case I report is likely never to occur, there might be a general problem with the logging mechanism. However, the issue can be settled in my opinion.
Same solution