Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plot_enrichment_detailed function is not creating labeled plots #158

Open
velenjak1 opened this issue Mar 27, 2024 · 3 comments
Open

plot_enrichment_detailed function is not creating labeled plots #158

velenjak1 opened this issue Mar 27, 2024 · 3 comments

Comments

@velenjak1
Copy link

Hi,

I successfully ran the plot_enrichment_detailed function a month ago using an annotation matrix for a metabolomics dataset. The output correctly labeled the significant metabolites.
image

Now, when I run the same code, the dots are no longer labeled:
image

I have run this on a separate dataset and still get unlabeled plots. I have tried uninstalling and re-installing the package but still no change. Might there be a bug?

@chunyu-yes
Copy link

Hi,

I encountered the same problem. Have you solved this problem?

Thanks,
Chunyu

@velenjak1
Copy link
Author

Unfortunately not. I just gave up on it.

@jjcaff
Copy link

jjcaff commented Jun 16, 2024

Summary: the issue is with ggrepel not working with coord_flip.

I had a similar problem, and found that the geom_text_repel function was not working after coord_flip, which is part of the plot_enrichment_detailed function. It seems this was an issue after geom_text_repel was updated recently (slowkow/ggrepel#253), but even though this change was reverted, I wasn't able to fix the issue by reinstalling the package.
I have ended up redefining the geom_text_repel function by copying the most recent version from the github into a script and then sourcing it at the start of my analysis, replacing the version of the geom_text_repel function with one that works with coord_flip.
Whilst my approach does work, it's messy. I'd suggest updating both MOFA2 and ggrepel functions and trying again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants