Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

troubleshooting scanpy pseudotime error #1

Open
yulianatan opened this issue Jan 7, 2021 · 0 comments
Open

troubleshooting scanpy pseudotime error #1

yulianatan opened this issue Jan 7, 2021 · 0 comments

Comments

@yulianatan
Copy link

yulianatan commented Jan 7, 2021

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant