2

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)
alexisdevarennes
  • 5,437
  • 4
  • 24
  • 38
Vger
  • 115
  • 1
  • 4

1 Answers1

1

You just need to run install igraph library using the command

pip install python-igraph
grape
  • 26
  • 4