Hello all,

I am trying to build a trajectory using PAGA.

The versions of the python packages loaded are:

scanpy==1.4.4.post1 anndata==0.7.3 umap==0.3.10 numpy==1.18.5 scipy==1.5.0 pandas==1.0.5 scikit-learn==0.22.1 statsmodels==0.11.1 python-igraph==0.7.1 louvain==0.6.1

I used the following command

**sc.tl.paga(adata, groups=‘louvain’)**

**which gives the following error:**

sc.tl.paga(adata, groups=‘louvain’)

running PAGA

AttributeError Traceback (most recent call last)

in

----> 1 sc.tl.paga(adata, groups=‘louvain’)

/anaconda3/lib/python3.7/site-packages/scanpy/tools/_paga.py in paga(adata, groups, use_rna_velocity, model, copy)

92 adata.uns[‘paga’] = {}

93 if not use_rna_velocity:

—> 94 paga.compute_connectivities()

95 adata.uns[‘paga’][‘connectivities’] = paga.connectivities

96 adata.uns[‘paga’][‘connectivities_tree’] = paga.connectivities_tree

/anaconda3/lib/python3.7/site-packages/scanpy/tools/_paga.py in compute_connectivities(self)

126 def compute_connectivities(self):

127 if self._model == ‘v1.2’:

–> 128 return self._compute_connectivities_v1_2()

129 elif self._model == ‘v1.0’:

130 return self._compute_connectivities_v1_0()

/anaconda3/lib/python3.7/site-packages/scanpy/tools/_paga.py in _compute_connectivities_v1_2(self)

136 def _compute_connectivities_v1_2(self):

137 import igraph

–> 138 ones = self._neighbors.distances.copy()

139 ones.data = np.ones(len(ones.data))

140 # should be directed if we deal with distances

AttributeError: ‘NoneType’ object has no attribute ‘copy’

Any help to solve this error is much appreciated.