I tried running code below using scanpy library but for some reason it reports an error
ModuleNotFoundError: No module named 'igraph'
import numpy as np
import scanpy as sc
import anndata
adata = anndata.AnnData(np.random.rand(300,300))
sc.tl.pca(adata, n_comps=30)
sc.pp.neighbors(adata, n_neighbors=16)
sc.tl.diffmap(adata, n_comps=50)
sc.tl.louvain(adata, resolution=1)
sc.pl.paga(adata)
您只需要使用命令运行安装 igraph 库
pip install python-igraph
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.