sequenceserver 1.0.0.pre.2 → 1.0.0.pre.3

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 (337) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +18 -4
  4. data/bin/sequenceserver +219 -124
  5. data/lib/sequenceserver.rb +156 -153
  6. data/lib/sequenceserver/blast.rb +163 -432
  7. data/lib/sequenceserver/blast/exceptions.rb +27 -0
  8. data/lib/sequenceserver/blast/hit.rb +32 -0
  9. data/lib/sequenceserver/blast/hsp.rb +260 -0
  10. data/lib/sequenceserver/blast/query.rb +28 -0
  11. data/lib/sequenceserver/blast/report.rb +123 -0
  12. data/lib/sequenceserver/config.rb +94 -0
  13. data/lib/sequenceserver/database.rb +89 -49
  14. data/lib/sequenceserver/exceptions.rb +154 -0
  15. data/lib/sequenceserver/links.rb +1 -1
  16. data/lib/sequenceserver/logger.rb +5 -7
  17. data/lib/sequenceserver/sequence.rb +40 -39
  18. data/public/css/bootstrap.min.css +5 -7
  19. data/public/css/custom.css +28 -27
  20. data/public/dist/css/sequenceserver.min.css +1 -0
  21. data/public/dist/css/sequenceserver.min.css.gz +0 -0
  22. data/public/dist/fonts/FontAwesome.otf +0 -0
  23. data/public/dist/fonts/fontawesome-webfont.eot +0 -0
  24. data/public/dist/fonts/fontawesome-webfont.svg +565 -0
  25. data/public/dist/fonts/fontawesome-webfont.ttf +0 -0
  26. data/public/dist/fonts/fontawesome-webfont.woff +0 -0
  27. data/public/dist/fonts/fontawesome-webfont.woff2 +0 -0
  28. data/public/dist/js/sequenceserver.min.js +12 -0
  29. data/public/dist/js/sequenceserver.min.js.gz +0 -0
  30. data/public/dist/js/shims/FlashCanvas/canvas2png.js +1 -0
  31. data/public/dist/js/shims/FlashCanvas/flashcanvas.js +1 -0
  32. data/public/dist/js/shims/FlashCanvas/flashcanvas.swf +0 -0
  33. data/public/dist/js/shims/FlashCanvasPro/canvas2png.js +1 -0
  34. data/public/dist/js/shims/FlashCanvasPro/flash10canvas.swf +0 -0
  35. data/public/dist/js/shims/FlashCanvasPro/flash9canvas.swf +0 -0
  36. data/public/dist/js/shims/FlashCanvasPro/flashcanvas.js +1 -0
  37. data/public/dist/js/shims/canvas-blob.js +1 -0
  38. data/public/dist/js/shims/color-picker.js +2 -0
  39. data/public/dist/js/shims/combos/1.js +6 -0
  40. data/public/dist/js/shims/combos/10.js +2 -0
  41. data/public/dist/js/shims/combos/11.js +2 -0
  42. data/public/dist/js/shims/combos/12.js +6 -0
  43. data/public/dist/js/shims/combos/13.js +1 -0
  44. data/public/dist/js/shims/combos/14.js +1 -0
  45. data/public/dist/js/shims/combos/15.js +2 -0
  46. data/public/dist/js/shims/combos/16.js +7 -0
  47. data/public/dist/js/shims/combos/17.js +2 -0
  48. data/public/dist/js/shims/combos/18.js +3 -0
  49. data/public/dist/js/shims/combos/2.js +7 -0
  50. data/public/dist/js/shims/combos/21.js +2 -0
  51. data/public/dist/js/shims/combos/22.js +1 -0
  52. data/public/dist/js/shims/combos/23.js +6 -0
  53. data/public/dist/js/shims/combos/25.js +2 -0
  54. data/public/dist/js/shims/combos/27.js +1 -0
  55. data/public/dist/js/shims/combos/28.js +1 -0
  56. data/public/dist/js/shims/combos/29.js +1 -0
  57. data/public/dist/js/shims/combos/3.js +1 -0
  58. data/public/dist/js/shims/combos/30.js +2 -0
  59. data/public/dist/js/shims/combos/31.js +1 -0
  60. data/public/dist/js/shims/combos/33.js +1 -0
  61. data/public/dist/js/shims/combos/34.js +1 -0
  62. data/public/dist/js/shims/combos/4.js +1 -0
  63. data/public/dist/js/shims/combos/5.js +2 -0
  64. data/public/dist/js/shims/combos/6.js +2 -0
  65. data/public/dist/js/shims/combos/7.js +7 -0
  66. data/public/dist/js/shims/combos/8.js +7 -0
  67. data/public/dist/js/shims/combos/9.js +2 -0
  68. data/public/dist/js/shims/combos/97.js +1 -0
  69. data/public/dist/js/shims/combos/98.js +1 -0
  70. data/public/dist/js/shims/combos/99.js +1 -0
  71. data/public/dist/js/shims/details.js +1 -0
  72. data/public/dist/js/shims/dom-extend.js +1 -0
  73. data/public/dist/js/shims/es5.js +1 -0
  74. data/public/dist/js/shims/es6.js +1 -0
  75. data/public/dist/js/shims/excanvas.js +1 -0
  76. data/public/dist/js/shims/filereader-xhr.js +1 -0
  77. data/public/dist/js/shims/form-combat.js +1 -0
  78. data/public/dist/js/shims/form-core.js +1 -0
  79. data/public/dist/js/shims/form-datalist-lazy.js +1 -0
  80. data/public/dist/js/shims/form-datalist.js +1 -0
  81. data/public/dist/js/shims/form-fixrangechange.js +1 -0
  82. data/public/dist/js/shims/form-inputmode.js +1 -0
  83. data/public/dist/js/shims/form-message.js +1 -0
  84. data/public/dist/js/shims/form-native-extend.js +1 -0
  85. data/public/dist/js/shims/form-number-date-api.js +1 -0
  86. data/public/dist/js/shims/form-number-date-ui.js +1 -0
  87. data/public/dist/js/shims/form-shim-extend.js +1 -0
  88. data/public/dist/js/shims/form-shim-extend2.js +1 -0
  89. data/public/dist/js/shims/form-validation.js +1 -0
  90. data/public/dist/js/shims/form-validators.js +1 -0
  91. data/public/dist/js/shims/forms-picker.js +1 -0
  92. data/public/dist/js/shims/geolocation.js +1 -0
  93. data/public/dist/js/shims/i18n/formcfg-ar.js +1 -0
  94. data/public/dist/js/shims/i18n/formcfg-ch-CN.js +1 -0
  95. data/public/dist/js/shims/i18n/formcfg-cs.js +1 -0
  96. data/public/dist/js/shims/i18n/formcfg-de.js +1 -0
  97. data/public/dist/js/shims/i18n/formcfg-el.js +1 -0
  98. data/public/dist/js/shims/i18n/formcfg-en.js +1 -0
  99. data/public/dist/js/shims/i18n/formcfg-es.js +1 -0
  100. data/public/dist/js/shims/i18n/formcfg-fa.js +1 -0
  101. data/public/dist/js/shims/i18n/formcfg-fr.js +1 -0
  102. data/public/dist/js/shims/i18n/formcfg-he.js +1 -0
  103. data/public/dist/js/shims/i18n/formcfg-hi.js +1 -0
  104. data/public/dist/js/shims/i18n/formcfg-hu.js +1 -0
  105. data/public/dist/js/shims/i18n/formcfg-it.js +1 -0
  106. data/public/dist/js/shims/i18n/formcfg-ja.js +1 -0
  107. data/public/dist/js/shims/i18n/formcfg-lt.js +1 -0
  108. data/public/dist/js/shims/i18n/formcfg-nl.js +1 -0
  109. data/public/dist/js/shims/i18n/formcfg-pl.js +1 -0
  110. data/public/dist/js/shims/i18n/formcfg-pt-BR.js +1 -0
  111. data/public/dist/js/shims/i18n/formcfg-pt-PT.js +1 -0
  112. data/public/dist/js/shims/i18n/formcfg-pt.js +1 -0
  113. data/public/dist/js/shims/i18n/formcfg-ru.js +1 -0
  114. data/public/dist/js/shims/i18n/formcfg-sv.js +1 -0
  115. data/public/dist/js/shims/i18n/formcfg-zh-CN.js +1 -0
  116. data/public/dist/js/shims/i18n/formcfg-zh-TW.js +1 -0
  117. data/public/dist/js/shims/jme/alternate-media.js +1 -0
  118. data/public/dist/js/shims/jme/base.js +1 -0
  119. data/public/dist/js/shims/jme/controls.css +1 -0
  120. data/public/dist/js/shims/jme/jme.eot +0 -0
  121. data/public/dist/js/shims/jme/jme.svg +36 -0
  122. data/public/dist/js/shims/jme/jme.ttf +0 -0
  123. data/public/dist/js/shims/jme/jme.woff +0 -0
  124. data/public/dist/js/shims/jme/mediacontrols-lazy.js +1 -0
  125. data/public/dist/js/shims/jme/mediacontrols.js +1 -0
  126. data/public/dist/js/shims/jme/playlist.js +1 -0
  127. data/public/dist/js/shims/jpicker/images/AlphaBar.png +0 -0
  128. data/public/dist/js/shims/jpicker/images/Bars.png +0 -0
  129. data/public/dist/js/shims/jpicker/images/Maps.png +0 -0
  130. data/public/dist/js/shims/jpicker/images/NoColor.png +0 -0
  131. data/public/dist/js/shims/jpicker/images/bar-opacity.png +0 -0
  132. data/public/dist/js/shims/jpicker/images/map-opacity.png +0 -0
  133. data/public/dist/js/shims/jpicker/images/mappoint.gif +0 -0
  134. data/public/dist/js/shims/jpicker/images/picker.gif +0 -0
  135. data/public/dist/js/shims/jpicker/images/preview-opacity.png +0 -0
  136. data/public/dist/js/shims/jpicker/images/rangearrows.gif +0 -0
  137. data/public/dist/js/shims/jpicker/jpicker.css +1 -0
  138. data/public/dist/js/shims/matchMedia.js +3 -0
  139. data/public/dist/js/shims/mediacapture-picker.js +1 -0
  140. data/public/dist/js/shims/mediacapture.js +1 -0
  141. data/public/dist/js/shims/mediaelement-core.js +1 -0
  142. data/public/dist/js/shims/mediaelement-debug.js +1 -0
  143. data/public/dist/js/shims/mediaelement-jaris.js +1 -0
  144. data/public/dist/js/shims/mediaelement-native-fix.js +1 -0
  145. data/public/dist/js/shims/mediaelement-yt.js +1 -0
  146. data/public/dist/js/shims/moxie/flash/Moxie.cdn.swf +0 -0
  147. data/public/dist/js/shims/moxie/flash/Moxie.min.swf +0 -0
  148. data/public/dist/js/shims/moxie/js/moxie-html4.js +3 -0
  149. data/public/dist/js/shims/moxie/js/moxie-swf.js +2 -0
  150. data/public/dist/js/shims/picture.js +1 -0
  151. data/public/dist/js/shims/plugins/jquery.ui.position.js +11 -0
  152. data/public/dist/js/shims/range-ui.js +1 -0
  153. data/public/dist/js/shims/sizzle.js +11 -0
  154. data/public/dist/js/shims/sticky.js +1 -0
  155. data/public/dist/js/shims/styles/color-picker.png +0 -0
  156. data/public/dist/js/shims/styles/forms-ext.css +1 -0
  157. data/public/dist/js/shims/styles/forms-picker.css +1 -0
  158. data/public/dist/js/shims/styles/progress.gif +0 -0
  159. data/public/dist/js/shims/styles/progress.png +0 -0
  160. data/public/dist/js/shims/styles/shim-ext.css +1 -0
  161. data/public/dist/js/shims/styles/shim.css +1 -0
  162. data/public/dist/js/shims/styles/transparent.png +0 -0
  163. data/public/dist/js/shims/styles/widget.eot +0 -0
  164. data/public/dist/js/shims/styles/widget.svg +12 -0
  165. data/public/dist/js/shims/styles/widget.ttf +0 -0
  166. data/public/dist/js/shims/styles/widget.woff +0 -0
  167. data/public/dist/js/shims/swf/JarisFLVPlayer.swf +0 -0
  168. data/public/dist/js/shims/swfmini-embed.js +1 -0
  169. data/public/dist/js/shims/swfmini.js +6 -0
  170. data/public/dist/js/shims/track-ui.js +1 -0
  171. data/public/dist/js/shims/track.js +1 -0
  172. data/public/dist/js/shims/url.js +1 -0
  173. data/public/dist/js/shims/usermedia-core.js +1 -0
  174. data/public/dist/js/shims/usermedia-shim.js +1 -0
  175. data/public/dist/js/webshims/shims/FlashCanvas/canvas2png.js +1 -0
  176. data/public/dist/js/webshims/shims/FlashCanvas/flashcanvas.js +1 -0
  177. data/public/dist/js/webshims/shims/FlashCanvas/flashcanvas.swf +0 -0
  178. data/public/dist/js/webshims/shims/FlashCanvasPro/canvas2png.js +1 -0
  179. data/public/dist/js/webshims/shims/FlashCanvasPro/flash10canvas.swf +0 -0
  180. data/public/dist/js/webshims/shims/FlashCanvasPro/flash9canvas.swf +0 -0
  181. data/public/dist/js/webshims/shims/FlashCanvasPro/flashcanvas.js +1 -0
  182. data/public/dist/js/webshims/shims/canvas-blob.js +1 -0
  183. data/public/dist/js/webshims/shims/color-picker.js +2 -0
  184. data/public/dist/js/webshims/shims/combos/1.js +6 -0
  185. data/public/dist/js/webshims/shims/combos/10.js +2 -0
  186. data/public/dist/js/webshims/shims/combos/11.js +2 -0
  187. data/public/dist/js/webshims/shims/combos/12.js +6 -0
  188. data/public/dist/js/webshims/shims/combos/13.js +1 -0
  189. data/public/dist/js/webshims/shims/combos/14.js +1 -0
  190. data/public/dist/js/webshims/shims/combos/15.js +2 -0
  191. data/public/dist/js/webshims/shims/combos/16.js +7 -0
  192. data/public/dist/js/webshims/shims/combos/17.js +2 -0
  193. data/public/dist/js/webshims/shims/combos/18.js +3 -0
  194. data/public/dist/js/webshims/shims/combos/2.js +7 -0
  195. data/public/dist/js/webshims/shims/combos/21.js +2 -0
  196. data/public/dist/js/webshims/shims/combos/22.js +1 -0
  197. data/public/dist/js/webshims/shims/combos/23.js +6 -0
  198. data/public/dist/js/webshims/shims/combos/25.js +2 -0
  199. data/public/dist/js/webshims/shims/combos/27.js +1 -0
  200. data/public/dist/js/webshims/shims/combos/28.js +1 -0
  201. data/public/dist/js/webshims/shims/combos/29.js +1 -0
  202. data/public/dist/js/webshims/shims/combos/3.js +1 -0
  203. data/public/dist/js/webshims/shims/combos/30.js +2 -0
  204. data/public/dist/js/webshims/shims/combos/31.js +1 -0
  205. data/public/dist/js/webshims/shims/combos/33.js +1 -0
  206. data/public/dist/js/webshims/shims/combos/34.js +1 -0
  207. data/public/dist/js/webshims/shims/combos/4.js +1 -0
  208. data/public/dist/js/webshims/shims/combos/5.js +2 -0
  209. data/public/dist/js/webshims/shims/combos/6.js +2 -0
  210. data/public/dist/js/webshims/shims/combos/7.js +7 -0
  211. data/public/dist/js/webshims/shims/combos/8.js +7 -0
  212. data/public/dist/js/webshims/shims/combos/9.js +2 -0
  213. data/public/dist/js/webshims/shims/combos/97.js +1 -0
  214. data/public/dist/js/webshims/shims/combos/98.js +1 -0
  215. data/public/dist/js/webshims/shims/combos/99.js +1 -0
  216. data/public/dist/js/webshims/shims/details.js +1 -0
  217. data/public/dist/js/webshims/shims/dom-extend.js +1 -0
  218. data/public/dist/js/webshims/shims/es5.js +1 -0
  219. data/public/dist/js/webshims/shims/es6.js +1 -0
  220. data/public/dist/js/webshims/shims/excanvas.js +1 -0
  221. data/public/dist/js/webshims/shims/filereader-xhr.js +1 -0
  222. data/public/dist/js/webshims/shims/form-combat.js +1 -0
  223. data/public/dist/js/webshims/shims/form-core.js +1 -0
  224. data/public/dist/js/webshims/shims/form-datalist-lazy.js +1 -0
  225. data/public/dist/js/webshims/shims/form-datalist.js +1 -0
  226. data/public/dist/js/webshims/shims/form-fixrangechange.js +1 -0
  227. data/public/dist/js/webshims/shims/form-inputmode.js +1 -0
  228. data/public/dist/js/webshims/shims/form-message.js +1 -0
  229. data/public/dist/js/webshims/shims/form-native-extend.js +1 -0
  230. data/public/dist/js/webshims/shims/form-number-date-api.js +1 -0
  231. data/public/dist/js/webshims/shims/form-number-date-ui.js +1 -0
  232. data/public/dist/js/webshims/shims/form-shim-extend.js +1 -0
  233. data/public/dist/js/webshims/shims/form-shim-extend2.js +1 -0
  234. data/public/dist/js/webshims/shims/form-validation.js +1 -0
  235. data/public/dist/js/webshims/shims/form-validators.js +1 -0
  236. data/public/dist/js/webshims/shims/forms-picker.js +1 -0
  237. data/public/dist/js/webshims/shims/geolocation.js +1 -0
  238. data/public/dist/js/webshims/shims/i18n/formcfg-ar.js +1 -0
  239. data/public/dist/js/webshims/shims/i18n/formcfg-ch-CN.js +1 -0
  240. data/public/dist/js/webshims/shims/i18n/formcfg-cs.js +1 -0
  241. data/public/dist/js/webshims/shims/i18n/formcfg-de.js +1 -0
  242. data/public/dist/js/webshims/shims/i18n/formcfg-el.js +1 -0
  243. data/public/dist/js/webshims/shims/i18n/formcfg-en.js +1 -0
  244. data/public/dist/js/webshims/shims/i18n/formcfg-es.js +1 -0
  245. data/public/dist/js/webshims/shims/i18n/formcfg-fa.js +1 -0
  246. data/public/dist/js/webshims/shims/i18n/formcfg-fr.js +1 -0
  247. data/public/dist/js/webshims/shims/i18n/formcfg-he.js +1 -0
  248. data/public/dist/js/webshims/shims/i18n/formcfg-hi.js +1 -0
  249. data/public/dist/js/webshims/shims/i18n/formcfg-hu.js +1 -0
  250. data/public/dist/js/webshims/shims/i18n/formcfg-it.js +1 -0
  251. data/public/dist/js/webshims/shims/i18n/formcfg-ja.js +1 -0
  252. data/public/dist/js/webshims/shims/i18n/formcfg-lt.js +1 -0
  253. data/public/dist/js/webshims/shims/i18n/formcfg-nl.js +1 -0
  254. data/public/dist/js/webshims/shims/i18n/formcfg-pl.js +1 -0
  255. data/public/dist/js/webshims/shims/i18n/formcfg-pt-BR.js +1 -0
  256. data/public/dist/js/webshims/shims/i18n/formcfg-pt-PT.js +1 -0
  257. data/public/dist/js/webshims/shims/i18n/formcfg-pt.js +1 -0
  258. data/public/dist/js/webshims/shims/i18n/formcfg-ru.js +1 -0
  259. data/public/dist/js/webshims/shims/i18n/formcfg-sv.js +1 -0
  260. data/public/dist/js/webshims/shims/i18n/formcfg-zh-CN.js +1 -0
  261. data/public/dist/js/webshims/shims/i18n/formcfg-zh-TW.js +1 -0
  262. data/public/dist/js/webshims/shims/jme/alternate-media.js +1 -0
  263. data/public/dist/js/webshims/shims/jme/base.js +1 -0
  264. data/public/dist/js/webshims/shims/jme/controls.css +1 -0
  265. data/public/dist/js/webshims/shims/jme/jme.eot +0 -0
  266. data/public/dist/js/webshims/shims/jme/jme.svg +36 -0
  267. data/public/dist/js/webshims/shims/jme/jme.ttf +0 -0
  268. data/public/dist/js/webshims/shims/jme/jme.woff +0 -0
  269. data/public/dist/js/webshims/shims/jme/mediacontrols-lazy.js +1 -0
  270. data/public/dist/js/webshims/shims/jme/mediacontrols.js +1 -0
  271. data/public/dist/js/webshims/shims/jme/playlist.js +1 -0
  272. data/public/dist/js/webshims/shims/jpicker/images/AlphaBar.png +0 -0
  273. data/public/dist/js/webshims/shims/jpicker/images/Bars.png +0 -0
  274. data/public/dist/js/webshims/shims/jpicker/images/Maps.png +0 -0
  275. data/public/dist/js/webshims/shims/jpicker/images/NoColor.png +0 -0
  276. data/public/dist/js/webshims/shims/jpicker/images/bar-opacity.png +0 -0
  277. data/public/dist/js/webshims/shims/jpicker/images/map-opacity.png +0 -0
  278. data/public/dist/js/webshims/shims/jpicker/images/mappoint.gif +0 -0
  279. data/public/dist/js/webshims/shims/jpicker/images/picker.gif +0 -0
  280. data/public/dist/js/webshims/shims/jpicker/images/preview-opacity.png +0 -0
  281. data/public/dist/js/webshims/shims/jpicker/images/rangearrows.gif +0 -0
  282. data/public/dist/js/webshims/shims/jpicker/jpicker.css +1 -0
  283. data/public/dist/js/webshims/shims/matchMedia.js +3 -0
  284. data/public/dist/js/webshims/shims/mediacapture-picker.js +1 -0
  285. data/public/dist/js/webshims/shims/mediacapture.js +1 -0
  286. data/public/dist/js/webshims/shims/mediaelement-core.js +1 -0
  287. data/public/dist/js/webshims/shims/mediaelement-debug.js +1 -0
  288. data/public/dist/js/webshims/shims/mediaelement-jaris.js +1 -0
  289. data/public/dist/js/webshims/shims/mediaelement-native-fix.js +1 -0
  290. data/public/dist/js/webshims/shims/mediaelement-yt.js +1 -0
  291. data/public/dist/js/webshims/shims/moxie/flash/Moxie.cdn.swf +0 -0
  292. data/public/dist/js/webshims/shims/moxie/flash/Moxie.min.swf +0 -0
  293. data/public/dist/js/webshims/shims/moxie/js/moxie-html4.js +3 -0
  294. data/public/dist/js/webshims/shims/moxie/js/moxie-swf.js +2 -0
  295. data/public/dist/js/webshims/shims/picture.js +1 -0
  296. data/public/dist/js/webshims/shims/plugins/jquery.ui.position.js +11 -0
  297. data/public/dist/js/webshims/shims/range-ui.js +1 -0
  298. data/public/dist/js/webshims/shims/sizzle.js +11 -0
  299. data/public/dist/js/webshims/shims/sticky.js +1 -0
  300. data/public/dist/js/webshims/shims/styles/color-picker.png +0 -0
  301. data/public/dist/js/webshims/shims/styles/forms-ext.css +1 -0
  302. data/public/dist/js/webshims/shims/styles/forms-picker.css +1 -0
  303. data/public/dist/js/webshims/shims/styles/progress.gif +0 -0
  304. data/public/dist/js/webshims/shims/styles/progress.png +0 -0
  305. data/public/dist/js/webshims/shims/styles/shim-ext.css +1 -0
  306. data/public/dist/js/webshims/shims/styles/shim.css +1 -0
  307. data/public/dist/js/webshims/shims/styles/transparent.png +0 -0
  308. data/public/dist/js/webshims/shims/styles/widget.eot +0 -0
  309. data/public/dist/js/webshims/shims/styles/widget.svg +12 -0
  310. data/public/dist/js/webshims/shims/styles/widget.ttf +0 -0
  311. data/public/dist/js/webshims/shims/styles/widget.woff +0 -0
  312. data/public/dist/js/webshims/shims/swf/JarisFLVPlayer.swf +0 -0
  313. data/public/dist/js/webshims/shims/swfmini-embed.js +1 -0
  314. data/public/dist/js/webshims/shims/swfmini.js +6 -0
  315. data/public/dist/js/webshims/shims/track-ui.js +1 -0
  316. data/public/dist/js/webshims/shims/track.js +1 -0
  317. data/public/dist/js/webshims/shims/url.js +1 -0
  318. data/public/dist/js/webshims/shims/usermedia-core.js +1 -0
  319. data/public/dist/js/webshims/shims/usermedia-shim.js +1 -0
  320. data/public/js/bootstrap.min.js +3 -8
  321. data/public/js/jquery-ui.min.js +6 -0
  322. data/public/js/jquery.min.js +4 -0
  323. data/public/js/jquery.t.js +4 -4
  324. data/public/js/sequenceserver.blast.js +20 -18
  325. data/public/js/sequenceserver.js +116 -74
  326. data/sequenceserver.gemspec +20 -16
  327. data/views/400.erb +2 -1
  328. data/views/500.erb +6 -1
  329. data/views/result.erb +38 -18
  330. data/views/search.erb +49 -32
  331. metadata +389 -11
  332. data/public/img/glyphicons-halflings-white.png +0 -0
  333. data/public/img/glyphicons-halflings.png +0 -0
  334. data/public/js/jquery-ui.js +0 -14987
  335. data/public/js/jquery.js +0 -5
  336. data/public/js/jquery.scrollspy.js +0 -74
  337. data/public/sequence.min.js +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3f26e8eac4c55a9a2a0997d2ab6e922c88ded0d8
