glasgowcompbio / ms2ldaviz

Substructural discovery in untargeted metabolomics data using LDA topic modelling.
http://ms2lda.org
MIT License
11 stars 8 forks source link

Annotation name at wrong place #116

Closed ymcdull closed 6 years ago

ymcdull commented 6 years ago
case1 case2

most molecules are working fine.

These two images are from experiment 328, with topic degree threshold = 5

ymcdull commented 6 years ago

The reason for this issue is 'id' for each html entry is built from name, but the name cannot be guaranteed to be unique. Thus, it will lead to duplicate "id" issue for html.

For example, we have three "<text id='Small...'>" here.

Solution is: replace 'name' with 'id' of node when building 'id' entry for html.

Another reason to do this is space may exist in name of nodes, but HTML5 has restrictions on the value of an ID that must not contain any space characters.

This attribute's value must not contain white spaces. Browsers treat non-conforming IDs that contains white spaces as if the white space is part of the ID. In contrast to the class attribute, which allows space-separated values, elements can only have one single ID defined through the id attribute. Note that an element may have several IDs, but the others should be set by another means, such as via a script interfacing with the DOM interface of the element.