scverse / scverse/SnapATAC2

trouble with pbmc notebook

Open
#277 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
323
Forks
43
PR merge metrics
No merged PRs in 30d

Description

this is being run within the recommended container

for snap.pl.umap(data, color='leiden', interactive=False, height=500)

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
Cell In[17], line 1
----> 1 snap.pl.umap(data, color='leiden', interactive=False, height=500)

File [/usr/local/lib/python3.11/site-packages/snapatac2/plotting/__init__.py:265](http://127.0.0.1:8888/usr/local/lib/python3.11/site-packages/snapatac2/plotting/__init__.py#line=264), in umap(adata, color, use_rep, marker_size, marker_opacity, sample_size, **kwargs)
    234 """Plot the UMAP embedding.
    235 
    236 Parameters
   (...)
    261     returned, which can then be further customized using the plotly API.
    262 """
    263 from natsort import index_natsorted
--> 265 embedding = adata.obsm[use_rep] 
    267 if isinstance(color, str):
    268     groups = adata.obs[color].to_numpy()

File [/usr/local/lib/python3.11/site-packages/anndata/_core/aligned_mapping.py:196](http://127.0.0.1:8888/usr/local/lib/python3.11/site-packages/anndata/_core/aligned_mapping.py#line=195), in AlignedActualMixin.__getitem__(self, key)
    195 def __getitem__(self, key: str) -> V:
--> 196     return self._data[key]

KeyError: 'X_umap'```

Contributor guide

No contributing guide indexed for this repository

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 with the PBMC notebook step calling snap.pl.umap and inspect snapatac2/plotting/init.py around the umap entry point at line 265. Reproduce the KeyError in the recommended container, then trace why the input lacks X_umap; the issue is done when the notebook call runs successfully with the expected embedding.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python
Domain
bioinformatics, data
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.