lazar-gui 1.0.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -1
  3. data/FAQ.md +14 -25
  4. data/Gemfile +3 -1
  5. data/LICENSE.md +596 -0
  6. data/VERSION +1 -1
  7. data/application.rb +71 -191
  8. data/config.ru +2 -1
  9. data/helper.rb +0 -215
  10. data/lazar-gui.gemspec +7 -7
  11. data/public/css/bootstrap.vertical-tabs.min.css +1 -0
  12. data/public/jsme/.DS_Store +0 -0
  13. data/public/jsme/222ADBFEC322C2723C6ED2C4FB31B217.cache.js +1 -0
  14. data/public/jsme/293DFEFA807A962F28C09E358B34A434.cache.js +1 -0
  15. data/public/jsme/61B683D3493CAED438D5743A0404863D.cache.js +1 -0
  16. data/public/jsme/6ABB8447ACAB1353A478923AC9C0550B.cache.js +1 -0
  17. data/public/jsme/7A65B607B90DE29D7EA26AA83BF69D4F.cache.js +1 -0
  18. data/public/jsme/8816D61E367E34DBCFA53666849E21D8.cache.js +1 -0
  19. data/public/jsme/8BDB7ED57B756F8D50277056A0D59DA8.cache.js +1 -0
  20. data/public/jsme/96E40B969193BD74B8A621486920E79C.cache.js +606 -0
  21. data/public/jsme/A2384E54F71557BAEA414A43D47F17EA.cache.js +1 -0
  22. data/public/jsme/A6DBDE07E3A8F66E8959A4F32505E16B.cache.png +0 -0
  23. data/public/jsme/C8A71BD2E1367E9BB43A1B9C25871BEE.cache.js +1 -0
  24. data/public/jsme/C9EEF554958AACEE6A060F620375E4FA.cache.js +1 -0
  25. data/public/jsme/D4DF9EC9DD21B943E35F3D5696D5D2A1.cache.js +1 -0
  26. data/public/jsme/D9A64F1634E29088B910B3E0D4621E49.cache.js +1 -0
  27. data/public/jsme/compilation-mappings.txt +2689 -0
  28. data/public/jsme/deferredjs/.DS_Store +0 -0
  29. data/public/jsme/deferredjs/222ADBFEC322C2723C6ED2C4FB31B217/1.cache.js +1 -0
  30. data/public/jsme/deferredjs/222ADBFEC322C2723C6ED2C4FB31B217/2.cache.js +1 -0
  31. data/public/jsme/deferredjs/222ADBFEC322C2723C6ED2C4FB31B217/3.cache.js +1 -0
  32. data/public/jsme/deferredjs/222ADBFEC322C2723C6ED2C4FB31B217/4.cache.js +1 -0
  33. data/public/jsme/deferredjs/222ADBFEC322C2723C6ED2C4FB31B217/5.cache.js +1 -0
  34. data/public/jsme/deferredjs/222ADBFEC322C2723C6ED2C4FB31B217/6.cache.js +1 -0
  35. data/public/jsme/deferredjs/222ADBFEC322C2723C6ED2C4FB31B217/7.cache.js +1 -0
  36. data/public/jsme/deferredjs/222ADBFEC322C2723C6ED2C4FB31B217/8.cache.js +1 -0
  37. data/public/jsme/deferredjs/222ADBFEC322C2723C6ED2C4FB31B217/9.cache.js +1 -0
  38. data/public/jsme/deferredjs/293DFEFA807A962F28C09E358B34A434/1.cache.js +1 -0
  39. data/public/jsme/deferredjs/293DFEFA807A962F28C09E358B34A434/2.cache.js +1 -0
  40. data/public/jsme/deferredjs/293DFEFA807A962F28C09E358B34A434/3.cache.js +1 -0
  41. data/public/jsme/deferredjs/293DFEFA807A962F28C09E358B34A434/4.cache.js +1 -0
  42. data/public/jsme/deferredjs/293DFEFA807A962F28C09E358B34A434/5.cache.js +1 -0
  43. data/public/jsme/deferredjs/293DFEFA807A962F28C09E358B34A434/6.cache.js +1 -0
  44. data/public/jsme/deferredjs/293DFEFA807A962F28C09E358B34A434/7.cache.js +1 -0
  45. data/public/jsme/deferredjs/293DFEFA807A962F28C09E358B34A434/8.cache.js +1 -0
  46. data/public/jsme/deferredjs/293DFEFA807A962F28C09E358B34A434/9.cache.js +1 -0
  47. data/public/jsme/deferredjs/61B683D3493CAED438D5743A0404863D/1.cache.js +1 -0
  48. data/public/jsme/deferredjs/61B683D3493CAED438D5743A0404863D/2.cache.js +1 -0
  49. data/public/jsme/deferredjs/61B683D3493CAED438D5743A0404863D/3.cache.js +1 -0
  50. data/public/jsme/deferredjs/61B683D3493CAED438D5743A0404863D/4.cache.js +1 -0
  51. data/public/jsme/deferredjs/61B683D3493CAED438D5743A0404863D/5.cache.js +1 -0
  52. data/public/jsme/deferredjs/61B683D3493CAED438D5743A0404863D/6.cache.js +1 -0
  53. data/public/jsme/deferredjs/61B683D3493CAED438D5743A0404863D/7.cache.js +1 -0
  54. data/public/jsme/deferredjs/61B683D3493CAED438D5743A0404863D/8.cache.js +1 -0
  55. data/public/jsme/deferredjs/61B683D3493CAED438D5743A0404863D/9.cache.js +1 -0
  56. data/public/jsme/deferredjs/6ABB8447ACAB1353A478923AC9C0550B/1.cache.js +1 -0
  57. data/public/jsme/deferredjs/6ABB8447ACAB1353A478923AC9C0550B/2.cache.js +1 -0
  58. data/public/jsme/deferredjs/6ABB8447ACAB1353A478923AC9C0550B/3.cache.js +1 -0
  59. data/public/jsme/deferredjs/6ABB8447ACAB1353A478923AC9C0550B/4.cache.js +1 -0
  60. data/public/jsme/deferredjs/6ABB8447ACAB1353A478923AC9C0550B/5.cache.js +1 -0
  61. data/public/jsme/deferredjs/6ABB8447ACAB1353A478923AC9C0550B/6.cache.js +1 -0
  62. data/public/jsme/deferredjs/6ABB8447ACAB1353A478923AC9C0550B/7.cache.js +1 -0
  63. data/public/jsme/deferredjs/6ABB8447ACAB1353A478923AC9C0550B/8.cache.js +1 -0
  64. data/public/jsme/deferredjs/6ABB8447ACAB1353A478923AC9C0550B/9.cache.js +1 -0
  65. data/public/jsme/deferredjs/7A65B607B90DE29D7EA26AA83BF69D4F/1.cache.js +1 -0
  66. data/public/jsme/deferredjs/7A65B607B90DE29D7EA26AA83BF69D4F/2.cache.js +1 -0
  67. data/public/jsme/deferredjs/7A65B607B90DE29D7EA26AA83BF69D4F/3.cache.js +1 -0
  68. data/public/jsme/deferredjs/7A65B607B90DE29D7EA26AA83BF69D4F/4.cache.js +1 -0
  69. data/public/jsme/deferredjs/7A65B607B90DE29D7EA26AA83BF69D4F/5.cache.js +1 -0
  70. data/public/jsme/deferredjs/7A65B607B90DE29D7EA26AA83BF69D4F/6.cache.js +1 -0
  71. data/public/jsme/deferredjs/7A65B607B90DE29D7EA26AA83BF69D4F/7.cache.js +1 -0
  72. data/public/jsme/deferredjs/7A65B607B90DE29D7EA26AA83BF69D4F/8.cache.js +1 -0
  73. data/public/jsme/deferredjs/7A65B607B90DE29D7EA26AA83BF69D4F/9.cache.js +1 -0
  74. data/public/jsme/deferredjs/8816D61E367E34DBCFA53666849E21D8/1.cache.js +1 -0
  75. data/public/jsme/deferredjs/8816D61E367E34DBCFA53666849E21D8/2.cache.js +1 -0
  76. data/public/jsme/deferredjs/8816D61E367E34DBCFA53666849E21D8/3.cache.js +1 -0
  77. data/public/jsme/deferredjs/8816D61E367E34DBCFA53666849E21D8/4.cache.js +1 -0
  78. data/public/jsme/deferredjs/8816D61E367E34DBCFA53666849E21D8/5.cache.js +1 -0
  79. data/public/jsme/deferredjs/8816D61E367E34DBCFA53666849E21D8/6.cache.js +1 -0
  80. data/public/jsme/deferredjs/8816D61E367E34DBCFA53666849E21D8/7.cache.js +1 -0
  81. data/public/jsme/deferredjs/8816D61E367E34DBCFA53666849E21D8/8.cache.js +1 -0
  82. data/public/jsme/deferredjs/8816D61E367E34DBCFA53666849E21D8/9.cache.js +1 -0
  83. data/public/jsme/deferredjs/8BDB7ED57B756F8D50277056A0D59DA8/1.cache.js +1 -0
  84. data/public/jsme/deferredjs/8BDB7ED57B756F8D50277056A0D59DA8/2.cache.js +1 -0
  85. data/public/jsme/deferredjs/8BDB7ED57B756F8D50277056A0D59DA8/3.cache.js +1 -0
  86. data/public/jsme/deferredjs/8BDB7ED57B756F8D50277056A0D59DA8/4.cache.js +1 -0
  87. data/public/jsme/deferredjs/8BDB7ED57B756F8D50277056A0D59DA8/5.cache.js +1 -0
  88. data/public/jsme/deferredjs/8BDB7ED57B756F8D50277056A0D59DA8/6.cache.js +1 -0
  89. data/public/jsme/deferredjs/8BDB7ED57B756F8D50277056A0D59DA8/7.cache.js +1 -0
  90. data/public/jsme/deferredjs/8BDB7ED57B756F8D50277056A0D59DA8/8.cache.js +1 -0
  91. data/public/jsme/deferredjs/8BDB7ED57B756F8D50277056A0D59DA8/9.cache.js +1 -0
  92. data/public/jsme/deferredjs/A2384E54F71557BAEA414A43D47F17EA/1.cache.js +1 -0
  93. data/public/jsme/deferredjs/A2384E54F71557BAEA414A43D47F17EA/2.cache.js +1 -0
  94. data/public/jsme/deferredjs/A2384E54F71557BAEA414A43D47F17EA/3.cache.js +1 -0
  95. data/public/jsme/deferredjs/A2384E54F71557BAEA414A43D47F17EA/4.cache.js +1 -0
  96. data/public/jsme/deferredjs/A2384E54F71557BAEA414A43D47F17EA/5.cache.js +1 -0
  97. data/public/jsme/deferredjs/A2384E54F71557BAEA414A43D47F17EA/6.cache.js +1 -0
  98. data/public/jsme/deferredjs/A2384E54F71557BAEA414A43D47F17EA/7.cache.js +1 -0
  99. data/public/jsme/deferredjs/A2384E54F71557BAEA414A43D47F17EA/8.cache.js +1 -0
  100. data/public/jsme/deferredjs/A2384E54F71557BAEA414A43D47F17EA/9.cache.js +1 -0
  101. data/public/jsme/deferredjs/C8A71BD2E1367E9BB43A1B9C25871BEE/1.cache.js +1 -0
  102. data/public/jsme/deferredjs/C8A71BD2E1367E9BB43A1B9C25871BEE/2.cache.js +1 -0
  103. data/public/jsme/deferredjs/C8A71BD2E1367E9BB43A1B9C25871BEE/3.cache.js +1 -0
  104. data/public/jsme/deferredjs/C8A71BD2E1367E9BB43A1B9C25871BEE/4.cache.js +1 -0
  105. data/public/jsme/deferredjs/C8A71BD2E1367E9BB43A1B9C25871BEE/5.cache.js +1 -0
  106. data/public/jsme/deferredjs/C8A71BD2E1367E9BB43A1B9C25871BEE/6.cache.js +1 -0
  107. data/public/jsme/deferredjs/C8A71BD2E1367E9BB43A1B9C25871BEE/7.cache.js +1 -0
  108. data/public/jsme/deferredjs/C8A71BD2E1367E9BB43A1B9C25871BEE/8.cache.js +1 -0
  109. data/public/jsme/deferredjs/C8A71BD2E1367E9BB43A1B9C25871BEE/9.cache.js +1 -0
  110. data/public/jsme/deferredjs/C9EEF554958AACEE6A060F620375E4FA/1.cache.js +1 -0
  111. data/public/jsme/deferredjs/C9EEF554958AACEE6A060F620375E4FA/2.cache.js +1 -0
  112. data/public/jsme/deferredjs/C9EEF554958AACEE6A060F620375E4FA/3.cache.js +1 -0
  113. data/public/jsme/deferredjs/C9EEF554958AACEE6A060F620375E4FA/4.cache.js +1 -0
  114. data/public/jsme/deferredjs/C9EEF554958AACEE6A060F620375E4FA/5.cache.js +1 -0
  115. data/public/jsme/deferredjs/C9EEF554958AACEE6A060F620375E4FA/6.cache.js +1 -0
  116. data/public/jsme/deferredjs/C9EEF554958AACEE6A060F620375E4FA/7.cache.js +1 -0
  117. data/public/jsme/deferredjs/C9EEF554958AACEE6A060F620375E4FA/8.cache.js +1 -0
  118. data/public/jsme/deferredjs/C9EEF554958AACEE6A060F620375E4FA/9.cache.js +1 -0
  119. data/public/jsme/deferredjs/D4DF9EC9DD21B943E35F3D5696D5D2A1/1.cache.js +1 -0
  120. data/public/jsme/deferredjs/D4DF9EC9DD21B943E35F3D5696D5D2A1/2.cache.js +1 -0
  121. data/public/jsme/deferredjs/D4DF9EC9DD21B943E35F3D5696D5D2A1/3.cache.js +1 -0
  122. data/public/jsme/deferredjs/D4DF9EC9DD21B943E35F3D5696D5D2A1/4.cache.js +1 -0
  123. data/public/jsme/deferredjs/D4DF9EC9DD21B943E35F3D5696D5D2A1/5.cache.js +1 -0
  124. data/public/jsme/deferredjs/D4DF9EC9DD21B943E35F3D5696D5D2A1/6.cache.js +1 -0
  125. data/public/jsme/deferredjs/D4DF9EC9DD21B943E35F3D5696D5D2A1/7.cache.js +1 -0
  126. data/public/jsme/deferredjs/D4DF9EC9DD21B943E35F3D5696D5D2A1/8.cache.js +1 -0
  127. data/public/jsme/deferredjs/D4DF9EC9DD21B943E35F3D5696D5D2A1/9.cache.js +1 -0
  128. data/public/jsme/deferredjs/D9A64F1634E29088B910B3E0D4621E49/1.cache.js +1 -0
  129. data/public/jsme/deferredjs/D9A64F1634E29088B910B3E0D4621E49/2.cache.js +1 -0
  130. data/public/jsme/deferredjs/D9A64F1634E29088B910B3E0D4621E49/3.cache.js +1 -0
  131. data/public/jsme/deferredjs/D9A64F1634E29088B910B3E0D4621E49/4.cache.js +1 -0
  132. data/public/jsme/deferredjs/D9A64F1634E29088B910B3E0D4621E49/5.cache.js +1 -0
  133. data/public/jsme/deferredjs/D9A64F1634E29088B910B3E0D4621E49/6.cache.js +1 -0
  134. data/public/jsme/deferredjs/D9A64F1634E29088B910B3E0D4621E49/7.cache.js +1 -0
  135. data/public/jsme/deferredjs/D9A64F1634E29088B910B3E0D4621E49/8.cache.js +1 -0
  136. data/public/jsme/deferredjs/D9A64F1634E29088B910B3E0D4621E49/9.cache.js +1 -0
  137. data/public/jsme/gwt/.DS_Store +0 -0
  138. data/public/jsme/gwt/chrome/.DS_Store +0 -0
  139. data/public/jsme/jsa.css +10 -2
  140. data/public/jsme/jsme.devmode.js +1 -0
  141. data/public/jsme/jsme.nocache.js +27 -18
  142. data/views/batch.haml +74 -32
  143. data/views/details.haml +6 -2
  144. data/views/layout.haml +34 -25
  145. data/views/license.haml +1 -0
  146. data/views/model_details.haml +91 -67
  147. data/views/neighbors.haml +14 -35
  148. data/views/predict.haml +8 -5
  149. data/views/prediction.haml +79 -51
  150. data/views/style.scss +36 -9
  151. metadata +148 -93
  152. data/public/jsme/057C029061D565E59B91BCF8D80FA08E.cache.html +0 -651
  153. data/public/jsme/05B63F17C4ECC632F0004998FE93F0D9.cache.png +0 -0
  154. data/public/jsme/0D71BA88E8DB59E613D3BD042277F3CA.cache.html +0 -636
  155. data/public/jsme/143B86F220A77EA4A06DF2CE62EF455A.cache.html +0 -636
  156. data/public/jsme/1AFB129BECD672F835F8C27B14A9D8F2.cache.html +0 -619
  157. data/public/jsme/20865588BA1E58170CC8C13CEAD50C3C.cache.html +0 -615
  158. data/public/jsme/20B12D7884BFE17E1879B157A966B4D0.cache.html +0 -631
  159. data/public/jsme/222DCE3CD01E8F29C3D81A37CE3EC2B8.cache.html +0 -626
  160. data/public/jsme/230043C4988F4EECEF225437640D792F.cache.html +0 -625
  161. data/public/jsme/3014E46F5C6FB35E6CF0D7870071174B.cache.html +0 -615
  162. data/public/jsme/3F57AECC67986E796A3148265F038FF1.cache.html +0 -639
  163. data/public/jsme/469A5B5AE16905A2CD712E25B9517A14.cache.html +0 -644
  164. data/public/jsme/4722AB194B521805C997130865A7EE3D.cache.html +0 -638
  165. data/public/jsme/497588C27DED1A6E8FE1E0AB8417B414.cache.html +0 -626
  166. data/public/jsme/571D27D70DEF8240841DA5CAFC363CFF.cache.html +0 -619
  167. data/public/jsme/5F7FD5A5750634DF9F5480F2778D9CD7.cache.html +0 -651
  168. data/public/jsme/6187B195CC6073B1DB0A30F6CD64ACA3.cache.html +0 -620
  169. data/public/jsme/6DED0C7A48F0BB72DDB1FDE5C05E60B5.cache.html +0 -642
  170. data/public/jsme/73F66F1A578E65144682885B3DC28556.cache.html +0 -620
  171. data/public/jsme/76252DEA9FB0A670947525C4C89E2530.cache.html +0 -657
  172. data/public/jsme/84DE2DAB8AD49C4E122A548C4B072500.cache.html +0 -625
  173. data/public/jsme/98150D1CD230B36339E35812F0BD3D0E.cache.html +0 -629
  174. data/public/jsme/9BA3A5A02DFF97BADFD3F9FE3817341B.cache.html +0 -636
  175. data/public/jsme/9D58CD61900096C805154C0AC693DCE7.cache.html +0 -639
  176. data/public/jsme/A3D2B7C95C4FC47DB0996CBDF930EA17.cache.html +0 -657
  177. data/public/jsme/A6DF9CFFF55769DE62DA6868C558B3F2.cache.html +0 -629
  178. data/public/jsme/B70D7DA2E93A6B0FB7E5BC15540F7B15.cache.html +0 -645
  179. data/public/jsme/E07214401017B41AF0BDAB1EB811CC83.cache.html +0 -645
  180. data/public/jsme/E45DF2A61DB551567FA3454B1A00412D.cache.html +0 -631
  181. data/public/jsme/E97CDFD075EEB4D0578A219C5564A988.cache.html +0 -642
  182. data/public/jsme/EBCDA5C12B4318C17A4741474FB9D7CA.cache.html +0 -643
  183. data/public/jsme/hosted.html +0 -365
  184. data/views/faq_layout.haml +0 -67
  185. data/views/validation.haml +0 -16