4
- data.tar.gz: 60684bb5f9291fcbbfefd410517ea3892df9ff5c
3
+ metadata.gz: ddd56505296b6813bedb5e400c5d2fd44bb9fcf3
4
+ data.tar.gz: 126f3e127d5d3a1eadfac6bf7940d0ec08875997
5
5
  SHA512:
6
- metadata.gz: a51d9aff1dc67c12898295dbbc36452216820c22695a0e2b1507fa977d49fe8cf235f2da44762b0a5229bce2e59266b00358f40b51a072fbb9de007b9b60bef0
7
- data.tar.gz: 8042ec1559d3719d2f910681c8cb4988d6cf0fe81d4205d5b596929be31045b0309ec44ad3bd335a457fae2c3ad0c1d80dc0be4c3322fc5d07501af494210695
6
+ metadata.gz: 9207f4705a670d0b4a652d4b0a95c17910ebe9e296209d033914e56bd3c2119fad1406ca84c4f3d7515a49c3a2ebead11b9482fd4a0c2743632ea7d196d08f91
7
+ data.tar.gz: 372f45058b21fdff4d7b922efc1c8e51eb358eef9cd2d9cb10e8ecbed943966d1c82d366e0acc9d55e795b2129bc602a2686900269c337373b195224f0c7b960
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
- source "http://rubygems.org"
1
+ source 'http://rubygems.org'
2
2
 
3
3
  gemspec
data/README.md CHANGED
@@ -1,7 +1,21 @@
1
- Thanks for downloading SequenceServer!
1
+ [![build status](https://secure.travis-ci.org/yannickwurm/sequenceserver.png?branch=master)](https://travis-ci.org/yannickwurm/sequenceserver)
2
+ [![Code Climate](https://codeclimate.com/github/yannickwurm/sequenceserver/badges/gpa.svg)](https://codeclimate.com/github/yannickwurm/sequenceserver)
3
+ [![Test Coverage](https://codeclimate.com/github/yannickwurm/sequenceserver/badges/coverage.svg)](https://codeclimate.com/github/yannickwurm/sequenceserver)
4
+ [![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/yannickwurm/sequenceserver)
2
5
 
3
- Documentation available at http://www.sequenceserver.com
6
+ # SequenceServer - BLAST searching made easy!
4
7
 
5
- [![build status](https://secure.travis-ci.org/yannickwurm/sequenceserver.png?branch=master)](https://travis-ci.org/yannickwurm/sequenceserver)
8
+ SequenceServer lets you rapidly set up a BLAST+ server with an intuitive user
9
+ interface for use locally or over the web.
10
+
11
+ ## Installation
12
+
13
+ Please see http://www.sequenceserver.com
14
+
15
+ ## Contributors
6
16
 
7
- -- Yannick Wurm, Ben Woodcroft, Anurag Priyam
17
+ * Anurag Priyam - [email](mailto:anurag08priyam@gmail.com) | [@yeban](//twitter.com/yeban)
18
+ * [Vivek Rai](http://vivekiitkgp.github.io/)
19
+ * Ben Woodcroft
20
+ * Yannick Wurm - [http://wurmlab.github.io](http://wurmlab.github.io) |
21
+ [@yannick__](//twitter.com/yannick__)
data/bin/sequenceserver CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'readline'
3
+ require 'English'
3
4
  require 'slop'
4
5
 
5
6
  ENV['RACK_ENV'] ||= 'production'
@@ -46,133 +47,195 @@ used to create BLAST+ databases.
46
47
  BANNER
47
48
 
48
49
  on 'c', 'config_file=',
49
- 'Use the given configuration file',
50
- :argument => true
50
+ 'Use the given configuration file',
51
+ :argument => true
52
+ on 'config=',
53
+ 'Same as --config_file (deprecated)',
54
+ :argument => true
51
55
 
52
56
  on 'b', 'bin=',
53
- 'Load BLAST+ binaries from this directory',
54
- :argument => true
57
+ 'Load BLAST+ binaries from this directory',
58
+ :argument => true
55
59
 
56
60
  on 'd', 'database_dir=',
57
- 'Read FASTA and BLAST database from this directory',
58
- :argument => true
61
+ 'Read FASTA and BLAST database from this directory',
62
+ :argument => true
59
63
 
60
64
  on 'n', 'num_threads=',
61
- 'Number of threads to use to run a BLAST search',
62
- :argument => true
63
- #:as => Integer
65
+ 'Number of threads to use to run a BLAST search',
66
+ :argument => true
64
67
 
65
68
  on 'r', 'require=',
66
- 'Load extension from this file',
67
- :argument => true
69
+ 'Load extension from this file',
70
+ :argument => true
68
71
 
69
72
  on 'h', 'host=',
70
- 'Host to run SequenceServer on',
71
- :argument => true
73
+ 'Host to run SequenceServer on',
74
+ :argument => true
72
75
 
73
76
  on 'p', 'port=',
74
- 'Port to run SequenceServer on',
75
- :argument => true
77
+ 'Port to run SequenceServer on',
78
+ :argument => true
76
79
 
77
80
  on 's', 'set',
78
- 'Set configuration value in default or given config file'
81
+ 'Set configuration value in default or given config file'
79
82
 
80
83
  on 'm', 'make-blast-databases',
81
- 'Create BLAST databases'
84
+ 'Create BLAST databases'
82
85
 
83
86
  on 'l', 'list_databases',
84
- 'List BLAST databases'
87
+ 'List BLAST databases'
85
88
 
86
89
  on 'u', 'list-unformatted-fastas',
87
- 'List unformatted FASTA files'
90
+ 'List unformatted FASTA files'
88
91
 
89
92
  on 'i', 'interactive',
90
- 'Run SequenceServer in interactive mode'
93
+ 'Run SequenceServer in interactive mode'
91
94
 
92
95
  on 'D', 'devel',
93
- 'Start SequenceServer in development mode'
96
+ 'Start SequenceServer in development mode'
94
97
 
95
98
  on '-v', '--version',
96
- 'Print version number of SequenceServer that will be loaded'
99
+ 'Print version number of SequenceServer that will be loaded'
97
100
 
98
101
  on '-h', '--help',
99
- 'Display this help message'
102
+ 'Display this help message'
103
+
104
+ clean_opts = lambda do |hash|
105
+ hash.delete_if { |k, v| k == :set || v.nil? }
106
+ hash[:config_file] ||= hash.delete(:config)
107
+ hash
108
+ end
100
109
 
101
110
  run do
102
111
  if version?
103
- gemspec_file = File.join(File.dirname(__FILE__), '..', 'sequenceserver.gemspec')
112
+ gemspec_file = File.join(File.dirname(__FILE__), '..',
113
+ 'sequenceserver.gemspec')
104
114
  gemspec = eval File.read gemspec_file
105
115
  puts gemspec.version
106
116
  exit
107
117
  end
108
118
 
109
119
  ENV['RACK_ENV'] = 'development' if devel?
110
- # Save the state of user terminal
111
- stty_save = `stty -g`.chomp
112
- # Exit gracefully on SIGINT
120
+
121
+ # Exit gracefully on SIGINT.
122
+ stty = `stty -g`.chomp
113
123
  trap('INT') do
114
124
  puts ''
115
125
  puts 'Aborted.'
116
- system('stty', stty_save)
126
+ system('stty', stty)
117
127
  exit
118
128
  end
119
129
 
120
130
  require 'sequenceserver'
131
+
121
132
  begin
122
- opts = to_h.delete_if{|k, v| v.nil?}
123
- opts.delete :set
124
- SequenceServer.init opts
125
- rescue SystemExit => e
126
- # The aim of following error recovery scenarios is to guide user to a
127
- # working SequenceServer installation. We expect to land following
128
- # error scenarios either when creating a new SequenceServer (first
129
- # time or later), or updating config values using -s CLI option.
130
-
131
- # Try error recovery now.
132
- case e.status
133
- when SequenceServer::EXIT_CONFIG_FILE_NOT_FOUND
134
- # Create an empty configuration file to make SequenceServer happy.
135
- File.open(SequenceServer.config_file, 'w') {}
136
- puts " Created."
137
- redo
138
- when SequenceServer::EXIT_BLAST_NOT_INSTALLED,
139
- SequenceServer::EXIT_BLAST_NOT_COMPATIBLE
133
+ SequenceServer.init clean_opts[to_h]
134
+
135
+ # The aim of following error recovery scenarios is to guide user to a
136
+ # working SequenceServer installation. We expect to land following
137
+ # error scenarios either when creating a new SequenceServer (first
138
+ # time or later), or updating config values using -s CLI option.
139
+
140
+ rescue SequenceServer::CONFIG_FILE_ERROR => e
141
+
142
+ puts e
143
+ exit!
144
+
145
+ rescue SequenceServer::BIN_DIR_NOT_FOUND => e
140
146
 
141
- # Set a flag so that if we recovered from error resulting config can be
142
- # saved. Config will be saved unless invoked with -b option.
143
- fetch_option(:set).value = !bin?
147
+ puts e
144
148
 
145
- # Ask user if she already has BLAST+ downloaded or offer to download
146
- # BLAST+ for her.
149
+ unless bin?
150
+ puts 'You can set the correct value by running:'
147
151
  puts
148
- print 'Do you have BLAST+ downloaded already? [y/n] (Default: n): '
149
- response = STDIN.gets.to_s.strip
150
- if response.match(/^[y]$/i)
151
- response = Readline.readline('Where? ').to_s.strip
152
- unless File.basename(response) == 'bin'
153
- fetch_option(:bin).value = File.join(response, 'bin')
154
- end
155
- redo
156
- end
152
+ puts ' sequenceserver -s -b <value>'
153
+ puts
154
+ end
155
+
156
+ exit!
157
+
158
+ rescue SequenceServer::DATABASE_DIR_NOT_FOUND => e
159
+
160
+ puts e
157
161
 
162
+ unless database_dir?
163
+ puts 'You can set the correct value by running:'
158
164
  puts
159
- print "Install BLAST+? [y/n] (Default: y): "
160
- response = STDIN.gets.to_s.strip
161
- unless response.match(/^[n]$/i)
162
- puts
163
- puts "*** Installing BLAST+."
164
- puts "RUBY_PLATFORM #{RUBY_PLATFORM}"
165
-
166
- version = SequenceServer::MINIMUM_BLAST_VERSION
167
- url = case RUBY_PLATFORM
168
- when /i686-linux/ # 32 bit Linux
169
- "ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/#{version.chop}/ncbi-blast-#{version}-ia32-linux.tar.gz"
170
- when /x86_64-linux/ # 64 bit Linux
171
- "ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/#{version.chop}/ncbi-blast-#{version}-x64-linux.tar.gz"
172
- when /darwin/ # Mac
173
- "ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/#{version.chop}/ncbi-blast-#{version}-universal-macosx.tar.gz"
174
- else
175
- puts <<ERR
165
+ puts ' sequenceserver -s -d <value>'
166
+ puts
167
+ end
168
+
169
+ exit!
170
+
171
+ rescue SequenceServer::NUM_THREADS_INCORRECT => e
172
+
173
+ puts e
174
+
175
+ unless num_threads?
176
+ puts 'You can set the correct value by running:'
177
+ puts
178
+ puts ' sequenceserver -s -n <value>'
179
+ puts
180
+ end
181
+
182
+ exit!
183
+
184
+ rescue SequenceServer::EXTENSION_FILE_NOT_FOUND => e
185
+
186
+ puts e
187
+
188
+ unless require?
189
+ puts 'You can set the correct value by running:'
190
+ puts
191
+ puts ' sequenceserver -s -r <value>'
192
+ puts
193
+ end
194
+
195
+ exit!
196
+
197
+ rescue SequenceServer::BLAST_NOT_INSTALLED,
198
+ SequenceServer::BLAST_NOT_COMPATIBLE => e
199
+
200
+ # Show original error message first.
201
+ puts
202
+ puts e
203
+
204
+ # Set a flag so that if we recovered from error resulting config can be
205
+ # saved. Config will be saved unless invoked with -b option.
206
+ fetch_option(:set).value = !bin?
207
+
208
+ # Ask user if she already has BLAST+ downloaded or offer to download
209
+ # BLAST+ for her.
210
+ puts
211
+ puts <<MSG
212
+ SequenceServer can use NCBI BLAST+ that you may have on your system already, or
213
+ download the correct package for itself. Please enter the path to NCBI BLAST+
214
+ or press Enter to download.
215
+
216
+ Press Ctrl+C to quit.
217
+ MSG
218
+ puts
219
+ response = Readline.readline('>> ').to_s.strip
220
+ if response.empty?
221
+ puts
222
+ puts 'Installing NCBI BLAST+.'
223
+ puts "RUBY_PLATFORM #{RUBY_PLATFORM}"
224
+
225
+ version = SequenceServer::MINIMUM_BLAST_VERSION
226
+ url = case RUBY_PLATFORM
227
+ when /i686-linux/ # 32 bit Linux
228
+ 'ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/' \
229
+ "#{version.chop}/ncbi-blast-#{version}-ia32-linux.tar.gz"
230
+ when /x86_64-linux/ # 64 bit Linux
231
+ 'ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/' \
232
+ "#{version.chop}/ncbi-blast-#{version}-x64-linux.tar.gz"
233
+ when /darwin/ # Mac
234
+ 'ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/' \
235
+ "#{version.chop}/" \
236
+ "ncbi-blast-#{version}-universal-macosx.tar.gz"
237
+ else
238
+ puts <<ERR
176
239
  ------------------------------------------------------------------------
177
240
  FAILED!! to install NCBI BLAST+.
178
241
 
@@ -184,54 +247,87 @@ https://github.com/yannickwurm/sequenceserver/issues
184
247
  ------------------------------------------------------------------------
185
248
 
186
249
  ERR
187
- end
188
-
189
- archive = File.join('/tmp', File.basename(url))
190
- system "wget -c #{url} -O #{archive} && mkdir -p ~/.sequenceserver && tar xvf #{archive} -C ~/.sequenceserver"
191
- unless $?.success?
192
- puts "*** Failed to install BLAST+."
193
- puts " You may need to download BLAST+ from - "
194
- puts " http://www.ncbi.nlm.nih.gov/blast/Blast.cgi?CMD=Web&PAGE_TYPE=BlastDocs&DOC_TYPE=Download"
195
- puts " Please ensure that you download BLAST+ version
196
- #{SequenceServer::MINIMUM_BLAST_VERSION} or higher."
197
- exit SequenceServer::EXIT_BLAST_INSTALLATION_FAILED
198
- end
199
- fetch_option(:bin).value = "~/.sequenceserver/ncbi-blast-#{version}/bin/"
200
- redo
201
- else
202
- exit e.status unless set?
250
+ end
251
+
252
+ archive = File.join('/tmp', File.basename(url))
253
+ system "wget -c #{url} -O #{archive} && mkdir -p ~/.sequenceserver" \
254
+ "&& tar xvf #{archive} -C ~/.sequenceserver"
255
+ unless $CHILD_STATUS.success?
256
+ puts 'Failed to install BLAST+.'
257
+ puts ' You may need to download BLAST+ from - '
258
+ puts ' http://www.ncbi.nlm.nih.gov/blast/Blast.cgi?CMD=Web&PAGE_TYPE=BlastDocs&DOC_TYPE=Download'
259
+ puts " Please ensure that you download BLAST+ version
260
+ #{SequenceServer::MINIMUM_BLAST_VERSION} or higher."
261
+ exit!
203
262
  end
204
- when SequenceServer::EXIT_NO_SEQUENCE_DIR
205
- # Ask user for the directory containing sequences or BLAST+
206
- # databases.
263
+ fetch_option(:bin).value =
264
+ "~/.sequenceserver/ncbi-blast-#{version}/bin/"
265
+ redo
266
+ else
267
+ unless File.basename(response) == 'bin'
268
+ response = File.join(response, 'bin')
269
+ end
270
+ fetch_option(:bin).value = File.join(response)
271
+ puts
272
+ redo
273
+ end
274
+ rescue SequenceServer::DATABASE_DIR_NOT_SET => e
275
+
276
+ # Show original error message.
277
+ puts
278
+ puts e
279
+
280
+ # Set a flag so that if we recovered from error resulting config can be
281
+ # saved. Config will be saved unless invoked with -d option.
282
+ fetch_option(:set).value = !database_dir?
207
283
 
208
- # Set a flag so that if we recovered from error resulting config can be
209
- # saved. Config will be saved unless invoked with -d option.
210
- fetch_option(:set).value = !database_dir?
284
+ # Ask user for the directory containing sequences or BLAST+
285
+ # databases.
286
+ puts
287
+ puts <<MSG
288
+ SequenceServer needs to know where your FASTA files or BLAST+ databases are.
289
+ Please enter the path to the relevant directory (default: current directory).
211
290
 
291
+ Press Ctrl+C to quit.
292
+ MSG
293
+
294
+ puts
295
+ response = Readline.readline('>> ').to_s.strip
296
+ fetch_option(:database_dir).value = response
297
+ redo
298
+
299
+ rescue SequenceServer::NO_BLAST_DATABASE_FOUND => e
300
+ unless list_databases? || list_unformatted_fastas? ||
301
+ make_blast_databases?
302
+
303
+ # Print error raised.
212
304
  puts
213
- prompt = 'Where are the sequences you would like to search?' \
214
- ' (Default: current dir) '
215
- response = Readline.readline(prompt).to_s.strip
216
- fetch_option(:database_dir).value = response
217
- redo
218
- when SequenceServer::EXIT_NO_BLAST_DATABASE
219
- unless list_databases? or list_unformatted_fastas? or make_blast_databases?
220
- # Offer user to format the FASTA files.
305
+ puts e
306
+
307
+ # Offer user to format the FASTA files.
308
+ database_dir = SequenceServer[:database_dir]
309
+ puts
310
+ puts <<MSG
311
+ Search for FASTA files (.fa, .fasta, .fna) in '#{database_dir}' and try
312
+ creating BLAST+ databases? [y/n] (Default: y).
313
+ MSG
314
+ puts
315
+ print '>> '
316
+ response = STDIN.gets.to_s.strip
317
+ unless response.match(/^[n]$/i)
221
318
  puts
222
- print 'Create databases? [y/n] (Default: y): '
223
- response = STDIN.gets.to_s.strip
224
- unless response.match(/^[n]$/i)
225
- puts
226
- puts "*** Creating databases."
227
- SequenceServer::Database.make_blast_databases
228
- redo
319
+ puts 'Searching ...'
320
+ if SequenceServer::Database.unformatted_fastas.empty?
321
+ puts "Couldn't find any FASTA files."
322
+ exit!
229
323
  else
230
- exit e.status unless set?
324
+ formatted = SequenceServer::Database.make_blast_databases
325
+ exit! if formatted.empty? && !set?
326
+ redo unless set?
231
327
  end
328
+ else
329
+ exit! unless set?
232
330
  end
233
- else
234
- exit e.status
235
331
  end
236
332
  end
237
333
 
@@ -245,10 +341,11 @@ ERR
245
341
  exit
246
342
  end
247
343
 
248
- if list_unformatted_fastas? or make_blast_databases?
344
+ if list_unformatted_fastas? || make_blast_databases?
249
345
  unformatted_fastas = SequenceServer::Database.unformatted_fastas
250
346
  if unformatted_fastas.empty?
251
- puts "All FASTA files in #{SequenceServer[:database_dir]} are formatted."
347
+ puts "All FASTA files in #{SequenceServer[:database_dir]} are "\
348
+ 'formatted.'
252
349
  exit
253
350
  end
254
351
  end
@@ -264,19 +361,17 @@ ERR
264
361
  end
265
362
 
266
363
  if set?
267
- SequenceServer.send :write_config_file
364
+ SequenceServer.config.write_config_file
268
365
  exit
269
366
  end
270
367
 
271
- if fetch_option(:set).value
272
- SequenceServer.send :write_config_file
273
- end
368
+ SequenceServer.config.write_config_file if fetch_option(:set).value
274
369
 
275
370
  SequenceServer.run
276
371
  end
277
372
  end
278
373
  rescue Slop::Error => e
279
374
  puts e
280
- puts "Run '#{$0} -h' for help with command line options."
375
+ puts "Run '#{$PROGRAM_NAME} -h' for help with command line options."
281
376
  exit
282
377
  end