scverse / scanpy

Single-cell analysis in Python. Scales to >1M cells.
https://scanpy.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.9k stars 597 forks source link

SystemError: /home/conda/feedstock_root/build_artifacts/python-split_1625973859697/work/Objects/listobject.c:138: bad argument to internal function #1980

Open Tycooner opened 3 years ago

Tycooner commented 3 years ago

Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.

Minimal code sample (that we can copy&paste without having any data)

import numpy as np
import pandas as pd
import scanpy as sc
import os
import sys

data = sc.read("data_bbknn_umap.h5ad")
sc.tl.louvain(data,resolution=res)
Traceback (most recent call last):
  File "/home/scanpy/12.bbknn0814-4/bbknn2.py", line 27, in <module>
    sc.tl.louvain(dat_merge,resolution=res)
  File "/home/scanpy/miniconda3/envs/SC2/lib/python3.9/site-packages/scanpy/tools/_louvain.py", line 132, in louvain
    g = _utils.get_igraph_from_adjacency(adjacency, directed=directed)
  File "/home/scanpy/miniconda3/envs/SC2/lib/python3.9/site-packages/scanpy/_utils/__init__.py", line 219, in get_igraph_from_adjacency
    g.es['weight'] = weights
SystemError: /home/conda/feedstock_root/build_artifacts/python-split_1625973859697/work/Objects/listobject.c:138: bad argument to internal function

Versions

[Paste the output of scanpy.logging.print_versions() leaving a blank line after the details tag]
Tycooner commented 3 years ago

after I have used bbknn and ump these two steps, when I use the louvain, It gives me a System Error. Note: my dataset is too big. I want help!! thx!!

lskfs commented 2 years ago

hi @Tycooner, the same error happened to me recently when clustering using leiden, is there any idea what happened here and if you have any solution?

similar situation here: with large dataset and tried to set different resolution parameters when run sc.tl.leiden