TheJacksonLaboratory / endometriosis-scrnaseq

Code to reproduce analysis and figures for scRNA-seq analysis of endometriosis in Tan et al. 2021.
MIT License
4 stars 3 forks source link

troubleshooting scanpy pseudotime error #1

Open yulianatan opened 3 years ago

yulianatan commented 3 years ago

following steps on this tutorial error on line 10,

AttributeError Traceback (most recent call last)

in 1 #denoising graph ----> 2 sc.tl.diffmap(myeloid_cluster) 3 sc.pp.neighbors(harmonized, n_neighbors=20, n_pcs=18, metric="correlation", method='umap') 4 sc.tl.draw_graph(myeloid_cluster) /opt/conda/lib/python3.7/site-packages/scanpy/tools/_diffmap.py in diffmap(adata, n_comps, copy) 47 raise ValueError('Provide any value greater than 2 for `n_comps`. ') 48 adata = adata.copy() if copy else adata ---> 49 _diffmap(adata, n_comps=n_comps) 50 return adata if copy else None /opt/conda/lib/python3.7/site-packages/scanpy/tools/_dpt.py in _diffmap(adata, n_comps) 14 start = logg.info(f'computing Diffusion Maps using n_comps={n_comps}(=n_dcs)') 15 dpt = DPT(adata) ---> 16 dpt.compute_transitions() 17 dpt.compute_eigen(n_comps=n_comps) 18 adata.obsm['X_diffmap'] = dpt.eigen_basis /opt/conda/lib/python3.7/site-packages/scanpy/neighbors/__init__.py in compute_transitions(self, density_normalize) 807 # q[i] is an estimate for the sampling density at point i 808 # it's also the degree of the underlying graph --> 809 q = np.asarray(W.sum(axis=0)) 810 if not issparse(W): 811 Q = np.diag(1.0/q) AttributeError: 'NoneType' object has no attribute 'sum'