scverse / scverse/scanpy

Error when repeating the tutorial for diffusion map in v1.9.1 scanpy

Open
#2,254 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area - Plotting 🌺
Dominant language
Python
Stars
2.6k
Forks
779
Avg merge
1d 4h
Merged PRs (30d)
27

Description

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of scanpy.
  • (optional) I have confirmed this bug exists on the master branch of scanpy.

Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.

This is the code I'm using which was copied from the tutorial:
import scanpy as sc
adata = sc.datasets.paul15()
sc.pp.log1p(adata)
sc.pp.neighbors(adata, n_neighbors=20, use_rep='X', method='gauss')
sc.tl.diffmap(adata)
sc.tl.dpt(adata, n_branchings=1, n_dcs=10)
sc.pl.diffmap(adata, color=['dpt_pseudotime', 'dpt_groups', 'paul15_clusters'])

The results I got are:
image

Which is totally different than in the tutorial:
image

Can anyone run into this problem ever? Thanks for your help.

Versions
-----

anndata 0.8.0

scanpy 1.9.1


PIL 8.4.0

backcall 0.2.0

beta_ufunc NA

binom_ufunc NA

bottleneck 1.3.2

cffi 1.15.0

colorama 0.4.4

cycler 0.10.0

cython_runtime NA

dateutil 2.8.2

debugpy 1.5.1

decorator 4.4.2

defusedxml 0.6.0

google NA

h5py 3.6.0

ipykernel 6.4.1

ipython_genutils 0.2.0

jedi 0.18.1

joblib 0.17.0

kiwisolver 1.3.1

llvmlite 0.38.0

...

Python 3.9.7 (default, Sep 16 2021, 13:09:58) [GCC 7.5.0]

Linux-3.16.0-11-amd64-x86_64-with-glibc2.19


Session information updated at 2022-05-12 14:59

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by rerunning the tutorial code with the reported Scanpy 1.9.1, AnnData 0.8.0, and Python 3.9.7 versions, focusing on sc.tl.diffmap(), sc.tl.dpt(), and sc.pl.diffmap(). Compare the generated plots with the tutorial images and determine whether the discrepancy is reproducible and attributable to the reported environment.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
bioinformatics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.