hetio / het.io

Source code for https://het.io website

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Metapath abbreviation in ''Project Rephetio Metapaths'' table

yhao-compbio opened this issue · comments

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

Okay this table is loaded at:

$('#metapath_table').DataTable({
ajax: `${data_url}metapaths.json`,
aoColumnDefs: aoColumnDefs,
pageLength: 25,
order: [[1, 'asc'], [0, 'asc']],
})

data_url is defined at:

var data_url = 'https://raw.githubusercontent.com/dhimmel/het.io-rep-data/1a960f0e353586f8fe9f61b569919f24603d4344/browser-tables/';

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.

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).

@dhimmel update on this?

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.

@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 e2d4550