@@ -1,8 +1,12 @@
1
+ :javascript
2
+ $(document).ready(function(){
3
+ addExternalLinks();
4
+ });
1
5
  %div.modal-body{:style=>"padding:10px;"}
2
6
  %button.close{ :type=>" button", data: { dismiss:"modal"}} ×
3
7
  %h3
4
8
  Names and synonyms:
5
- %img.img-responsive{:src=>"#{@compound.uri}/image", :alt=>"Compound image not available", :width=>"300px", :heigth=>"300px", :style=>"float:left;"}
9
+ %p= @compound.svg
6
10
  %p
7
11
  %b="SMILES:"
8
12
  %p= @smiles
@@ -19,6 +23,6 @@
19
23
  %hr
20
24
  %p{:style=>"padding-left:0.5em;"}
21
25
  / pubchem link
22
- %a.btn.btn-primary{:href=>"http://aop.in-silico.ch/", :title=>"Link opens in new window.", :alt=>"pubchem read across", :target=>"_blank"} PubChem read across
26
+ %a.btn.btn-primary{:href=>"http://aop.in-silico.ch/", :title=>"Link opens in new window.", :alt=>"pubchem read across", :rel=>"external"} PubChem read across
23
27
  %i (experimental)
24
28
  %br
@@ -15,45 +15,52 @@
15
15
  %script{:src=>"/javascripts/bootstrap.min.js"}
