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.

The UMAP generated by `reduceDimension` is rather "weak"

See original GitHub issue

Hi my dear friends,

I noticed the umap generated by dyn.tl.reduceDimension is not as good as that from other tools (seurat, scanpy, etc.)

Here is a umap generated by dyn.tl.reduceDimension (preprocessed by recipe_monocle). We can see the clusters formed a condensed round mass. These cells are on a developmental trajectory. It can form a line structure according to our previous experiences. image

However, the umap generated by scanpy is better structured - the clusters correctly formed along some axises. (the same loom file as used above, the same preprocessed adata.X but fed to scanpy package for downstream umap analysis ) In this case, I used size-factor normalized and log1p transformed adata.X generated by recipe_monocle (I didn’t use scanpy’s preprocessing steps, I know there are normalization differences), used hvg genes to calculated pca, neighbor graphs, and umap in scanpy. Since the input are the same (recipe_monocle normalized data), why do we got quite different umap? (dynamo’s umaps seem less informative)

image

Moreover, it seems that even scanpy’s pca plot has a better structure preservation ability. we all know umap is non-linear after all.

image

These situations are not limited to this single dataset. All dataset I tried (up to now) hints that the UMAP produced by dynamo is rather “weak” (not as good as a non-linear method’s expectation)

Looking forward to your suggestions and guidance.

p.s. I raised a lot of questions/problems recently. And hope I didn’t bother your new-manuscript preparations too much.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
chansigitcommented, Sep 5, 2022

For your information, I deleted the umap embedding and recomputed umap with dyn.tl.reduceDimension(adata2,kwargs={'min_dist':0.01},enforce=True) only to find it yields exactly the same umap

image

The default min_dist=0.5 in dynamo https://github.com/aristoteleo/dynamo-release/blob/1d1f5c521d0b8763ab866dcc3c3d96be0ba3f8f3/dynamo/tools/utils_reduceDimension.py#L203,

The default min_dist of scanpy is also 0.5,see https://scanpy.readthedocs.io/en/latest/generated/scanpy.tl.umap.html

  1. it seems that min_dist is not the cause.
  2. it seems that passing a min_dist in kwargs has no impact at all.
0reactions
github-actions[bot]commented, Dec 7, 2022

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 14 days

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · aristoteleo/dynamo-release - GitHub
Need support for newly published .h5ad data generated with anndata>0.8.0 bug ... The UMAP generated by reduceDimension is rather "weak" enhancement New ...
Read more >
umap Documentation
Uniform Manifold Approximation and Projection (UMAP) is a dimension reduction technique that can be used for.
Read more >
umap Documentation - Read the Docs
Uniform Manifold Approximation and Projection (UMAP) is a dimension reduction technique that can be used for.
Read more >
Understanding UMAP
Dimensionality reduction is a powerful tool for machine learning practitioners to visualize and understand large, high dimensional datasets.
Read more >
MAPPING HUMAN HAEMATOPOIETIC STEM CELLS FROM ...
The steps to generate human HSCs rather than HSC-independent progenitors are poorly defined, compromising the efforts to differentiate HSCs ...
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