sequenceserver 0.8.9 → 1.0.0.pre.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sequenceserver might be problematic. Click here for more details.

Files changed (213) hide show
  1. checksums.yaml +4 -4
  2. data/{README.txt → README.md} +2 -0
  3. data/bin/sequenceserver +255 -55
  4. data/config.ru +2 -4
  5. data/lib/sequenceserver.rb +293 -447
  6. data/lib/sequenceserver/blast.rb +464 -64
  7. data/lib/sequenceserver/database.rb +185 -19
  8. data/lib/sequenceserver/links.rb +114 -0
  9. data/lib/sequenceserver/logger.rb +27 -0
  10. data/lib/sequenceserver/sequence.rb +141 -0
  11. data/public/css/bootstrap.min.css +8 -413
  12. data/public/css/custom.css +363 -122
  13. data/public/css/font-awesome.min.css +4 -0
  14. data/public/fonts/FontAwesome.otf +0 -0
  15. data/public/fonts/fontawesome-webfont.eot +0 -0
  16. data/public/fonts/fontawesome-webfont.svg +565 -0
  17. data/public/fonts/fontawesome-webfont.ttf +0 -0
  18. data/public/fonts/fontawesome-webfont.woff +0 -0
  19. data/public/fonts/fontawesome-webfont.woff2 +0 -0
  20. data/public/js/bootstrap.min.js +11 -0
  21. data/public/js/d3.v3.min.js +5 -0
  22. data/public/js/html5shiv.min.js +4 -0
  23. data/public/js/jquery.scrollspy.js +74 -0
  24. data/public/js/jquery.t.js +353 -0
  25. data/public/js/sequence.js +2419 -0
  26. data/public/js/sequenceserver.blast.js +29 -30
  27. data/public/js/sequenceserver.js +544 -120
  28. data/public/js/underscore.min.js +6 -0
  29. data/public/js/webshims/polyfiller.js +1 -0
  30. data/public/js/webshims/shims/FlashCanvas/canvas2png.js +1 -0
  31. data/public/js/webshims/shims/FlashCanvas/flashcanvas.js +1 -0
  32. data/public/js/webshims/shims/FlashCanvas/flashcanvas.swf +0 -0
  33. data/public/js/webshims/shims/FlashCanvasPro/canvas2png.js +1 -0
  34. data/public/js/webshims/shims/FlashCanvasPro/flash10canvas.swf +0 -0
  35. data/public/js/webshims/shims/FlashCanvasPro/flash9canvas.swf +0 -0
  36. data/public/js/webshims/shims/FlashCanvasPro/flashcanvas.js +1 -0
  37. data/public/js/webshims/shims/canvas-blob.js +1 -0
  38. data/public/js/webshims/shims/color-picker.js +2 -0
  39. data/public/js/webshims/shims/combos/1.js +6 -0
  40. data/public/js/webshims/shims/combos/10.js +2 -0
  41. data/public/js/webshims/shims/combos/11.js +2 -0
  42. data/public/js/webshims/shims/combos/12.js +6 -0
  43. data/public/js/webshims/shims/combos/13.js +1 -0
  44. data/public/js/webshims/shims/combos/14.js +1 -0
  45. data/public/js/webshims/shims/combos/15.js +2 -0
  46. data/public/js/webshims/shims/combos/16.js +7 -0
  47. data/public/js/webshims/shims/combos/17.js +2 -0
  48. data/public/js/webshims/shims/combos/18.js +3 -0
  49. data/public/js/webshims/shims/combos/2.js +7 -0
  50. data/public/js/webshims/shims/combos/21.js +2 -0
  51. data/public/js/webshims/shims/combos/22.js +1 -0
  52. data/public/js/webshims/shims/combos/23.js +6 -0
  53. data/public/js/webshims/shims/combos/25.js +2 -0
  54. data/public/js/webshims/shims/combos/27.js +1 -0
  55. data/public/js/webshims/shims/combos/28.js +1 -0
  56. data/public/js/webshims/shims/combos/29.js +1 -0
  57. data/public/js/webshims/shims/combos/3.js +1 -0
  58. data/public/js/webshims/shims/combos/30.js +2 -0
  59. data/public/js/webshims/shims/combos/31.js +1 -0
  60. data/public/js/webshims/shims/combos/33.js +1 -0
  61. data/public/js/webshims/shims/combos/34.js +1 -0
  62. data/public/js/webshims/shims/combos/4.js +1 -0
  63. data/public/js/webshims/shims/combos/5.js +2 -0
  64. data/public/js/webshims/shims/combos/6.js +2 -0
  65. data/public/js/webshims/shims/combos/7.js +7 -0
  66. data/public/js/webshims/shims/combos/8.js +7 -0
  67. data/public/js/webshims/shims/combos/9.js +2 -0
  68. data/public/js/webshims/shims/combos/97.js +1 -0
  69. data/public/js/webshims/shims/combos/98.js +1 -0
  70. data/public/js/webshims/shims/combos/99.js +1 -0
  71. data/public/js/webshims/shims/details.js +1 -0
  72. data/public/js/webshims/shims/dom-extend.js +1 -0
  73. data/public/js/webshims/shims/es5.js +1 -0
  74. data/public/js/webshims/shims/es6.js +1 -0
  75. data/public/js/webshims/shims/excanvas.js +1 -0
  76. data/public/js/webshims/shims/filereader-xhr.js +1 -0
  77. data/public/js/webshims/shims/form-combat.js +1 -0
  78. data/public/js/webshims/shims/form-core.js +1 -0
  79. data/public/js/webshims/shims/form-datalist-lazy.js +1 -0
  80. data/public/js/webshims/shims/form-datalist.js +1 -0
  81. data/public/js/webshims/shims/form-fixrangechange.js +1 -0
  82. data/public/js/webshims/shims/form-inputmode.js +1 -0
  83. data/public/js/webshims/shims/form-message.js +1 -0
  84. data/public/js/webshims/shims/form-native-extend.js +1 -0
  85. data/public/js/webshims/shims/form-number-date-api.js +1 -0
  86. data/public/js/webshims/shims/form-number-date-ui.js +1 -0
  87. data/public/js/webshims/shims/form-shim-extend.js +1 -0
  88. data/public/js/webshims/shims/form-shim-extend2.js +1 -0
  89. data/public/js/webshims/shims/form-validation.js +1 -0
  90. data/public/js/webshims/shims/form-validators.js +1 -0
  91. data/public/js/webshims/shims/forms-picker.js +1 -0
  92. data/public/js/webshims/shims/geolocation.js +1 -0
  93. data/public/js/webshims/shims/i18n/formcfg-ar.js +1 -0
  94. data/public/js/webshims/shims/i18n/formcfg-ch-CN.js +1 -0
  95. data/public/js/webshims/shims/i18n/formcfg-cs.js +1 -0
  96. data/public/js/webshims/shims/i18n/formcfg-de.js +1 -0
  97. data/public/js/webshims/shims/i18n/formcfg-el.js +1 -0
  98. data/public/js/webshims/shims/i18n/formcfg-en.js +1 -0
  99. data/public/js/webshims/shims/i18n/formcfg-es.js +1 -0
  100. data/public/js/webshims/shims/i18n/formcfg-fa.js +1 -0
  101. data/public/js/webshims/shims/i18n/formcfg-fr.js +1 -0
  102. data/public/js/webshims/shims/i18n/formcfg-he.js +1 -0
  103. data/public/js/webshims/shims/i18n/formcfg-hi.js +1 -0
  104. data/public/js/webshims/shims/i18n/formcfg-hu.js +1 -0
  105. data/public/js/webshims/shims/i18n/formcfg-it.js +1 -0
  106. data/public/js/webshims/shims/i18n/formcfg-ja.js +1 -0
  107. data/public/js/webshims/shims/i18n/formcfg-lt.js +1 -0
  108. data/public/js/webshims/shims/i18n/formcfg-nl.js +1 -0
  109. data/public/js/webshims/shims/i18n/formcfg-pl.js +1 -0
  110. data/public/js/webshims/shims/i18n/formcfg-pt-BR.js +1 -0
  111. data/public/js/webshims/shims/i18n/formcfg-pt-PT.js +1 -0
  112. data/public/js/webshims/shims/i18n/formcfg-pt.js +1 -0
  113. data/public/js/webshims/shims/i18n/formcfg-ru.js +1 -0
  114. data/public/js/webshims/shims/i18n/formcfg-sv.js +1 -0
  115. data/public/js/webshims/shims/i18n/formcfg-zh-CN.js +1 -0
  116. data/public/js/webshims/shims/i18n/formcfg-zh-TW.js +1 -0
  117. data/public/js/webshims/shims/jme/alternate-media.js +1 -0
  118. data/public/js/webshims/shims/jme/base.js +1 -0
  119. data/public/js/webshims/shims/jme/controls.css +1 -0
  120. data/public/js/webshims/shims/jme/jme.eot +0 -0
  121. data/public/js/webshims/shims/jme/jme.svg +36 -0
  122. data/public/js/webshims/shims/jme/jme.ttf +0 -0
  123. data/public/js/webshims/shims/jme/jme.woff +0 -0
  124. data/public/js/webshims/shims/jme/mediacontrols-lazy.js +1 -0
  125. data/public/js/webshims/shims/jme/mediacontrols.js +1 -0
  126. data/public/js/webshims/shims/jme/playlist.js +1 -0
  127. data/public/js/webshims/shims/jpicker/images/AlphaBar.png +0 -0
  128. data/public/js/webshims/shims/jpicker/images/Bars.png +0 -0
  129. data/public/js/webshims/shims/jpicker/images/Maps.png +0 -0
  130. data/public/js/webshims/shims/jpicker/images/NoColor.png +0 -0
  131. data/public/js/webshims/shims/jpicker/images/bar-opacity.png +0 -0
  132. data/public/js/webshims/shims/jpicker/images/map-opacity.png +0 -0
  133. data/public/js/webshims/shims/jpicker/images/mappoint.gif +0 -0
  134. data/public/js/webshims/shims/jpicker/images/picker.gif +0 -0
  135. data/public/js/webshims/shims/jpicker/images/preview-opacity.png +0 -0
  136. data/public/js/webshims/shims/jpicker/images/rangearrows.gif +0 -0
  137. data/public/js/webshims/shims/jpicker/jpicker.css +1 -0
  138. data/public/js/webshims/shims/matchMedia.js +3 -0
  139. data/public/js/webshims/shims/mediacapture-picker.js +1 -0
  140. data/public/js/webshims/shims/mediacapture.js +1 -0
  141. data/public/js/webshims/shims/mediaelement-core.js +1 -0
  142. data/public/js/webshims/shims/mediaelement-debug.js +1 -0
  143. data/public/js/webshims/shims/mediaelement-jaris.js +1 -0
  144. data/public/js/webshims/shims/mediaelement-native-fix.js +1 -0
  145. data/public/js/webshims/shims/mediaelement-yt.js +1 -0
  146. data/public/js/webshims/shims/moxie/flash/Moxie.cdn.swf +0 -0
  147. data/public/js/webshims/shims/moxie/flash/Moxie.min.swf +0 -0
  148. data/public/js/webshims/shims/moxie/js/moxie-html4.js +3 -0
  149. data/public/js/webshims/shims/moxie/js/moxie-swf.js +2 -0
  150. data/public/js/webshims/shims/picture.js +1 -0
  151. data/public/js/webshims/shims/plugins/jquery.ui.position.js +11 -0
  152. data/public/js/webshims/shims/range-ui.js +1 -0
  153. data/public/js/webshims/shims/sizzle.js +11 -0
  154. data/public/js/webshims/shims/sticky.js +1 -0
  155. data/public/js/webshims/shims/styles/color-picker.png +0 -0
  156. data/public/js/webshims/shims/styles/forms-ext.css +1 -0
  157. data/public/js/webshims/shims/styles/forms-picker.css +1 -0
  158. data/public/js/webshims/shims/styles/progress.gif +0 -0
  159. data/public/js/webshims/shims/styles/progress.png +0 -0
  160. data/public/js/webshims/shims/styles/shim-ext.css +1 -0
  161. data/public/js/webshims/shims/styles/shim.css +1 -0
  162. data/public/js/webshims/shims/styles/transparent.png +0 -0
  163. data/public/js/webshims/shims/styles/widget.eot +0 -0
  164. data/public/js/webshims/shims/styles/widget.svg +12 -0
  165. data/public/js/webshims/shims/styles/widget.ttf +0 -0
  166. data/public/js/webshims/shims/styles/widget.woff +0 -0
  167. data/public/js/webshims/shims/swf/JarisFLVPlayer.swf +0 -0
  168. data/public/js/webshims/shims/swfmini-embed.js +1 -0
  169. data/public/js/webshims/shims/swfmini.js +6 -0
  170. data/public/js/webshims/shims/track-ui.js +1 -0
  171. data/public/js/webshims/shims/track.js +1 -0
  172. data/public/js/webshims/shims/url.js +1 -0
  173. data/public/js/webshims/shims/usermedia-core.js +1 -0
  174. data/public/js/webshims/shims/usermedia-shim.js +1 -0
  175. data/sequenceserver.gemspec +16 -13
  176. data/views/400.erb +28 -0
  177. data/views/500.erb +35 -19
  178. data/views/_options.erb +6 -15
  179. data/views/result.erb +218 -0
  180. data/views/search.erb +354 -151
  181. metadata +254 -62
  182. data/example.config.yml +0 -39
  183. data/lib/sequenceserver/customisation.rb +0 -60
  184. data/lib/sequenceserver/database_formatter.rb +0 -190
  185. data/lib/sequenceserver/helpers.rb +0 -136
  186. data/lib/sequenceserver/sequencehelpers.rb +0 -93
  187. data/lib/sequenceserver/sinatralikeloggerformatter.rb +0 -12
  188. data/lib/sequenceserver/version.rb +0 -9
  189. data/public/css/beige.css.css +0 -254
  190. data/public/css/bootstrap.dropdown.css +0 -29
  191. data/public/css/bootstrap.icons.css +0 -155
  192. data/public/css/bootstrap.modal.css +0 -28
  193. data/public/js/bootstrap.dropdown.js +0 -92
  194. data/public/js/bootstrap.modal.js +0 -7
  195. data/public/js/bootstrap.transition.js +0 -7
  196. data/public/js/jquery-scrollspy.js +0 -98
  197. data/public/js/jquery.activity.js +0 -10
  198. data/public/js/jquery.enablePlaceholder.min.js +0 -10
  199. data/public/js/store.min.js +0 -2
  200. data/public/sequence.html +0 -28
  201. data/tests/database/nucleotide/Sinvicta2-2-3.cdna.subset.fasta +0 -5486
  202. data/tests/database/nucleotide/Sinvicta2-2-3.cdna.subset.fasta.nhr +0 -0
  203. data/tests/database/nucleotide/Sinvicta2-2-3.cdna.subset.fasta.nin +0 -0
  204. data/tests/database/nucleotide/Sinvicta2-2-3.cdna.subset.fasta.nsq +0 -0
  205. data/tests/database/protein/Sinvicta2-2-3.prot.subset.fasta +0 -6449
  206. data/tests/database/protein/Sinvicta2-2-3.prot.subset.fasta.phr +0 -0
  207. data/tests/database/protein/Sinvicta2-2-3.prot.subset.fasta.pin +0 -0
  208. data/tests/database/protein/Sinvicta2-2-3.prot.subset.fasta.psq +0 -0
  209. data/tests/run +0 -26
  210. data/tests/test_sequencehelpers.rb +0 -77
  211. data/tests/test_sequenceserver_blast.rb +0 -60
  212. data/tests/test_ui.rb +0 -104
  213. data/tests/ui.specs.todo +0 -10