16
16
  %script{:src=>"/javascripts/jquery.tablesorter.min.js"}
17
17
  %script{:src=>"/javascripts/jquery.tablesorter.widgets.js"}
18
- %script{ :src=>"/javascripts/lazar-gui.js"}
18
+ %script{:src=>"/javascripts/lazar-gui.js"}
19
19
  %body
20
20
  %noscript
21
21
  %div{ :style=>"width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif"}
22
22
  Your web browser must have JavaScript enabled in order for this application to display correctly.
23
23
  %header.page-header
24
24
  %div.row
25
- %div.col-md-2
25
+ %div.col-md-3
26
26
  %a{:href=> to("/predict")}
27
- %img.media-object{:src=>"/images/IST_logo_s.png", :alt=>"logo", :width=>"150px", :heigth=>"150px", :style=>"margin:0 3em 0 2em;"}
28
- %div.col-md-8
29
- %h1.media-heading{:style=>"margin: 0 0 0 2em;"}
27
+ %img.media-object{:src=>"/images/IST_logo_s.png", :alt=>"logo", :width=>"150px", :heigth=>"150px"}
28
+ %div.col-md-6
29
+ %h1.media-heading
30
30
  lazar toxicity predictions
31
- %div.col-md-2
31
+ %div.col-md-3
32
32
  %h1.media-heading
