question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

unexpected UMAP embeddings with 0.5.2 release using single-cell gene expression data via Scanpy

See original GitHub issue

Hi, we are seeing unexpected UMAP embeddings using the 0.5.2 umap-learn version, run via Scanpy, with our single cell gene expression data (publicly available MERFISH data from Vizgen).

Our original embedding using version 0.5.1 looks like

Screen Shot 2021-10-29 at 3 46 04 PM

and the embedding with 0.5.2 looks like

Screen Shot 2021-10-29 at 3 46 24 PM

Zooming into the 0.5.2 embedding reveals that cells appear to be embedded into a lattice like structure

Screen Shot 2021-10-29 at 3 46 57 PM

We’re wondering if this is being caused in part by some sort of a rounding error in the embedding.

We have included Colab notebooks demonstrating the normal behavior using version 0.5.1 and the new unexpected behavior using version 0.5.2. Please let us know if you have any issues running the notebooks - they require authentication via Google to load the publicly available data and there are static and interactive versions of the UMAP embeddings.

The only differences between the notebooks are where we use pip to install a specific version of umap-learn or use Scanpy’s version.

# pinning to previous 0.5.1 version
# otherwise scanpy grabs umap-learn==0.5.2 (see below)
###########################################
!pip install -q umap-learn==0.5.1

We also tested using the basic usage examples from the documentation and these examples appear to be working with the new 0.5.2 version - see colab notebook Basic_Usage_Test-UMAP_0.5.2.ipynb

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
lmcinnescommented, Oct 29, 2021

That is definitely disconcerting. I’ll try to look into what the issue may be. It looks rather like you are just getting the spectral initialization instead of the UMAP embedding out.

0reactions
cornhundredcommented, Nov 1, 2021

Closing since this is something that Scanpy will resolve.

Read more comments on GitHub >

github_iconTop Results From Across the Web

showing gene expression on umap not working #1039 - GitHub
When I tried to plot the expression of a particular gene on umap map by the tutorial, it always showed the following error:....
Read more >
Online single-cell data integration through projecting ... - Nature
Here, we present SCALEX, a deep-learning method that integrates single-cell data by projecting cells into a batch-invariant, common cell- ...
Read more >
scanpy.external.tl.sam - Read the Docs
SAM iteratively rescales the input gene expression matrix to emphasize genes that are spatially variable along the intrinsic manifold of the data. It...
Read more >
Normalization and variance stabilization of single-cell RNA ...
We first applied PCA followed by UMAP embedding (“Methods” section) to the full PBMC dataset, using normalized values (Pearson residuals, or log ...
Read more >
Clustering 3K PBMCs with Scanpy - Galaxy Training!
This format is used by Scanpy (Wolf et al. 2018), the tool suite for analyzing single-cell gene expression data that we will use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found