data/views/search.erb CHANGED
@@ -4,215 +4,418 @@
4
4
  <title>SequenceServer: Custom BLAST Server</title>
5
5
  <meta name="author" content="Anurag Priyam" />
6
6
  <meta name="author" content="Ben J. Woodcroft" />
7
+ <meta name="author" content="Vivek Rai" />
7
8
  <meta name="author" content="Yannick Wurm" />
8
9
  <meta name="author" content="Cedric Wurm" />
9
10
  <meta name="description" content="Custom BLAST server provided by SequenceServer (http://www.sequenceserver.com)"/>
10
11
  <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
11
- <script type="text/javascript" src="<%= uri('/js/store.min.js') %>"></script>
12
- <script type="text/javascript" src="<%= uri('/js/jquery.js') %>"></script>
13
- <script type="text/javascript" src="<%= uri('/js/jquery-ui.js') %>"></script>
14
- <script type="text/javascript" src="<%= uri('/js/jquery.enablePlaceholder.min.js') %>"></script>
15
- <script type="text/javascript" src="<%= uri('/js/jquery.activity.js') %>"></script>
16
- <script type="text/javascript" src="<%= uri('/js/jquery-scrollspy.js') %>"></script>
17
- <script type="text/javascript" src="<%= uri('/js/bootstrap.transition.js') %>"></script>
18
- <script type="text/javascript" src="<%= uri('/js/bootstrap.dropdown.js') %>"></script>
19
- <script type="text/javascript" src="<%= uri('/js/bootstrap.modal.js') %>"></script>
20
- <script type="text/javascript" src="<%= uri('/js/sequenceserver.js') %>"></script>
21
- <script type="text/javascript" src="<%= uri('/js/sequenceserver.blast.js') %>"></script>
22
-
23
- <%# without a space after erb's closing tag, a / gets appended to css' path %>
24
- <link rel="stylesheet" media="screen" type="text/css" href="<%= uri('/css/bootstrap.min.css') %>" />
25
- <link rel="stylesheet" media="screen" type="text/css" href="<%= uri('/css/bootstrap.dropdown.css') %>" />
26
- <link rel="stylesheet" media="screen" type="text/css" href="<%= uri('/css/bootstrap.modal.css') %>" />
27
- <link rel="stylesheet" media="screen" type="text/css" href="<%= uri('/css/bootstrap.icons.css') %>" />
28
- <link rel="stylesheet" media="screen" type="text/css" href="<%= uri('/css/custom.css') %>" />
12
+
13
+ <!--[if lt IE 9]>
14
+ <script src="js/html5shiv.js"></script>
15
+ <![endif]-->
16
+
17
+ <link href='http://fonts.googleapis.com/css?family=Roboto:400' rel='stylesheet' type='text/css'>
18
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
19
+ <link rel="stylesheet" media="screen" type="text/css" href="css/bootstrap.min.css"/>
20
+ <link rel="stylesheet" media="screen" type="text/css" href="css/font-awesome.min.css"/>
21
+ <link rel="stylesheet" media="screen" type="text/css" href="css/custom.css"/>
29
22
  </head>
