IGS / gEAR

The gEAR Portal was created as a data archive and viewer for gene expression data including microarrays, bulk RNA-Seq, single-cell RNA-Seq and more.
https://umgear.org
GNU Affero General Public License v3.0
13 stars 4 forks source link

Epiviz not loading after adding an extra gene in the search box #375

Open beamilon opened 2 years ago

beamilon commented 2 years ago

@adkinsrs @jkanche I am using P2, mouse, scATAC-seq, Chromatin Accessibility (Waldhaus) as an example but it was the same with the 2 Segil datasets.

I enter atoh1 pou4f3 sox2 in the search box of the main page and click search to go to the result page (top 2 images). Everything is working fine when scrolling through the genes. Then I add gfi1 to the search box and search. Epiviz doesn't display for any of the genes (bottom 2 images). The transcriptomics datasets are fine. I tried with other genes and the same problem occurs.

image image image image

adkinsrs commented 2 years ago

I can replicate this. The epiviz API call is working fine but it seems there is a Javascript error where a null "parentNode" variable is attempted to be read. This error also occurs when I start with the four genes and search those same four genes again in the same layout. I am guessing some Epiviz component is not being properly cleared as I see to empty Epiviz container boxes after the search.

adkinsrs commented 2 years ago

I found something interesting

For the index.html page, the version of d3.js that we use is 5.16.0. If we switch to a profile that draws an Epiviz display the d3 version changes to 3.5.17. This is interesting because that version of d3 does not seem to have the scaleLinear function, which is used when coloring the SVG plots in display.js. I believe this explains why SVGs will not load once Epiviz loads.

adkinsrs commented 2 years ago

Pushed commit https://github.com/IGS/gEAR/commit/4367af2ea1d1b69e4087a257eaf61f7161a3a616 to address this. I also made the same edit in gear-production for purposes of the workshop.

@beamilon SVGs now will show if you display Epiviz. However if you revisit a profile with Epiviz displays, those Epiviz displays will still double-draw and break. Unfortunately I don't think there is anything I can do about this, since this code is pulled from a remote location.

The second thing to watch out for (that I am going to try and work on) is if you bring up the display panel options and click "Displays", any SVG displays in the preview box will throw an error when drawn because it is trying to look for a web element that does not exist. However, clicking the "empty" display will still correctly show the SVG in the panel.

beamilon commented 2 years ago

@adkinsrs Thank you! As long as the problem with the SVG is fixed, it is great because there are many of them. Epiviz can wait (in my opinion).

adkinsrs commented 2 years ago

The second thing to watch out for (that I am going to try and work on) is if you bring up the display panel options and click "Displays", any SVG displays in the preview box will throw an error when drawn because it is trying to look for a web element that does not exist. However, clicking the "empty" display will still correctly show the SVG in the panel.

Patched this in dfa27f8029e5fe8dad718e5f205f1045f05755d9 as well