bzhanglab / WebGestaltR

R package for WebGestalt
https://bzhanglab.github.io/WebGestaltR/
34 stars 14 forks source link

fix(gsea): fix margin too large error #45

Closed iblacksand closed 2 months ago

iblacksand commented 2 months ago

If the analyte set title for the GSEA plot is too long, it can create an error figure margin too large. This was previously addressed for SVG files by shortening the title. HMDB features many pathways with long names that seemed to still break the SVG output, or it was able to create this problem for the PNG output. Because the GSEA plot is not an absolutely necessary output for the analysis, it should not create an error, but instead it should display a warning.

Fix applied

The plotEnrichmentPlot function content is surrounded in a try to prevent errors in this function from stopping the analysis.

Further steps

iblacksand commented 2 months ago

Because of the severity of the error, this temporary fix will be pushed onto master, but will still work on addressing the core of this issue.