33
33
  %small
34
- %a{:href=>"https://nano-lazar.in-silico.ch"} nano-lazar
34
+ %a{:href=>"https://nano-lazar.in-silico.ch", :rel=>"external"} nano-lazar
35
35
 
36
36
  %div.container-fluid
37
- %topline
37
+ %topline.alert
38
38
  %div.row
39
- %div.col-md-8
39
+ %div.col-md-10
40
40
  Problems, bugs, ideas for improvements ? Please report at our
41
41
  %a{:href => 'https://github.com/opentox/lazar-gui/issues', :rel => "external"} issue tracker
42
- or send us an email
43
- %a{ :href=>"mailto:info@in-silico.ch", :target=>"_top"}
42
+ , check out the
43
+ %a{:href=> to("/faq"), :rel => "external"} FAQ
44
+ page or send us an email.
45
+ %a{ :href=>"mailto:info@in-silico.ch?subject=[lazar v#{@version}]", :target=>"_top"}
44
46
  %img.share{:src=>"/images/Email.png"}
45
- (version #{@version}).
46
- %div.col-md-2
47
- %div.col-md-2
48
- %a{:href=>"https://twitter.com/intent/tweet?source=http%3A%2F%2Flazar.in-silico.ch&text=:%20http%3A%2F%2Flazar.in-silico.ch", :target=>"_blank", :title=>"Tweet"}
47
+ [version: #{@version}]
48
+ %div.col-md-2{:style=>"text-align:right;"}
49
+ %a{:href=>"https://twitter.com/intent/tweet?source=http%3A%2F%2Flazar.in-silico.ch&text=http%3A%2F%2Flazar.in-silico.ch", :rel=>"external", :title=>"Tweet"}
49
50
  %img.share{:src=>"/images/Twitter.png"}
50
- %a{:href=>"https://plus.google.com/share?url=http%3A%2F%2Flazar.in-silico.ch", :target=>"_blank", :title=>"Share on Google+"}
51
+ %a{:href=>"https://plus.google.com/share?url=http%3A%2F%2Flazar.in-silico.ch", :rel=>"external", :title=>"Share on Google+"}
51
52
  %img.share{:src=>"/images/Google+.png"}
52
- %a{:href=>"http://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Flazar.in-silico.ch&title=&summary=&source=http%3A%2F%2Flazar.in-silico.ch", :target=>"_blank", :title=>"Share on LinkedIn"}
53
+ %a{:href=>"http://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Flazar.in-silico.ch&title=&summary=&source=http%3A%2F%2Flazar.in-silico.ch", :rel=>"external", :title=>"Share on LinkedIn"}
53
54
  %img.share{:src=>"/images/LinkedIn.png"}
54
- %a{:href=>"https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Flazar.in-silico.ch&title=&summary=&source=http%3A%2F%2Flazar.in-silico.ch", :target=>"_blank", :title=>"Share on Facebook"}
55
+ %a{:href=>"https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Flazar.in-silico.ch&title=&summary=&source=http%3A%2F%2Flazar.in-silico.ch", :rel=>"external", :title=>"Share on Facebook"}
55
56
  %img.share{:src=>"/images/Facebook.png"}
56
-
57
+ %div.row
58
+ %div.col-md-12
59
+ Please cite
60
+ %a{ :href=>"https://doi.org/10.3389/fphar.2013.00038", :rel=>"external"}
61
+ %img{ :src=>"https://zenodo.org/badge/DOI/10.3389/zenodo.10.3389.svg", :alt=>"DOI"}
62
+ in scientific publications.
63
+
57
64
  :javascript
58
65
  $(document).ready(function(){
59
66
  $("#back-top").hide();
@@ -77,17 +84,19 @@
77
84
  %p.text-muted
78
85
  ©
79
86
  %a{:href => 'http://www.in-silico.ch', :rel => "external"} <i style="font-family: serife">in silico</i> toxicology gmbh 2004 - #{Time.now.year.to_s}
87
+ |
88
+ %a{:href => to("/license"), :rel => "external"} GPL3 License
80
89
  %supporters.col-md-12
81
- %p Financial support:
82
- %a{:href=>"http://www.bfr.bund.de/de/start.html", :target=>"_blank"}
90
+ %p Financial support by
91
+ %a{:href=>"http://www.bfr.bund.de/de/start.html", :rel=>"external"}
83
92
  %img{:src=>"/images/bfr_logo.gif"}
84
- %a{:href=>"http://www.opentox.org/", :target=>"_blank"}
93
+ %a{:href=>"http://www.opentox.org/", :rel=>"external"}
85
94
  %img{:src=>"/images/ot_logo.png"}
86
- %a{:href=>"https://enanomapper.net/", :target=>"_blank"}
95
+ %a{:href=>"https://enanomapper.net/", :rel=>"external"}
87
96
  %img{:src=>"/images/enm_logo.png"}
88
- %a{:href=>"https://www.researchgate.net/institution/Nestle_SA/department/Nestle_Research_Center", :target=>"_blank"}
97
+ %a{:href=>"https://www.researchgate.net/institution/Nestle_SA/department/Nestle_Research_Center", :rel=>"external"}
89
98
  %img{:src=>"/images/nestec.jpg"}
90
-
99
+
91
100
 
92
101
  #back-top{:style => "z-index:100;position:fixed;bottom:1%;right:1%;"}
93
102
  %a{:href => "", :style=>"text:decoration:none;color:#ccc;"}
@@ -0,0 +1 @@
1
+ = @license
@@ -1,26 +1,43 @@
1
1
  %b Model:
2
2
  %br
3
3
  Source:
4
- %a{:href=>model.source, :target=>"external"}
4
+ %a{:href=>model.source, :rel=>"external"}
5
5
  = model.source
6
6
  %br
7
7
  - model.classification? ? type = "Classification" : type = "Regression"
8
8
  = "Type:\t"
9
9
  = type
10
10
  %br
11
- - training_dataset = OpenTox::Dataset.find model.training_dataset.id
11
+ - training_dataset = OpenTox::Dataset.find model.model.training_dataset_id
12
12
  = "Training compounds:\t"
13
- = training_dataset.compounds.size
14
-
13
+ = training_dataset.data_entries.size
14
+ %br
15
+ = "Training dataset:\t"
16
+ %a{:href=>"#{to("/predict/dataset/#{training_dataset.name}")}"}
17
+ = training_dataset.name
18
+ %br
19
+ %b Algorithms:
20
+ %br
21
+ Similarity:
22
+ %a{:href=> "http://www.rubydoc.info/gems/lazar/OpenTox%2F#{model.model.algorithms["similarity"]["method"].sub("::", "%2F")}", :rel=>"external"}
23
+ = model.model.algorithms["similarity"]["method"]
24
+ = ", min: #{model.model.algorithms["similarity"]["min"]}"
25
+ %br
26
+ Prediction:
27
+ %a{:href=>"http://www.rubydoc.info/gems/lazar/OpenTox%2F#{model.model.algorithms["prediction"]["method"].sub("::","%2f")}", :rel=>"external"}
28
+ = model.model.algorithms["prediction"]["method"]
29
+ %br
30
+ Descriptors:
31
+ = model.model.algorithms["descriptors"]["method"]+","
32
+ = model.model.algorithms["descriptors"]["type"]
15
33
  %p
16
34
  - if type == "Classification"
17
35
  %b Independent crossvalidations:
18
36
  - else
19
37
  %b Independent crossvalidations (-log10 transformed):
20
38
  %div.row{:id=>"validations#{model.id}", :style=>"background-color:#f5f5f5;"}
21
- - model.crossvalidations.each do |crossvalidation|
39
+ - crossvalidations.each do |cv|
22
40
  %span.col-xs-4.col-sm-4.col-md-4.col-lg-4
23
- - cv = OpenTox::CrossValidation.find crossvalidation.id
24
41
  = "Num folds:\t"
25
42
  = cv.folds
26
43
  %br
@@ -34,76 +51,83 @@ Source:
34
51
  = "Accuracy:\t"
35
52
  = cv.accuracy.round(3) if cv.accuracy
36
53
  %br
37
- = "True positive rate:\t"
38
- = cv.true_rate["active"].round(3) if cv.true_rate["active"]
39
- %br
40
- = "True negative rate:\t"
41
- = cv.true_rate["inactive"].round(3) if cv.true_rate["inactive"]
42
- %br
43
- = "Positive predictive value:\t"
44
- = cv.predictivity["active"].round(3) if cv.predictivity["active"]
45
- %br
46
- = "Negative predictive value:\t"
47
- = cv.predictivity["inactive"].round(3) if cv.predictivity["inactive"]
54
+ = "Weighted accuracy:\t"
55
+ = cv.weighted_accuracy.round(3) if cv.weighted_accuracy
56
+ - if cv.true_rate
57
+ %br
58
+ = "True positive rate:\t"
59
+ = cv.true_rate[cv.accept_values[0]].round(3)
60
+ %br
61
+ = "True negative rate:\t"
62
+ = cv.true_rate[cv.accept_values[1]].round(3)
63
+ - if cv.predictivity
64
+ %br
65
+ = "Positive predictive value:\t"
66
+ = cv.predictivity[cv.accept_values[0]].round(3)
67
+ %br
68
+ = "Negative predictive value:\t"
69
+ = cv.predictivity[cv.accept_values[1]].round(3)
48
70
  %p
49
- %b Confusion Matrix:
50
- %table.table.table-condensed.table-borderless{:style=>"width:20%;"}
51
- %tbody
52
- %tr
53
- %td
54
- %td
55
- %td
56
- %b actual
57
- %td
58
- %td
59
- %tr
60
- %td
61
- %td
62
- %td active
63
- %td inactive
64
- -#%td total
65
- %tr
66
- %td
67
- %b predicted
68
- %td active
69
- %td
70
- =cv.confusion_matrix[0][0]
71
- %td
72
- =cv.confusion_matrix[0][1]
73
- -#%td
74
- =cv.confusion_matrix[0][0]+cv.confusion_matrix[0][1]
75
- %tr
76
- %td
77
- %td inactive
78
- %td
79
- =cv.confusion_matrix[1][0]
80
- %td
81
- =cv.confusion_matrix[1][1]
82
- -#%td
83
- =cv.confusion_matrix[1][0]+cv.confusion_matrix[1][1]
84
- -#%tr
85
- %td
86
- %td total
87
- %td
88
- =cv.confusion_matrix[0][0]+cv.confusion_matrix[1][0]
89
- %td
90
- =cv.confusion_matrix[0][1]+cv.confusion_matrix[1][1]
91
- %td
92
- -#= "Confusion Matrix:\t"
93
- -#= cv.confusion_matrix
71
+ - ["confusion_matrix", "weighted_confusion_matrix"].each_with_index do |matrix,idx|
72
+ %b= (idx == 0 ? "Confusion Matrix" : "Weighted Confusion Matrix")
73
+ %table.table.table-condensed.table-borderless{:style=>"width:20%;"}
74
+ %tbody
75
+ %tr
76
+ %td
77
+ %td
78
+ %td
79
+ %b actual
80
+ %td
81
+ %td
82
+ %tr
83
+ %td
84
+ %td
85
+ %td active
86
+ %td inactive
87
+ -#%td total
88
+ %tr
89
+ %td
90
+ %b predicted
91
+ %td active
92
+ %td
93
+ =( idx == 1 ? cv.send(matrix)[0][0].round(3) : cv.send(matrix)[0][0])
94
+ %td
95
+ =( idx == 1 ? cv.send(matrix)[0][1].round(3) : cv.send(matrix)[0][1])
96
+ -#%td
97
+ =cv.confusion_matrix[0][0]+cv.confusion_matrix[0][1]
98
+ %tr
99
+ %td
100
+ %td inactive
101
+ %td
102
+ =( idx == 1 ? cv.send(matrix)[1][0].round(3) : cv.send(matrix)[1][0])
103
+ %td
104
+ =( idx == 1 ? cv.send(matrix)[1][1].round(3) : cv.send(matrix)[1][1])
105
+ -#%td
106
+ =cv.confusion_matrix[1][0]+cv.confusion_matrix[1][1]
107
+ -#%tr
108
+ %td
109
+ %td total
110
+ %td
111
+ =cv.confusion_matrix[0][0]+cv.confusion_matrix[1][0]
112
+ %td
113
+ =cv.confusion_matrix[0][1]+cv.confusion_matrix[1][1]
114
+ %td
115
+ -#= "Confusion Matrix:\t"
116
+ -#= cv.confusion_matrix
117
+ %br
94
118
  %br
95
119
  /= "Confidence plot:"
96
120
  /%p.plot
97
121
  / %img{:src=>"confp#{cv.id}.svg"}
98
122
  - if model.regression?
99
123
  %br
100
- = "Root mean squared error:\t"
124
+ %a.ht5{:href=>"https://en.wikipedia.org/wiki/Root-mean-square_deviation", :rel=>"external"} RMSE:
101
125
  = cv.rmse.round(3) if cv.rmse
102
126
  %br
103
- = "Mean absolute error:\t"
127
+ %a.ht5{:href=>"https://en.wikipedia.org/wiki/Mean_absolute_error", :rel=>"external"} MAE:
104
128
  = cv.mae.round(3) if cv.mae
105
129
  %br
106
- = "R square:\t"
130
+ %a.ht5{:href=>"https://en.wikipedia.org/wiki/Coefficient_of_determination", :rel=>"external"}= "R"+"<sup>2</sup>"+":"
107
131
  = cv.r_squared.round(3) if cv.r_squared
108
132
  %br
109
133
  /= "Confidence plot:"
@@ -113,5 +137,5 @@ Source:
113
137
  /= "Correlation plot"
114
138
  /%p.plot
115
139
  / %img{:src=>"/corrp#{cv.id}.svg"}
116
-
117
- %br
140
+
141
+ %br
@@ -1,38 +1,17 @@
1
- / unpacks multi prediction array ;
2
- / prepare it for neighbors ;
3
- / align single prediction to endpoint ;
4
- / display preordered in table view ;
5
-
6
1
  %div.results
7
2
  %h3 Neighbors:
8
3
  / tabs div
9
4
  #tabs
10
5
  %ul.nav.nav-tabs.nav-justified{:id=>"neighborTabs", :role=>"tablist"}
11
- / each model a tab head ;
12
- / hash for predictionFeature
13
- - predictionFeature = {}
14
6
  - @models.each_with_index do |model,i|
15
7
  / get predictionFeature type
16
8
  - m = Model::Lazar.find model.model_id.to_s
17
- - predFeature = Feature.find m.prediction_feature_id.to_s
18
- / define feature type (numeric : nominal)
19
- - predFeatureType = (predFeature.numeric? ? "numeric" : "nominal")
20
- / use prediction feature id for neighbor compound features
21
- - predFeatureId = m.prediction_feature_id.to_s
22
- - predictionFeature[i] = {"id" => predFeatureId, "type" => predFeatureType}
23
9
  %li{:class => ("active" if i == 0)}
24
10
  %a{:href => "#results_#{i+1}", :id => "linkTab#{i+1}", data: {toggle:"tab"}}
25
11
  = "#{model.endpoint} (#{model.species})"
26
12
  %div.tab-content
27
- / unpack to single arrays
28
13
  - @predictions.each_with_index do |prediction,j|
29
- / pass model type for significant fragments view
30
14
  #results.tab-pane{:id=>"#{j+1}", :class => ("active" if j == 0)}
31
- / prepare dataset for neighbors table ;
32
- / delete first array which contains prediction ;
33
- / following arrays are the neighbor predictions ;
34
- / call the tablesorter plugin ;
35
- / presort by similarity ;
36
15
  :javascript
37
16
  $(document).ready(function(){
38
17
  $("table##{j+1}").tablesorter({
@@ -58,7 +37,7 @@
58
37
  widthFixed: false
59
38
  });
60
39
  });
61
- - if prediction[:neighbors].size > 0
40
+ - if prediction[:neighbors]
62
41
  %div.table-responsive
63
42
  %table{:id=>"#{j+1}", :style=>"border-style: solid;"}
64
43
  %thead
@@ -67,32 +46,32 @@
67
46
  Compound
68
47
  %th.sorter-false{:style =>"vertical-align:middle;"}
69
48
  Measured Activity
70
- %a.btn.glyphicon.glyphicon-info-sign{:href=>"#neighbors", :title=>"Measured Activity", :tabindex=>"0", data: {trigger:"focus", container:"body", toggle:"popover", placement:"left", html:"true", content:"Experimental result(s) from the training dataset."}, :style=>"z-index:auto+10;"}
49
+ %a.btn.glyphicon.glyphicon-info-sign{:href=>"javascript:void(0)", :title=>"Measured Activity", :tabindex=>"0", data: {trigger:"focus", container:"body", toggle:"popover", placement:"auto", html:"true", content:"Experimental result(s) from the training dataset."}, :style=>"z-index:auto+10;"}
71
50
  %th.sorter-false{:style =>"vertical-align:middle;"}
72
51
  Similarity
73
- %a.btn.glyphicon.glyphicon-info-sign{:href=>"#neighbors", :title=>"Similarity", :tabindex=>"0", data: {trigger:"focus", container:"body", toggle:"popover", placement:"left", html:"true", content:"<a href=\"https://en.wikipedia.org/wiki/Jaccard_index\">Tanimoto/Jaccard</a> similarity based on <a href=\"https://openbabel.org/docs/dev/FileFormats/MolPrint2D_format.html\">Molprint2D</a> fingerprints."}, :style=>"z-index:auto+10;"}
74
- / %th{:style =>"vertical-align:middle;"}
75
- / Supporting Information
52
+ %a.btn.glyphicon.glyphicon-info-sign{:href=>"javascript:void(0)", :title=>"Similarity", :tabindex=>"0", data: {trigger:"focus", container:"body", toggle:"popover", placement:"auto", html:"true", content:"<a alt=\"Link opens in new window.\" title=\"Link opens in new window.\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Jaccard_index\">Tanimoto/Jaccard</a> similarity based on <a alt=\"Link opens in new window.\" title=\"Link opens in new window.\" target=\"_blank\" href=\"https://openbabel.org/docs/dev/FileFormats/MolPrint2D_format.html\">Molprint2D</a> fingerprints."}, :style=>"z-index:auto+10;"}
76
53
  %tbody
77
54
  - type = @model_types[j]
78
55
  - unit = @models[j].unit
79
56
  - prediction[:neighbors].uniq.each_with_index do |neighbor,count|
80
57
  %tr
81
58
  / Compound
82
- - c = Compound.find(neighbor["_id"])
59
+ - c = Compound.find(neighbor)
83
60
  %td{:style =>"vertical-align:middle;padding-left:1em;width:50%;"}
84
- /%a.btn.btn-link{:href => "#details#{j+1}", data: { toggle: "modal", remote: to("/prediction/#{CGI.escape(neighbor["_id"])}/details"), :id=>"link#{j+1}#{count}"}}
85
- %p= c.svg
61
+ %a.btn.btn-link{:href => "#details#{j+1}", data: { toggle: "modal", remote: to("/prediction/#{CGI.escape(c.id.to_s)}/details"), :id=>"link#{j+1}#{count}"}}
62
+ = c.svg
86
63
  %p= c.smiles
87
- - mw = c.molecular_weight
88
- / Measured Activity = compound.features
64
+
65
+ / Measured Activity
89
66
  %td{:style =>"vertical-align:middle;padding-left:1em;width:20%;white-space:nowrap;"}
90
- - features = c.features.collect{|k,v| v if k == predictionFeature[j]["id"] }.compact.flatten
91
- = (predictionFeature[j]["type"] == "numeric") ? features.collect{|v| weight = c.mmol_to_mg(v); '%.2e' % v + " (#{@models[j].unit})"+" , #{'%.2e' % weight} #{(unit == "mmol/L") ? "(mg/L)" : "(mg/kg_bw/day)"}"}.join("</br>") : features.join("</br>")
67
+ - if neighbor[:measurement].is_a?(Array)
68
+ = (type == "Regression") ? neighbor[:measurement].collect{|value| "#{value.delog10.signif(3)} (#{unit})</br>#{c.mmol_to_mg(value.delog10).signif(3)} #{unit =~ /mmol\/L/ ? "(mg/L)" : "(mg/kg_bw/day)"}"}.join("</br>") : neighbor[:measurement].join(", ")
69
+ - else
70
+ - if !neighbor[:measurement].nil?
71
+ = (type == "Regression") ? "#{neighbor[:measurement].delog10.signif(3)} (#{unit})</br>#{c.mmol_to_mg(neighbor[:measurement].delog10).signif(3)} #{(unit =~ /\b(mol\/L)\b/) ? "(mg/L)" : "(mg/kg_bw/day)"}" : neighbor[:measurement]
92
72
  / Similarity = tanimoto
93
73
  %td{:style =>"vertical-align:middle;padding-left:1em;width:20%;"}
94
- / TODO differentiate between no neighbors found and compound found in dataset, display neighbors for compounds in dataset?
95
- = neighbor[:tanimoto] != nil ? neighbor[:tanimoto].to_f.round(3) : "Not enough similar compounds </br>in training dataset."
74
+ = neighbor[:similarity].round(3)
96
75
 
97
76
  - else
98
77
  %span.btn.btn-default.disabled
@@ -111,7 +111,7 @@
111
111
  };
112
112
 
113
113
  // whole site content needs to be in one form. Input and checkboxes are proofed by js functions.
114
- %form{:name => "form", :action => to('/predict'), :method => "post", :enctype => "multipart/form-data", :onsubmit => "return !!(showcircle())" }
114
+ %form{:name => "form", :action => to('/predict'), :method => "post", :enctype => "multipart/form-data", :onsubmit => "return !!(showcircle())" }
115
115
  %fieldset#top.well
116
116
  %h2 1. Draw a chemical structure
117
117
  #insert
@@ -125,11 +125,13 @@
125
125
  %br
126
126
  %input{:type => 'text', :name => 'identifier', :id => 'identifier', :size => '60'}
127
127
  %p
128
- %label{:for=>"fileselect"}
128
+ -#%label{:for=>"fileselect"}
129
129
  or upload a CSV file for batch predictions (disabled in public version)
130
- %br
131
- %span.btn.btn-default.btn-file
132
- %input{:type=>"file", :name=> "fileselect", :id=>"fileselect", :accept=>"text/csv", :disabled=>"disabled"}
130
+ -#%a.btn.glyphicon.glyphicon-info-sign{:href=>"javascript:void(0)", :title=>"File format", :tabindex=>"0", data: {trigger:"focus", toggle:"popover", placement:"auto", html:"true", content:"One column with compounds and keyword SMILES or InChI in the first row."}}
131
+ -#%br
132
+ -#%span.btn.btn-default.btn-file
133
+ -#%input{:type=>"file", :name=> "fileselect", :id=>"fileselect", :accept=>"text/csv", :disabled=>"disabled"}
134
+ %input{:type=>"hidden", :name=> "fileselect", :id=>"fileselect", :accept=>"text/csv", :disabled=>"disabled"}
133
135
 
134
136
  %fieldset#middle.well
135
137
  %h2 2. Select one or more endpoints
@@ -162,6 +164,7 @@
162
164
  document.getElementById("details#{model.id}").appendChild(details);
163
165
  $(button).show();
164
166
  $(image).hide();
167
+ addExternalLinks();
165
168
  });
166
169
  }
167
170
  }