monarch-initiative / monarch-legacy

Monarch web application and API
BSD 3-Clause "New" or "Revised" License
42 stars 37 forks source link

In UI, render genotype names according to their convention #754

Open cmungall opened 9 years ago

cmungall commented 9 years ago

Example:

http://beta.monarchinitiative.org/gene/MGI:1333812#variants

The subject column looks like gene symbols, but these are all genotype symbols, the <s are not being escaped

These are the possible behaviors:

  1. http://www.informatics.jax.org/allele/MGI:3894845 - use superscripts
  2. Escape <s are in here http://beta.monarchinitiative.org/variant/MGI:3894845
  3. Emit without processing

3 is not acceptable obviously, and should be fixed.

2 is the most straightforward. We should avoid complex logic in the UI.

1 is desirable, but this may be better handled by having some kind of additional field added at dipper time, to avoid complex UI logic. E.g. the field could be 'html label' with the intent that it is displayed directly.

This should also be tested with flybase genes when available. FlyBase like to provide literals that are intended to be rendered as html, e.g. &agr1,2Lan is the synonym for the wb gene. See in amigo: http://amigo.geneontology.org/amigo/gene_product/FB:FBgn0261563

kshefchek commented 9 years ago

I've added some code to escape < >'s, will add superscripts to wishlist.

jmcmurry commented 9 years ago

I understand the rationale for literal HTML text being fed from dipper (I logged a new ticket https://github.com/monarch-initiative/dipper/issues/209) but I do not understand the &agr1,2Lan example as I don't see any corresponding html character code.

In any case, I've changed the title of the ticket to correspond to the remaining UI-side functionality to implement if the dipper dependency is fulfilled and have removed the 'bug' label accordingly as that part has been addressed.

jmcmurry commented 9 years ago

@cmungall pI don't understand the reason for the bbob label for this ticket; could you clarify or remove, please? Thanks

kshefchek commented 9 years ago

The golr tables are bbop-js widgets, see https://github.com/berkeleybop/bbop-js/tree/master/lib/bbop/widget, although some code is unique to Monarch (linker.js, handler.js)

nlwashington commented 9 years ago

We regenerate the labels for genotypes and their parts as part of the dipper pipeline, to try to remove all html chars, and ensure style consistency according to the part type. This is to bring about uniformity across all organisms, where each MOD may represent the same genotypic parts using a different notation style. If this is undesirable, this needs to be discussed on a bigger call, as much of the dipper code will need to be refactored to accommodate this.

kshefchek commented 8 years ago

cc @cindyJax @sbello

kshefchek commented 6 years ago

Some more examples: FlyBase genotype data showing with html tags instead of superscripts https://monarchinitiative.org/gene/FlyBase:FBgn0033688#genotypes https://monarchinitiative.org/gene/FlyBase:FBgn0263933#genotypes

cc @sjm41

kshefchek commented 6 years ago

@putmantime let's make sure to include this in the new app. We should be consistent and document our approach. I recommend we look at what AGR is/has done in terms of unifying notation and follow those guidelines.