30
23
 
31
24
  <body>
32
- <div class="container">
25
+ <div
26
+ class="navbar">
27
+ <div
28
+ class="container">
29
+ <a
30
+ class="navbar-brand"
31
+ href="http://sequenceserver.com" target="_blank">
32
+ SequenceServer
33
+ <small>
34
+ BLAST searching made easy!
35
+ </small>
36
+ </a>
37
+ </div>
38
+ </div>
39
+
40
+ <div
41
+ class="dnd-overlay"
42
+ style="display: none;">
43
+ <div
44
+ class="container dnd-overlay-container">
45
+ <div
46
+ class="row">
47
+ <div
48
+ class="col-md-offset-2 col-md-10">
49
+ <p
50
+ class="dnd-overlay-drop"
51
+ style="display: none;">
52
+ <i class="fa fa-2x fa-file-o"></i>
53
+ Drop query sequence file here
54
+ </p>
55
+ <p
56
+ class="dnd-overlay-overwrite"
57
+ style="display: none;">
58
+ <i class="fa fa-2x fa-file-o"></i>
59
+ <span style="color: red;">Overwrite</span> query sequence file
60
+ </p>
61
+
62
+ <div
63
+ class="dnd-errors">
64
+ <div
65
+ class="dnd-error"
66
+ id="dnd-multi-notification"
67
+ style="display: none;">
68
+ <div
69
+ class="col-md-6 col-md-offset-3">
70
+ One file at a time please.
71
+ </div>
72
+ </div>
73
+
74
+ <div
75
+ class="dnd-error"
76
+ id="dnd-large-file-notification"
77
+ style="display: none;">
78
+ <div
79
+ class="col-md-6 col-md-offset-3">
80
+ Too big a file. Can only do less than 10 MB. &gt;_&lt;
81
+ </div>
82
+ </div>
83
+
84
+ <div
85
+ class="dnd-error"
86
+ id="dnd-format-notification"
87
+ style="display: none;">
88
+ <div
89
+ class="col-md-6 col-md-offset-3">
90
+ Only FASTA files please.
91
+ </div>
92
+ </div>
93
+ </div>
94
+ </div>
95
+ </div>
96
+ </div>
97
+ </div>
98
+
99
+ <div
100
+ class="container">
33
101
  <noscript>
34
- <div class="nojs-error">
102
+ <div
103
+ class="nojs-error">
35
104
  <h3>SequenceServer can't work without JavaScript.</h3>
36
- <ul>
37
- <li>Please see if you can enable JavaScript in your browser's preferences.</li>
38
- <li>If your browser doesn't support JavaScript, please consider upgrading to the latest version or using Firefox or Chrome.</li>
39
- </ul>
105
+ <ul>
106
+ <li>Please see if you can enable JavaScript in your browser's preferences.</li>
107
+ <li>If your browser doesn't support JavaScript, please consider upgrading to the latest version or using Firefox or Chrome.</li>
108
+ </ul>
40
109
  </div>
41
110
  </noscript>
42
111
 
43
- <div class="page">
44
- <div id="banner">
45
- <h1>BLAST Sequence(s)</h1>
46
- </div>
47
-
48
- <form method="post" id="blast" action="<%= uri('/#result') %>">
49
- <div class="row">
50
- <div class="span16">
51
- <div class="control-group">
52
- <textarea name="sequence" id="sequence" spellcheck="false" autofocus="true" placeholder="Paste your sequence(s) here..." ></textarea>
53
- </div>
112
+ <form
113
+ class="form-horizontal" id="blast"
114
+ method="post" action="#result">
115
+ <div
116
+ class="form-group">
117
+ <div
118
+ class="col-md-12">
119
+ <div
120
+ class="sequence-controls hidden">
121
+ <button
122
+ type="button"
123
+ class="btn btn-sm btn-default" id="btn-sequence-clear"
124
+ title="Clear query sequence(s).">
125
+ <span id="sequence-file"></span>
126
+ <i class="fa fa-times"></i>
127
+ </button>
128
+ </div>
129
+ <div
130
+ class="sequence">
131
+ <textarea
132
+ class="form-control text-monospace" name="sequence" id="sequence"
133
+ rows="10"
134
+ autofocus="true"
135
+ spellcheck="false"
136
+ placeholder="Paste query sequence(s) or drag file containing query sequence(s) here ..." ></textarea>
54
137
  </div>
55
138
  </div>
139
+ </div>
56
140
 
57
- <div class="notifications">
58
- <div class="notification alert-info hide" id="nucleotide-sequence-notification">
141
+ <div
142
+ class="notifications">
143
+ <div
144
+ class="notification"
145
+ id="nucleotide-sequence-notification"
146
+ style="display: none;">
147
+ <div
148
+ class="alert-info col-md-6 col-md-offset-3">
59
149
  Detected: nucleotide sequence(s).
60
150
  </div>
151
+ </div>
61
152
 
62
- <div class="notification alert-info hide" id="protein-sequence-notification">
153
+ <div
154
+ class="notification"
155
+ id="protein-sequence-notification"
156
+ style="display: none;">
157
+ <div
158
+ class="alert-info col-md-6 col-md-offset-3">
63
159
  Detected: protein sequence(s).
64
160
  </div>
161
+ </div>
65
162
 
66
- <div class="notification alert-error hide" id="mixed-sequence-notification">
163
+ <div
164
+ class="notification"
165
+ id="mixed-sequence-notification"
166
+ style="display: none;">
167
+ <div
168
+ class="alert-danger col-md-10 col-md-offset-1">
67
169
  Detected: mixed nucleotide and protein sequences. We can't handle that. Please try one sequence at a time.
68
170
  </div>
69
171
  </div>
70
172
 
71
- <br class="large"/>
173
+ </div>
72
174
 
73
- <div class="row">
74
- <div class="span8">
75
- <div class="offset-left box databases nucleotide">
76
- <div class="clearfix">
77
- <fieldset>
78
- <legend>Nucleotide databases</legend>
79
- <div class="controls offset-left">
80
- <% settings.databases.values.select{|database| database.type == :nucleotide}.sort.each do |database| %>
81
- <label class="checkbox">
82
- <input type="checkbox" name="databases[]" value="<%=database.hash%>" data-type="<%=database.type%>" />
83
- <span> <%= database.title or database.name %></span>
84
- </label>
85
- <% end %>
86
- </div>
87
- </fieldset>
175
+ <div
176
+ class="form-group databases-container">
177
+ <%# sort => same ordering of nucleotide and protein datbases %>
178
+ <% databases.keys.sort.each do |type| %>
179
+ <div
180
+ class="<%= databases[(databases.keys - [type]).first] ? 'col-md-6' : 'col-md-12' %>">
181
+ <div
182
+ class="panel panel-default">
183
+ <div
184
+ class="panel-heading">
185
+ <h4><%= type.capitalize %> databases</h4>
88
186
  </div>
187
+ <ul
188
+ class="list-group databases <%= type %>">
189
+ <% databases[type].sort_by(&:title).each do |database| %>
190
+ <li class="list-group-item">
191
+ <div
192
+ class="checkbox">
193
+ <label>
194
+ <input type="checkbox" name="databases[]" value="<%=database.id%>" data-type="<%=database.type%>" />
195
+ <%= database.title or database.name %>
196
+ </label>
197
+ </div>
198
+ </li>
199
+ <% end %>
200
+ </ul>
89
201
  </div>
90
202
  </div>
203
+ <% end %>
204
+ </div>
91
205
 
92
- <div class="span8">
93
- <div class="offset-right box databases protein">
94
- <div class="clearfix">
95
- <fieldset>
96
- <legend>Protein databases</legend>
97
- <div class="controls offset-left">
98
- <% settings.databases.values.select{|database| database.type == :protein}.sort.each do |database| %>
99
- <label class="checkbox">
100
- <input type="checkbox" name="databases[]" value="<%=database.hash%>" data-type="<%=database.type%>" />
101
- <span> <%= database.title or database.name %></span>
102
- </label>
103
- <% end %>
104
- </div>
105
- </fieldset>
106
- </div>
206
+ <div
207
+ class="form-group">
208
+ <div
209
+ class="col-md-8">
210
+ <div
211
+ class="form-group advanced">
212
+ <label
213
+ class="col-md-3 control-label"
214
+ for="advanced">
215
+ Advanced Parameters:
216
+ </label>
217
+ <div
218
+ class="col-md-9 input-group">
219
+ <input
220
+ type="text"
221
+ class="form-control" name="advanced" id="advanced"
222
+ title="View, and enter advanced parameters."
223
+ placeholder="eg: -evalue 1.0e-5 -num_alignments 100"/>
224
+ <div class="input-group-addon cursor-pointer" data-toggle="modal" data-toggle="modal" data-target="#help">
225
+ <i class="fa fa-question"></i>
226
+ </div>
107
227
  </div>
108
228
  </div>
109
229
  </div>
110
230
 
111
- <br class="large"/>
231
+ <div
232
+ class="col-md-4">
233
+ <div
234
+ class="btn-group btn-block" id="methods">
235
+ <button
236
+ type="submit"
237
+ id="method" class="btn btn-primary col-md-12"
238
+ title="Use Ctrl+Enter as shortcut."
239
+ disabled="disabled">
240
+ blast
241
+ </button>
242
+ </div>
243
+ </div>
244
+ </div>
245
+ </form>
112
246
 
113
- <div class="row">
114
- <div class="span12">
115
- <div class="offset-left box advanced">
116
- <div class="clearfix">
117
- <label for="advanced">Advanced Parameters:</label>
118
- <input class="span8" type="text" name="advanced" id="advanced" title="View, and enter advanced parameters." placeholder="eg: -evalue 1.0e-5 -num_alignments 100"/>
119
- <span class="icon-question-sign" data-toggle="modal" href="#help"></span>
120
- </div>
247
+ <div
248
+ class="result" id="result"
249
+ style="display: none;">
250
+ </div>
251
+ </div> <!-- /container -->
121
252
 
122
- <div class="modal hide fade" id="help">
123
- <div class="modal-header">
124
- <h3>Advanced Options</h3>
125
- </div>
126
- <div class="modal-body">
127
- <%= erb :_options %>
128
- </div>
129
- <div class="modal-footer">
130
- <button class="btn btn-primary" data-dismiss="modal">Got it!</button>
131
- </div>
132
- </div>
133
- </div>
134
- </div>
253
+ <div
254
+ class="footer" id="footer">
255
+ <hr>
256
+ <p
257
+ class="text-center">
258
+ <a
259
+ href='http://www.sequenceserver.com'>
260
+ <%=
261
+ quote = [
262
+ "Custom BLAST web interface by SequenceServer.",
263
+ "SequenceServer: Local BLAST with bespoke html interface.",
264
+ "Set up custom BLAST interface with SequenceServer.",
265
+ "Easy BLASTing with SequenceServer."
266
+ ][rand(4)]
267
+ %>
268
+ </a>
269
+ <a
270
+ class="twitter-share-button"
271
+ href="https://twitter.com/share"
272
+ data-url="http://www.sequenceserver.com" data-text="<%= quote %>" data-via="yeban" data-hashtags="bioinformatics">
273
+ Tweet
274
+ </a>
275
+ <%#<div class="g-plusone" data-annotation="none" data-href="http://www.sequenceserver.com"></div>%>
135
276
 
136
- <div class="span4">
137
- <div id="methods">
138
- <button type="submit" class="span3 btn btn-large btn-primary" id="method" disabled="disabled">blast</button>
139
- <button class="btn btn-primary btn-large dropdown-toggle hide" data-toggle="dropdown">
140
- <span class="caret"></span>
141
- </button>
142
- <ul class="dropdown-menu"></ul>
143
- </div>
144
- </div>
277
+ <br>
278
+ Please Cite:
279
+ <a href='http://www.sequenceserver.com'>
280
+ Priyam, Woodcroft, Rai & Wurm, <strong>SequenceServer</strong> (<em>in prep</em>)</a>
281
+ </a>
282
+ &amp; relevant data sources.
283
+ </p>
284
+ </div>
285
+
286
+ <div
287
+ id="error"
288
+ class="modal fade"
289
+ tabindex="-1">
290
+ </div> <!-- error -->
291
+
292
+ <div
293
+ class="modal fade" id="error-no-response">
294
+ <div
295
+ class="modal-dialog">
296
+ <div
297
+ class="modal-content">
298
+ <div
299
+ class="modal-header">
300
+ <h3>Server didn't respond</h3>
145
301
  </div>
146
- </form>
147
302
 
148
- <div class="modal hide" id="spinner" data-keyboard="false" data-backdrop="static">
149
- <div class="modal-body">
303
+ <div
304
+ class="modal-body">
305
+ <p>
306
+ Could be a temporary network issue, or the service might be
307
+ configured to "time out" long requests.
308
+ </p>
309
+
310
+ <p>
311
+ Please try again
312
+ later, or report to the admin or <a
313
+ href="https://groups.google.com/forum/?fromgroups#!forum/sequenceserver">SequenceServer
314
+ Google Group</a> (if you are the admin) if problem persists.
315
+ </p>
150
316
  </div>
151
- </div>
152
317
 
153
- <div class="results hide">
154
- <div id="result">Waiting for BLAST to be run <!-- need bit before for UI testing so it knows when BLAST is finished -->
318
+ <div
319
+ class="modal-footer">
320
+ <button class="btn btn-danger" data-dismiss="modal">Okay</button>
155
321
  </div>
156
322
  </div>
323
+ </div>
324
+ </div> <!-- error-no-response -->
157
325
 
158
- <div class="modal hide fade" id="error">
159
- <div class="modal-header">
160
- <h3 id="error-short">Oops! BLAST Failed</h3>
326
+ <div
327
+ class="modal fade" id="help"
328
+ tabindex="-1">
329
+ <div
330
+ class="modal-dialog modal-lg">
331
+ <div
332
+ class="modal-content">
333
+ <div
334
+ class="modal-header">
335
+ <h3>Advanced Options</h3>
161
336
  </div>
162
- <div class="modal-body">
163
- <h4 id="error-type"></h4>
164
- <br/>
165
- <p id="error-message"></p>
337
+ <div
338
+ class="modal-body">
339
+ <%= erb :_options %>
166
340
  </div>
167
- <div class="modal-footer">
168
- <button class="btn btn-danger" data-dismiss="modal">Close</button>
341
+ <div
342
+ class="modal-footer">
343
+ <button
344
+ class="btn btn-default btn-primary"
345
+ data-dismiss="modal">
346
+ Got it!
347
+ </button>
169
348
  </div>
170
349
  </div>
350
+ </div>
351
+ </div> <!-- advanced options -->
171
352
 
172
- <div id="underbar">
173
- <p><strong><a href='http://www.sequenceserver.com'>
174
- <%= [ "&copy; SequenceServer: BLAST search made easy!",
175
- "Custom BLAST web interface by SequenceServer.",
176
- "SequenceServer: Local BLAST with bespoke html interface.",
177
- "Set up custom BLAST interface with SequenceServer.",
178
- "Please cite: Priyam A, Woodcroft BJ, Wurm Y (<em>in prep</em>). " +
179
- "Sequenceserver: BLAST searching made easy."
180
- ][rand(5)]
181
- %>
182
- </a></strong></p>
353
+ <div
354
+ class="modal" id="spinner"
355
+ tabindex="-1"
356
+ data-backdrop="static" data-keyboard="false">
357
+ <div
358
+ class="modal-dialog">
359
+ <div
360
+ class="modal-content">
361
+ <div
362
+ class="modal-body text-center">
363
+ <h2>
364
+ BLAST-ing ...
365
+ </h2>
366
+ <i class="fa fa-spinner fa-5x fa-spin"></i>
367
+ <p>
368
+ <br>
369
+ This could take some time depending on the size of your query and
370
+ database(s).
371
+ </p>
372
+ </div>
183
373
  </div>
184
- </div> <!-- /page -->
185
- </div> <!-- /container -->
186
-
187
- <div id="social" class="modal hide fade">
188
- <div class="modal-header">
189
- <h3 id="error-short">Looks like you are fond of SequenceServer :).</h3>
190
374
  </div>
191
- <div class="modal-body">
192
- <p>Please consider giving us a plus-one and/or tweeting about us. Thanks!</p>
193
- <br/>
194
- <div class="buttons">
195
- <div class="button-container well">
196
- <div class="g-plusone" data-annotation="none" data-href="http://www.sequenceserver.com"></div>
375
+ </div> <!-- spinner -->
376
+
377
+ <div
378
+ id="sequence-viewer" class="modal"
379
+ tabindex=-1>
380
+ <div
381
+ class="modal-dialog">
382
+ <div
383
+ class="modal-content">
384
+ <div
385
+ class="modal-header">
386
+ <h3>View and download sequence</h3>
387
+ </div>
388
+
389
+ <div
390
+ class="modal-body">
197
391
  </div>
198
- <div class="button-container well">
199
- <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://www.sequenceserver.com" data-text="SequenceServer: BLAST search made easy." data-via="yeban" data-size="large" data-count="none" data-hashtags="bioinformatics">Tweet</a>
392
+
393
+ <div
394
+ class="spinner">
395
+ <i class="fa fa-spinner fa-3x fa-spin"></i>
396
+ </div>
397
+
398
+ <div
399
+ class="modal-footer">
200
400
  </div>
201
401
  </div>
202
402
  </div>
203
- <div class="modal-footer">
204
- <button class="btn btn-primary" data-dismiss="modal">Done</button>
205
- </div>
206
- </div> <!-- /social -->
403
+ </div> <!-- sequence viewing -->
207
404
 
208
- <!-- google plus -->
405
+ <!-- JS -->
406
+ <script type="text/javascript" src="js/underscore.min.js"></script>
407
+ <script type="text/javascript" src="js/jquery.js"></script>
408
+ <script type="text/javascript" src="js/webshims/polyfiller.js"></script>
209
409
  <script type="text/javascript">
210
- (function() {
211
- var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
212
- po.src = 'https://apis.google.com/js/plusone.js';
213
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
214
- })();
410
+ $.webshims.polyfill('forms');
215
411
  </script>
412
+ <script type="text/javascript" src="js/jquery-ui.js"></script>
413
+ <script type="text/javascript" src="js/bootstrap.min.js"></script>
414
+ <script type="text/javascript" src="js/d3.v3.min.js"></script>
415
+ <script type="text/javascript" src="js/sequenceserver.js"></script>
416
+ <script type="text/javascript" src="js/sequenceserver.blast.js"></script>
417
+ <script type="text/javascript" src="js/jquery.t.js"></script>
418
+ <script type="text/javascript" src="js/sequence.js"></script>
216
419
 
217
420
  <!-- twitter -->
218
421
  <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>