Closed Connorr0 closed 1 year ago
Hi Connor,
I am loading up your environment to see what the issue may be. Clearly, those UMAPs look a tad different than expected, so thank you for drawing this to my attention.
Allen
From: Connor Finkbeiner @.> Sent: Monday, October 17, 2022 2:06 PM To: cistrome/MIRA @.> Cc: Subscribed @.***> Subject: [cistrome/MIRA] Joint representation UMAP not appearing as in walkthrough (with supplied data) (Issue #13)
I was running through the tutorials and noticed that in mira.datasets.ShareseqBaseData()the Joint Representation walkthrough my UMAP was not matching the one supplied in the walkthrough. As far as I can tell I copied all the code from the walkthrough directly (and loaded the datasets with the mira.datasets.ShareseqTopicModels() and mira.datasets.ShareseqBaseData() functions).
Any ideas on what is wrong/different or if this is a known issue? (I am also attaching my environment.yml in case I have wrong package versions.)
Thanks!
Here is the expected UMAP: [https://camo.githubusercontent.com/ee278dad1df23a7c8ec56649811e613c8b41483b89ab59156ef69f166ba59032/68747470733a2f2f6d6972612d6d756c74696f6d652e72656164746865646f63732e696f2f656e2f6c61746573742f5f696d616765732f6e6f7465626f6f6b735f7475746f7269616c5f6a6f696e745f726570726573656e746174696f6e5f31385f312e706e67]https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcamo.githubusercontent.com%2Fee278dad1df23a7c8ec56649811e613c8b41483b89ab59156ef69f166ba59032%2F68747470733a2f2f6d6972612d6d756c74696f6d652e72656164746865646f63732e696f2f656e2f6c61746573742f5f696d616765732f6e6f7465626f6f6b735f7475746f7269616c5f6a6f696e745f726570726573656e746174696f6e5f31385f312e706e67&data=05%7C01%7C%7C624a2cb14d744a262b7f08dab072bf4d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638016304122610869%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=pUvVaFi%2FzsLyiPJSFdbtiD9OqBvHn6cxJjBsxtG347k%3D&reserved=0
Here is the UMAP I got after running the (hopefully) same code: [Unknown]https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F29585780%2F196259446-bd2b9f22-b721-4181-ab16-dfed841a81c4.png&data=05%7C01%7C%7C624a2cb14d744a262b7f08dab072bf4d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638016304122610869%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=qzLDGSLhn2W%2BCn99PshpURgzGJZy1L%2Bu65AFO8Alsf8%3D&reserved=0
— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcistrome%2FMIRA%2Fissues%2F13&data=05%7C01%7C%7C624a2cb14d744a262b7f08dab072bf4d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638016304122610869%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=bVimcuE9ivE9LC2anp0LBSnRvfbsC%2F9vST6xQjsTG6Y%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAE43JPGAIPO5OIT6N2WMG5LWDWPULANCNFSM6AAAAAARHLQV4M&data=05%7C01%7C%7C624a2cb14d744a262b7f08dab072bf4d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638016304122767135%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=SZg0ADE502dqM3dS3ZtJPonau6z0tp3yT05GaHhMzOc%3D&reserved=0. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi Connor,
I was not able to set up your environment, but I was able to reproduce the original UMAPs with the latest MIRA version in the COLAB environment:
https://mira-multiome.readthedocs.io/en/latest/notebooks/tutorial_joint_representation.html Joint Representation — MIRA 1.0.0 documentation - Read the Docshttps://mira-multiome.readthedocs.io/en/latest/notebooks/tutorial_joint_representation.html Joint Representation#. In this tutorial, we will use pre-trained topic models to create a joint representation of the the SHARE-seq dataset which embeds cells in a low-dimensional space based on both accessibility and expression modailities. mira-multiome.readthedocs.io [cid:9b3e4bab-adb9-4151-b723-579c6292cb2a]
(just click the "Open in Colab" button)
Reasons why your UMAP could look a little different comes down to differences in the versions of the dependencies. Your difference is quite extreme, though, and I think it might be because you are directly plotting the underlying ILR-transformed topic compositions, and not the UMAP projection.
For example, if you were to run:
sc.pl.embedding(rna_data, basis = 'X_umap_features' ,
instead of:
sc.pl.embedding(rna_data, basis = 'X_umap')
This could explain what you're seeing!
Allen
From: Connor Finkbeiner @.> Sent: Monday, October 17, 2022 2:06 PM To: cistrome/MIRA @.> Cc: Subscribed @.***> Subject: [cistrome/MIRA] Joint representation UMAP not appearing as in walkthrough (with supplied data) (Issue #13)
I was running through the tutorials and noticed that in mira.datasets.ShareseqBaseData()the Joint Representation walkthrough my UMAP was not matching the one supplied in the walkthrough. As far as I can tell I copied all the code from the walkthrough directly (and loaded the datasets with the mira.datasets.ShareseqTopicModels() and mira.datasets.ShareseqBaseData() functions).
Any ideas on what is wrong/different or if this is a known issue? (I am also attaching my environment.yml in case I have wrong package versions.)
Thanks!
Here is the expected UMAP: [https://camo.githubusercontent.com/ee278dad1df23a7c8ec56649811e613c8b41483b89ab59156ef69f166ba59032/68747470733a2f2f6d6972612d6d756c74696f6d652e72656164746865646f63732e696f2f656e2f6c61746573742f5f696d616765732f6e6f7465626f6f6b735f7475746f7269616c5f6a6f696e745f726570726573656e746174696f6e5f31385f312e706e67]https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcamo.githubusercontent.com%2Fee278dad1df23a7c8ec56649811e613c8b41483b89ab59156ef69f166ba59032%2F68747470733a2f2f6d6972612d6d756c74696f6d652e72656164746865646f63732e696f2f656e2f6c61746573742f5f696d616765732f6e6f7465626f6f6b735f7475746f7269616c5f6a6f696e745f726570726573656e746174696f6e5f31385f312e706e67&data=05%7C01%7C%7C624a2cb14d744a262b7f08dab072bf4d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638016304122610869%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=pUvVaFi%2FzsLyiPJSFdbtiD9OqBvHn6cxJjBsxtG347k%3D&reserved=0
Here is the UMAP I got after running the (hopefully) same code: [Unknown]https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F29585780%2F196259446-bd2b9f22-b721-4181-ab16-dfed841a81c4.png&data=05%7C01%7C%7C624a2cb14d744a262b7f08dab072bf4d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638016304122610869%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=qzLDGSLhn2W%2BCn99PshpURgzGJZy1L%2Bu65AFO8Alsf8%3D&reserved=0
— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcistrome%2FMIRA%2Fissues%2F13&data=05%7C01%7C%7C624a2cb14d744a262b7f08dab072bf4d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638016304122610869%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=bVimcuE9ivE9LC2anp0LBSnRvfbsC%2F9vST6xQjsTG6Y%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAE43JPGAIPO5OIT6N2WMG5LWDWPULANCNFSM6AAAAAARHLQV4M&data=05%7C01%7C%7C624a2cb14d744a262b7f08dab072bf4d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638016304122767135%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=SZg0ADE502dqM3dS3ZtJPonau6z0tp3yT05GaHhMzOc%3D&reserved=0. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Ah, I ended up creating a new environment (and installed packages with the pip command in the colab notebook). The code seems to work fine now and gives a similar UMAP. It is strange since it did not have a UMAP-y structure, so I am not sure what was happening with the later version.
I was running through the tutorials and noticed that in the Joint Representation walkthrough my UMAP was not matching the one supplied in the walkthrough. As far as I can tell I copied all the code from the walkthrough directly (and loaded the datasets with the mira.datasets.ShareseqTopicModels() and mira.datasets.ShareseqBaseData() functions).
Any ideas on what is wrong/different or if this is a known issue? (I am also attaching my environment.yml in case I have wrong package versions.)
Thanks!
Here is the expected UMAP:![](https://mira-multiome.readthedocs.io/en/latest/_images/notebooks_tutorial_joint_representation_18_1.png)
Here is the UMAP I got after running the (hopefully) same code:![Unknown](https://user-images.githubusercontent.com/29585780/196259446-bd2b9f22-b721-4181-ab16-dfed841a81c4.png)
Yml: MIRA_10_12_22_yml.txt