Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Kernel crashed while executing code in the current cell #812

Open
spatts14 opened this issue Mar 22, 2024 · 1 comment
Open

The Kernel crashed while executing code in the current cell #812

spatts14 opened this issue Mar 22, 2024 · 1 comment
Assignees

Comments

@spatts14
Copy link

spatts14 commented Mar 22, 2024

Hi! Thanks for writing Squidpy! Its really amazing!

I'm running into an issue and I'm not sure if its an issue with squidpy itself or how I'm running the code or space on my computer. I cannot run sq.gr.ligrec or sq.gr.spatial_autocorr without my kernel crashing. Is there something I am missing? Do I need to run this on the HPC?

Info about my data:

  • Xenium data
  • adata object is n_obs × n_vars = 53466 × 339
  • The size of the object is: 100039055 bytes (code: sys.getsizeof(adata))
  • The size of the object is: 151294272 bytes ( code: asizeof.asizeof(adata))

I've tried reducing my dataset to 0.2 and reducing the permutation to as low as 2 just to try to get it to work but every time I get the miss error:

The Kernel crashed while executing code in the current cell or a previous cell.

Please review the code in the cell(s) to identify a possible cause of the failure.

Here is the code I'm running

adata_subsample = sc.pp.subsample(adata, fraction=0.2, copy=True)
sq.gr.spatial_neighbors(adata_subsample, coord_type="generic", delaunay=True)
res = sq.gr.ligrec(
    adata,
    n_perms=2,
    cluster_key="new_clusters",
    copy=True,
    use_raw=False,
    transmitter_params={"categories": "ligand"},
    receiver_params={"categories": "receptor"},
)

and with the Moran I

adata_subsample = sc.pp.subsample(adata, fraction=0.2, copy=True)
sq.gr.spatial_neighbors(adata_subsample, coord_type="generic", delaunay=True)

sq.gr.spatial_autocorr(
    adata_subsample,
    mode="moran",
    n_perms=10,
    n_jobs=1,
)
adata_subsample.uns["moranI"].head(10)

...

Any suggestions would be really helpful!

@Rafael-Silva-Oliveira
Copy link

Rafael-Silva-Oliveira commented Apr 14, 2024

Also having the same issue with VisiumHD data (140k + spots/barcodes with over 15k genes).

@giovp Is Squidpy able to work with such granular data? It seems that more and more technologies are going towards that single-cell level resolution on spatial data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants