hetio / het.io

Source code for https://het.io website
Other
6 stars 3 forks source link

Metapath abbreviation in ''Project Rephetio Metapaths'' table #3

Closed yhao-compbio closed 5 years ago

yhao-compbio commented 5 years ago

https://het.io/repurpose/metapaths.html

In the table above, metapaths that contain 'G<rG' show incorrect abbreviation.

Example:

CbG | 4 | 3.16% | 1.1931 |   | Compound–binds–Gene←regulates←Gene–upregulates–Disease–resembles–Disease

dhimmel commented 5 years ago

Okay this table is loaded at:

https://github.com/hetio/het.io/blob/c1e64713616ccd761e66fbaa8232a2b28aa6171f/repurpose/metapaths.html#L151-L156

data_url is defined at:

https://github.com/hetio/het.io/blob/176bfa2ef71ac3334067ed94782a32dc66698ffe/repurpose/js/utilities.js#L1

So this is the complete URL where the JSON table data is loaded. The source data in this file looks OKAY:

  [
   "CbG<rGuDrD",
   4,
   0.031557,
   1.1931,
   null,
   "Compound\u2013binds\u2013Gene\u2190regulates\u2190Gene\u2013upregulates\u2013Disease\u2013resembles\u2013Disease"
  ],

So the issue must be with how the value of CbG<rGuDrD is rendered as a table cell. My guess is that the < is being mistakenly interpreted as the start of an HTML tag.

dhimmel commented 5 years ago

Will probably defer fixing this until @vincerubinetti revamps the het.io website... unless there is an easy fix that someone points out (or submits a PR for).

vincerubinetti commented 5 years ago

@dhimmel update on this?

dhimmel commented 5 years ago

It's fixed in the prototype at https://hetio.github.io/repurpose-frontend/?tab=metapaths, so we'll close when we've fully rolled out the new apps.

dhimmel commented 5 years ago

@yhao-compbio, we've released the new version of the /repurpose page. This metapaths table can now be browsed at https://het.io/repurpose/?tab=metapaths without any errant truncation of abbreviations!

@vincerubinetti I noticed that we still need to redirect https://het.io/repurpose/metapaths.html to https://het.io/repurpose/?tab=metapaths. Update: fixed in https://github.com/hetio/het.io/commit/e2d4550a3fffbf12bd61cfdd22f2ed3db3356860