sequenceserver 2.0.0.rc3 → 2.0.0.rc8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (473) hide show
  1. checksums.yaml +4 -4
  2. data/bin/chromedriver +0 -0
  3. data/bin/geckodriver +0 -0
  4. data/bin/sequenceserver +39 -29
  5. data/lib/sequenceserver.rb +48 -22
  6. data/lib/sequenceserver/blast/job.rb +11 -1
  7. data/lib/sequenceserver/database.rb +7 -168
  8. data/lib/sequenceserver/exceptions.rb +14 -0
  9. data/lib/sequenceserver/makeblastdb.rb +323 -0
  10. data/lib/sequenceserver/routes.rb +6 -1
  11. data/lib/sequenceserver/sequence.rb +1 -1
  12. data/lib/sequenceserver/version.rb +1 -1
  13. data/public/css/sequenceserver.css +10 -3
  14. data/public/css/sequenceserver.min.css +1 -1
  15. data/public/js/error_modal.js +27 -29
  16. data/public/js/hit.js +14 -5
  17. data/public/js/jquery_world.js +1 -1
  18. data/public/js/query.js +31 -15
  19. data/public/js/report.js +13 -6
  20. data/public/js/search.js +44 -24
  21. data/public/js/sequence_modal.js +10 -5
  22. data/public/js/sidebar.js +52 -28
  23. data/public/sequenceserver-report.min.js +17 -17
  24. data/public/sequenceserver-search.min.js +2 -2
  25. data/views/layout.erb +5 -1
  26. data/views/report.erb +1 -1
  27. data/views/search.erb +1 -1
  28. metadata +9 -450
  29. data/.bootstrap/config.json +0 -433
  30. data/.codeclimate.yml +0 -31
  31. data/.csslintrc +0 -2
  32. data/.eslintignore +0 -1
  33. data/.eslintrc.json +0 -36
  34. data/.gitignore +0 -56
  35. data/.mailmap +0 -5
  36. data/.rspec +0 -3
  37. data/.rubocop.yml +0 -61
  38. data/.travis.yml +0 -74
  39. data/AppImage/recipe.yml +0 -15
  40. data/AppImage/sequenceserver.desktop +0 -8
  41. data/AppImage/sequenceserver.png +0 -0
  42. data/AppImage/sequenceserver.sh +0 -16
  43. data/Dockerfile +0 -23
  44. data/LICENSE.txt +0 -661
  45. data/LICENSE/Apache.txt +0 -176
  46. data/LICENSE/d3.txt +0 -26
  47. data/README.md +0 -161
  48. data/package.json +0 -48
  49. data/public/vendor/.dependencies.json +0 -18
  50. data/public/vendor/.loaderversions +0 -1
  51. data/public/vendor/github/components/jquery@2.1.4/.gitignore +0 -1
  52. data/public/vendor/github/components/jquery@2.1.4/.jspm-hash +0 -1
  53. data/public/vendor/github/components/jquery@2.1.4/.jspm.json +0 -37
  54. data/public/vendor/github/components/jqueryui@1.11.4/.gitignore +0 -4
  55. data/public/vendor/github/components/jqueryui@1.11.4/.jspm-hash +0 -1
  56. data/public/vendor/github/components/jqueryui@1.11.4/.jspm.json +0 -136
  57. data/public/vendor/github/components/jqueryui@1.11.4/ui/.jshintrc +0 -24
  58. data/public/vendor/github/jspm/nodelibs-buffer@0.1.0/.jspm-hash +0 -1
  59. data/public/vendor/github/jspm/nodelibs-buffer@0.1.0/.jspm.json +0 -10
  60. data/public/vendor/github/jspm/nodelibs-events@0.1.1/.jspm-hash +0 -1
  61. data/public/vendor/github/jspm/nodelibs-events@0.1.1/.jspm.json +0 -10
  62. data/public/vendor/github/jspm/nodelibs-fs@0.1.2/.jspm-hash +0 -1
  63. data/public/vendor/github/jspm/nodelibs-module@0.1.0/.jspm-hash +0 -1
  64. data/public/vendor/github/jspm/nodelibs-module@0.1.0/.jspm.json +0 -3
  65. data/public/vendor/github/jspm/nodelibs-path@0.1.0/.jspm-hash +0 -1
  66. data/public/vendor/github/jspm/nodelibs-path@0.1.0/.jspm.json +0 -10
  67. data/public/vendor/github/jspm/nodelibs-process@0.1.1/.jspm-hash +0 -1
  68. data/public/vendor/github/jspm/nodelibs-stream@0.1.0/.jspm-hash +0 -1
  69. data/public/vendor/github/jspm/nodelibs-stream@0.1.0/.jspm.json +0 -10
  70. data/public/vendor/github/jspm/nodelibs-util@0.1.0/.jspm-hash +0 -1
  71. data/public/vendor/github/jspm/nodelibs-util@0.1.0/.jspm.json +0 -10
  72. data/public/vendor/github/mbostock/d3@3.5.6/.jspm-hash +0 -1
  73. data/public/vendor/github/mbostock/d3@3.5.6/.jspm.json +0 -76
  74. data/public/vendor/github/nicgirault/circosJs@1.7.0/.gitignore +0 -10
  75. data/public/vendor/github/nicgirault/circosJs@1.7.0/.jspm-hash +0 -1
  76. data/public/vendor/github/systemjs/plugin-css@0.1.15/.gitignore +0 -1
  77. data/public/vendor/github/systemjs/plugin-css@0.1.15/.jspm-hash +0 -1
  78. data/public/vendor/github/systemjs/plugin-css@0.1.15/.jspm.json +0 -4
  79. data/public/vendor/github/systemjs/plugin-json@0.1.0/.jspm-hash +0 -1
  80. data/public/vendor/github/twbs/bootstrap@3.3.5/.jspm-hash +0 -1
  81. data/public/vendor/github/twbs/bootstrap@3.3.5/.jspm.json +0 -100
  82. data/public/vendor/npm/amdefine@1.0.0/.jspm-hash +0 -1
  83. data/public/vendor/npm/amdefine@1.0.0/.jspm.json +0 -55
  84. data/public/vendor/npm/babel-core@5.8.23/.jspm-hash +0 -1
  85. data/public/vendor/npm/babel-runtime@5.8.20/.jspm-hash +0 -1
  86. data/public/vendor/npm/babel-runtime@5.8.20/.npmignore +0 -2
  87. data/public/vendor/npm/base62@0.1.1/.jspm-hash +0 -1
  88. data/public/vendor/npm/base62@0.1.1/.jspm.json +0 -49
  89. data/public/vendor/npm/base62@0.1.1/.travis.yml +0 -4
  90. data/public/vendor/npm/base64-js@0.0.8/.jspm-hash +0 -1
  91. data/public/vendor/npm/base64-js@0.0.8/.jspm.json +0 -77
  92. data/public/vendor/npm/base64-js@0.0.8/.travis.yml +0 -5
  93. data/public/vendor/npm/buffer@3.4.3/.jspm-hash +0 -1
  94. data/public/vendor/npm/buffer@3.4.3/.jspm.json +0 -105
  95. data/public/vendor/npm/buffer@3.4.3/.npmignore +0 -1
  96. data/public/vendor/npm/buffer@3.4.3/.travis.yml +0 -8
  97. data/public/vendor/npm/buffer@3.4.3/.zuul.yml +0 -20
  98. data/public/vendor/npm/core-js@1.1.2/.eslintrc +0 -36
  99. data/public/vendor/npm/core-js@1.1.2/.gitattributes +0 -1
  100. data/public/vendor/npm/core-js@1.1.2/.jspm-hash +0 -1
  101. data/public/vendor/npm/core-js@1.1.2/.npmignore +0 -10
  102. data/public/vendor/npm/core-js@1.1.2/.travis.yml +0 -3
  103. data/public/vendor/npm/core-util-is@1.0.1/.jspm-hash +0 -1
  104. data/public/vendor/npm/core-util-is@1.0.1/.jspm.json +0 -58
  105. data/public/vendor/npm/envify@3.4.0/.jspm-hash +0 -1
  106. data/public/vendor/npm/envify@3.4.0/.jspm.json +0 -72
  107. data/public/vendor/npm/envify@3.4.0/.npmignore +0 -2
  108. data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/.jspm-hash +0 -1
  109. data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/.jspm.json +0 -102
  110. data/public/vendor/npm/events@1.0.2/.jspm-hash +0 -1
  111. data/public/vendor/npm/events@1.0.2/.jspm.json +0 -67
  112. data/public/vendor/npm/events@1.0.2/.npmignore +0 -1
  113. data/public/vendor/npm/events@1.0.2/.travis.yml +0 -7
  114. data/public/vendor/npm/events@1.0.2/.zuul.yml +0 -12
  115. data/public/vendor/npm/font-awesome@4.4.0/.jspm-hash +0 -1
  116. data/public/vendor/npm/font-awesome@4.4.0/.jspm.json +0 -81
  117. data/public/vendor/npm/font-awesome@4.4.0/.npmignore +0 -42
  118. data/public/vendor/npm/ieee754@1.1.6/.jspm-hash +0 -1
  119. data/public/vendor/npm/ieee754@1.1.6/.jspm.json +0 -70
  120. data/public/vendor/npm/ieee754@1.1.6/.travis.yml +0 -7
  121. data/public/vendor/npm/ieee754@1.1.6/.zuul.yml +0 -20
  122. data/public/vendor/npm/inherits@2.0.1/.jspm-hash +0 -1
  123. data/public/vendor/npm/inherits@2.0.1/.jspm.json +0 -60
  124. data/public/vendor/npm/is-array@1.0.1/.jepso-ci.json +0 -3
  125. data/public/vendor/npm/is-array@1.0.1/.jspm-hash +0 -1
  126. data/public/vendor/npm/is-array@1.0.1/.jspm.json +0 -42
  127. data/public/vendor/npm/is-array@1.0.1/.npmignore +0 -0
  128. data/public/vendor/npm/isarray@0.0.1/.jspm-hash +0 -1
  129. data/public/vendor/npm/isarray@0.0.1/.jspm.json +0 -51
  130. data/public/vendor/npm/jstransform@10.1.0/.jshintrc +0 -28
  131. data/public/vendor/npm/jstransform@10.1.0/.jspm-hash +0 -1
  132. data/public/vendor/npm/jstransform@10.1.0/.jspm.json +0 -95
  133. data/public/vendor/npm/jstransform@10.1.0/.npmignore +0 -4
  134. data/public/vendor/npm/jstransform@10.1.0/.travis.yml +0 -8
  135. data/public/vendor/npm/path-browserify@0.0.0/.jspm-hash +0 -1
  136. data/public/vendor/npm/path-browserify@0.0.0/.jspm.json +0 -56
  137. data/public/vendor/npm/process@0.10.1/.jspm-hash +0 -1
  138. data/public/vendor/npm/react@0.13.3/.jspm-hash +0 -1
  139. data/public/vendor/npm/react@0.13.3/.jspm.json +0 -77
  140. data/public/vendor/npm/readable-stream@1.1.13/.jspm-hash +0 -1
  141. data/public/vendor/npm/readable-stream@1.1.13/.jspm.json +0 -95
  142. data/public/vendor/npm/readable-stream@1.1.13/.npmignore +0 -5
  143. data/public/vendor/npm/source-map@0.1.31/.jspm-hash +0 -1
  144. data/public/vendor/npm/source-map@0.1.31/.jspm.json +0 -133
  145. data/public/vendor/npm/source-map@0.1.31/.npmignore +0 -2
  146. data/public/vendor/npm/source-map@0.1.31/.travis.yml +0 -4
  147. data/public/vendor/npm/stream-browserify@1.0.0/.jspm-hash +0 -1
  148. data/public/vendor/npm/stream-browserify@1.0.0/.jspm.json +0 -77
  149. data/public/vendor/npm/stream-browserify@1.0.0/.travis.yml +0 -4
  150. data/public/vendor/npm/string_decoder@0.10.31/.jspm-hash +0 -1
  151. data/public/vendor/npm/string_decoder@0.10.31/.jspm.json +0 -58
  152. data/public/vendor/npm/string_decoder@0.10.31/.npmignore +0 -2
  153. data/public/vendor/npm/through@2.3.8/.jspm-hash +0 -1
  154. data/public/vendor/npm/through@2.3.8/.jspm.json +0 -72
  155. data/public/vendor/npm/through@2.3.8/.travis.yml +0 -5
  156. data/public/vendor/npm/underscore@1.8.3/.jspm-hash +0 -1
  157. data/public/vendor/npm/underscore@1.8.3/.jspm.json +0 -74
  158. data/public/vendor/npm/util@0.10.3/.jspm-hash +0 -1
  159. data/public/vendor/npm/util@0.10.3/.jspm.json +0 -58
  160. data/public/vendor/npm/util@0.10.3/.npmignore +0 -1
  161. data/public/vendor/npm/util@0.10.3/.travis.yml +0 -8
  162. data/public/vendor/npm/util@0.10.3/.zuul.yml +0 -10
  163. data/public/vendor/npm/webshim@1.15.8/.gitattributes +0 -12
  164. data/public/vendor/npm/webshim@1.15.8/.jspm-hash +0 -1
  165. data/public/vendor/npm/webshim@1.15.8/.jspm.json +0 -92
  166. data/public/vendor/npm/webshim@1.15.8/.npmignore +0 -16
  167. data/public/vendor/npm/webshim@1.15.8/.project +0 -12
  168. data/public/vendor/npm/webshim@1.15.8/demos/demos/filereader/upload/.keep +0 -0
  169. data/sequenceserver.gemspec +0 -55
  170. data/spec/blast_versions/blast_2.2.30/blast_2.2.30_spec.rb +0 -228
  171. data/spec/blast_versions/blast_2.2.30/import_spec_capybara_local_2.2.30.rb +0 -583
  172. data/spec/blast_versions/blast_2.2.31/blast_2.2.31_spec.rb +0 -228
  173. data/spec/blast_versions/blast_2.2.31/import_spec_capybara_local_2.2.31.rb +0 -587
  174. data/spec/blast_versions/blast_2.3.0/blast_2.3.0_spec.rb +0 -229
  175. data/spec/blast_versions/blast_2.3.0/import_spec_capybara_local_2.3.0.rb +0 -587
  176. data/spec/blast_versions/blast_2.4.0/blast_2.4.0_spec.rb +0 -228
  177. data/spec/blast_versions/blast_2.4.0/import_spec_capybara_local_2.4.0.rb +0 -588
  178. data/spec/blast_versions/blast_2.5.0/blast_2.5.0_spec.rb +0 -228
  179. data/spec/blast_versions/blast_2.5.0/import_spec_capybara_local_2.5.0.rb +0 -587
  180. data/spec/blast_versions/blast_2.6.0/blast_2.6.0_spec.rb +0 -228
  181. data/spec/blast_versions/blast_2.6.0/import_spec_capybara_local_2.6.0.rb +0 -587
  182. data/spec/blast_versions/blast_2.7.1/blast_2.7.1_spec.rb +0 -228
  183. data/spec/blast_versions/blast_2.7.1/import_spec_capybara_local_2.7.1.rb +0 -587
  184. data/spec/blast_versions/blast_2.8.1/blast_2.8.1_spec.rb +0 -228
  185. data/spec/blast_versions/blast_2.8.1/import_spec_capybara_local_2.8.1.rb +0 -587
  186. data/spec/blast_versions/blast_2.9.0/blast_2.9.0_spec.rb +0 -228
  187. data/spec/blast_versions/blast_2.9.0/import_spec_capybara_local_2.9.0.rb +0 -585
  188. data/spec/blast_versions/diamond_0.9.24/diamond_0.9.24_spec.rb +0 -176
  189. data/spec/blast_versions/diamond_0.9.24/import_spec_capybara_local_0.9.24.rb +0 -237
  190. data/spec/capybara_spec.rb +0 -334
  191. data/spec/config_spec.rb +0 -87
  192. data/spec/database/funky_ids/funky_ids.fa +0 -16
  193. data/spec/database/funky_ids/funky_ids.fa.nhd +0 -8
  194. data/spec/database/funky_ids/funky_ids.fa.nhi +0 -0
  195. data/spec/database/funky_ids/funky_ids.fa.nhr +0 -0
  196. data/spec/database/funky_ids/funky_ids.fa.nin +0 -0
  197. data/spec/database/funky_ids/funky_ids.fa.nog +0 -0
  198. data/spec/database/funky_ids/funky_ids.fa.nsd +0 -15
  199. data/spec/database/funky_ids/funky_ids.fa.nsi +0 -0
  200. data/spec/database/funky_ids/funky_ids.fa.nsq +0 -0
  201. data/spec/database/funky_sequences/README.md +0 -14
  202. data/spec/database/funky_sequences/funky_aa_sequences.fa +0 -7
  203. data/spec/database/funky_sequences/funky_aa_sequences.fa.phd +0 -3
  204. data/spec/database/funky_sequences/funky_aa_sequences.fa.phi +0 -0
  205. data/spec/database/funky_sequences/funky_aa_sequences.fa.phr +0 -0
  206. data/spec/database/funky_sequences/funky_aa_sequences.fa.pin +0 -0
  207. data/spec/database/funky_sequences/funky_aa_sequences.fa.pog +0 -0
  208. data/spec/database/funky_sequences/funky_aa_sequences.fa.psd +0 -6
  209. data/spec/database/funky_sequences/funky_aa_sequences.fa.psi +0 -0
  210. data/spec/database/funky_sequences/funky_aa_sequences.fa.psq +0 -0
  211. data/spec/database/funky_sequences/funky_na_sequences.fa +0 -2
  212. data/spec/database/funky_sequences/funky_na_sequences.fa.nhr +0 -0
  213. data/spec/database/funky_sequences/funky_na_sequences.fa.nin +0 -0
  214. data/spec/database/funky_sequences/funky_na_sequences.fa.nog +0 -0
  215. data/spec/database/funky_sequences/funky_na_sequences.fa.nsd +0 -2
  216. data/spec/database/funky_sequences/funky_na_sequences.fa.nsi +0 -0
  217. data/spec/database/funky_sequences/funky_na_sequences.fa.nsq +0 -0
  218. data/spec/database/ox_parse_error/query.fa +0 -1
  219. data/spec/database/ox_parse_error/rand1.fa +0 -2
  220. data/spec/database/ox_parse_error/rand1.fa.nhd +0 -1
  221. data/spec/database/ox_parse_error/rand1.fa.nhi +0 -0
  222. data/spec/database/ox_parse_error/rand1.fa.nhr +0 -0
  223. data/spec/database/ox_parse_error/rand1.fa.nin +0 -0
  224. data/spec/database/ox_parse_error/rand1.fa.nog +0 -0
  225. data/spec/database/ox_parse_error/rand1.fa.nsd +0 -2
  226. data/spec/database/ox_parse_error/rand1.fa.nsi +0 -0
  227. data/spec/database/ox_parse_error/rand1.fa.nsq +0 -0
  228. data/spec/database/ox_parse_error/rand2.fa +0 -2
  229. data/spec/database/ox_parse_error/rand2.fa.nhd +0 -1
  230. data/spec/database/ox_parse_error/rand2.fa.nhi +0 -0
  231. data/spec/database/ox_parse_error/rand2.fa.nhr +0 -0
  232. data/spec/database/ox_parse_error/rand2.fa.nin +0 -0
  233. data/spec/database/ox_parse_error/rand2.fa.nog +0 -0
  234. data/spec/database/ox_parse_error/rand2.fa.nsd +0 -2
  235. data/spec/database/ox_parse_error/rand2.fa.nsi +0 -0
  236. data/spec/database/ox_parse_error/rand2.fa.nsq +0 -0
  237. data/spec/database/ox_parse_error_unique_ids/query.fa +0 -1
  238. data/spec/database/ox_parse_error_unique_ids/rand1.fa +0 -2
  239. data/spec/database/ox_parse_error_unique_ids/rand1.fa.nhd +0 -1
  240. data/spec/database/ox_parse_error_unique_ids/rand1.fa.nhi +0 -0
  241. data/spec/database/ox_parse_error_unique_ids/rand1.fa.nhr +0 -0
  242. data/spec/database/ox_parse_error_unique_ids/rand1.fa.nin +0 -0
  243. data/spec/database/ox_parse_error_unique_ids/rand1.fa.nog +0 -0
  244. data/spec/database/ox_parse_error_unique_ids/rand1.fa.nsd +0 -2
  245. data/spec/database/ox_parse_error_unique_ids/rand1.fa.nsi +0 -0
  246. data/spec/database/ox_parse_error_unique_ids/rand1.fa.nsq +0 -0
  247. data/spec/database/ox_parse_error_unique_ids/rand2.fa +0 -2
  248. data/spec/database/ox_parse_error_unique_ids/rand2.fa.nhd +0 -1
  249. data/spec/database/ox_parse_error_unique_ids/rand2.fa.nhi +0 -0
  250. data/spec/database/ox_parse_error_unique_ids/rand2.fa.nhr +0 -0
  251. data/spec/database/ox_parse_error_unique_ids/rand2.fa.nin +0 -0
  252. data/spec/database/ox_parse_error_unique_ids/rand2.fa.nog +0 -0
  253. data/spec/database/ox_parse_error_unique_ids/rand2.fa.nsd +0 -2
  254. data/spec/database/ox_parse_error_unique_ids/rand2.fa.nsi +0 -0
  255. data/spec/database/ox_parse_error_unique_ids/rand2.fa.nsq +0 -0
  256. data/spec/database/pipe_in_seqid/pipe_in_seqid.fa +0 -6
  257. data/spec/database/pipe_in_seqid/pipe_in_seqid.fa.nhd +0 -1
  258. data/spec/database/pipe_in_seqid/pipe_in_seqid.fa.nhi +0 -0
  259. data/spec/database/pipe_in_seqid/pipe_in_seqid.fa.nhr +0 -0
  260. data/spec/database/pipe_in_seqid/pipe_in_seqid.fa.nin +0 -0
  261. data/spec/database/pipe_in_seqid/pipe_in_seqid.fa.nog +0 -0
  262. data/spec/database/pipe_in_seqid/pipe_in_seqid.fa.nsd +0 -2
  263. data/spec/database/pipe_in_seqid/pipe_in_seqid.fa.nsi +0 -0
  264. data/spec/database/pipe_in_seqid/pipe_in_seqid.fa.nsq +0 -0
  265. data/spec/database/sample/genome/Solenopsis_invicta/Solenopsis_invicta_gnG_subset.fasta.nhd +0 -8
  266. data/spec/database/sample/genome/Solenopsis_invicta/Solenopsis_invicta_gnG_subset.fasta.nhi +0 -0
  267. data/spec/database/sample/genome/Solenopsis_invicta/Solenopsis_invicta_gnG_subset.fasta.nhr +0 -0
  268. data/spec/database/sample/genome/Solenopsis_invicta/Solenopsis_invicta_gnG_subset.fasta.nin +0 -0
  269. data/spec/database/sample/genome/Solenopsis_invicta/Solenopsis_invicta_gnG_subset.fasta.nog +0 -0
  270. data/spec/database/sample/genome/Solenopsis_invicta/Solenopsis_invicta_gnG_subset.fasta.nsd +0 -16
  271. data/spec/database/sample/genome/Solenopsis_invicta/Solenopsis_invicta_gnG_subset.fasta.nsi +0 -0
  272. data/spec/database/sample/genome/Solenopsis_invicta/Solenopsis_invicta_gnG_subset.fasta.nsq +0 -0
  273. data/spec/database/sample/genome/Solenopsis_invicta/Solenopsis_invicta_gnG_subset.txt +0 -8
  274. data/spec/database/sample/links.rb +0 -23
  275. data/spec/database/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta +0 -6449
  276. data/spec/database/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta.phd +0 -1189
  277. data/spec/database/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta.phi +0 -0
  278. data/spec/database/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta.phr +0 -0
  279. data/spec/database/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta.pin +0 -0
  280. data/spec/database/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta.pog +0 -0
  281. data/spec/database/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta.psd +0 -2378
  282. data/spec/database/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta.psi +0 -0
  283. data/spec/database/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta.psq +0 -0
  284. data/spec/database/sample/proteins/uniprot/2018-04-Swiss-Prot_insecta.fasta.phd +0 -9140
  285. data/spec/database/sample/proteins/uniprot/2018-04-Swiss-Prot_insecta.fasta.phi +0 -0
  286. data/spec/database/sample/proteins/uniprot/2018-04-Swiss-Prot_insecta.fasta.phr +0 -0
  287. data/spec/database/sample/proteins/uniprot/2018-04-Swiss-Prot_insecta.fasta.pin +0 -0
  288. data/spec/database/sample/proteins/uniprot/2018-04-Swiss-Prot_insecta.fasta.pog +0 -0
  289. data/spec/database/sample/proteins/uniprot/2018-04-Swiss-Prot_insecta.fasta.psd +0 -18280
  290. data/spec/database/sample/proteins/uniprot/2018-04-Swiss-Prot_insecta.fasta.psi +0 -0
  291. data/spec/database/sample/proteins/uniprot/2018-04-Swiss-Prot_insecta.fasta.psq +0 -0
  292. data/spec/database/sample/proteins/uniprot/URL +0 -1
  293. data/spec/database/sample/si_uniprot_idmap.yml +0 -14180
  294. data/spec/database/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta +0 -5486
  295. data/spec/database/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta.nhd +0 -473
  296. data/spec/database/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta.nhi +0 -0
  297. data/spec/database/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta.nhr +0 -0
  298. data/spec/database/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta.nin +0 -0
  299. data/spec/database/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta.nog +0 -0
  300. data/spec/database/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta.nsd +0 -946
  301. data/spec/database/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta.nsi +0 -0
  302. data/spec/database/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta.nsq +0 -0
  303. data/spec/database/unformatted/Cardiocondyla_obscurior/Cobs1.4.proteins.fa +0 -148303
  304. data/spec/database/without_parse_seqids/without_parse_seqids.fa +0 -10
  305. data/spec/database/without_parse_seqids/without_parse_seqids.fa.phr +0 -0
  306. data/spec/database/without_parse_seqids/without_parse_seqids.fa.pin +0 -0
  307. data/spec/database/without_parse_seqids/without_parse_seqids.fa.psq +0 -0
  308. data/spec/database_spec.rb +0 -127
  309. data/spec/doctor_spec.disabled.rb +0 -107
  310. data/spec/dotdir/blast_2.2.30/blastn/BLASTN_XML_2.2.30.xml +0 -1201
  311. data/spec/dotdir/blast_2.2.30/blastn/job.yaml +0 -8
  312. data/spec/dotdir/blast_2.2.30/blastn_nohits/BLASTN_NO_HITS_XML_2.2.30.xml +0 -866
  313. data/spec/dotdir/blast_2.2.30/blastn_nohits/job.yaml +0 -8
  314. data/spec/dotdir/blast_2.2.30/blastp/BLASTP_XML_2.2.30.xml +0 -1181
  315. data/spec/dotdir/blast_2.2.30/blastp/job.yaml +0 -8
  316. data/spec/dotdir/blast_2.2.30/blastx/BLASTX_XML_2.2.30.xml +0 -1181
  317. data/spec/dotdir/blast_2.2.30/blastx/job.yaml +0 -8
  318. data/spec/dotdir/blast_2.2.30/tblastn/TBLASTN_XML_2.2.30.xml +0 -1181
  319. data/spec/dotdir/blast_2.2.30/tblastn/job.yaml +0 -8
  320. data/spec/dotdir/blast_2.2.30/tblastx/TBLASTX_XML_2.2.30.xml +0 -8857
  321. data/spec/dotdir/blast_2.2.30/tblastx/job.yaml +0 -8
  322. data/spec/dotdir/blast_2.2.31/blastn/BLASTN_XML_2.2.31.xml +0 -1201
  323. data/spec/dotdir/blast_2.2.31/blastn/job.yaml +0 -8
  324. data/spec/dotdir/blast_2.2.31/blastn_nohits/BLASTN_NO_HITS_XML_2.2.31.xml +0 -866
  325. data/spec/dotdir/blast_2.2.31/blastn_nohits/job.yaml +0 -8
  326. data/spec/dotdir/blast_2.2.31/blastp/BLASTP_XML_2.2.31.xml +0 -1181
  327. data/spec/dotdir/blast_2.2.31/blastp/job.yaml +0 -8
  328. data/spec/dotdir/blast_2.2.31/blastx/BLASTX_XML_2.2.31.xml +0 -1181
  329. data/spec/dotdir/blast_2.2.31/blastx/job.yaml +0 -8
  330. data/spec/dotdir/blast_2.2.31/tblastn/TBLASTN_XML_2.2.31.xml +0 -1181
  331. data/spec/dotdir/blast_2.2.31/tblastn/job.yaml +0 -8
  332. data/spec/dotdir/blast_2.2.31/tblastx/TBLASTX_XML_2.2.31.xml +0 -8857
  333. data/spec/dotdir/blast_2.2.31/tblastx/job.yaml +0 -8
  334. data/spec/dotdir/blast_2.3.0/blastn/BLASTN_XML_2.3.0.xml +0 -1201
  335. data/spec/dotdir/blast_2.3.0/blastn/job.yaml +0 -8
  336. data/spec/dotdir/blast_2.3.0/blastn_nohits/BLASTN_NO_HITS_XML_2.3.0.xml +0 -866
  337. data/spec/dotdir/blast_2.3.0/blastn_nohits/job.yaml +0 -8
  338. data/spec/dotdir/blast_2.3.0/blastp/BLASTP_XML_2.3.0.xml +0 -1181
  339. data/spec/dotdir/blast_2.3.0/blastp/job.yaml +0 -8
  340. data/spec/dotdir/blast_2.3.0/blastx/BLASTX_XML_2.3.0.xml +0 -1181
  341. data/spec/dotdir/blast_2.3.0/blastx/job.yaml +0 -8
  342. data/spec/dotdir/blast_2.3.0/tblastn/TBLASTN_XML_2.3.0.xml +0 -1181
  343. data/spec/dotdir/blast_2.3.0/tblastn/job.yaml +0 -8
  344. data/spec/dotdir/blast_2.3.0/tblastx/TBLASTX_XML_2.3.0.xml +0 -8857
  345. data/spec/dotdir/blast_2.3.0/tblastx/job.yaml +0 -8
  346. data/spec/dotdir/blast_2.4.0/blastn/BLASTN_XML_2.4.0.xml +0 -1201
  347. data/spec/dotdir/blast_2.4.0/blastn/job.yaml +0 -8
  348. data/spec/dotdir/blast_2.4.0/blastn_nohits/BLASTN_NO_HITS_XML_2.4.0.xml +0 -866
  349. data/spec/dotdir/blast_2.4.0/blastn_nohits/job.yaml +0 -8
  350. data/spec/dotdir/blast_2.4.0/blastp/BLASTP_XML_2.4.0.xml +0 -1181
  351. data/spec/dotdir/blast_2.4.0/blastp/job.yaml +0 -8
  352. data/spec/dotdir/blast_2.4.0/blastx/BLASTX_XML_2.4.0.xml +0 -1181
  353. data/spec/dotdir/blast_2.4.0/blastx/job.yaml +0 -8
  354. data/spec/dotdir/blast_2.4.0/tblastn/TBLASTN_XML_2.4.0.xml +0 -1181
  355. data/spec/dotdir/blast_2.4.0/tblastn/job.yaml +0 -8
  356. data/spec/dotdir/blast_2.4.0/tblastx/TBLASTX_XML_2.4.0.xml +0 -8857
  357. data/spec/dotdir/blast_2.4.0/tblastx/job.yaml +0 -8
  358. data/spec/dotdir/blast_2.5.0/blastn/BLASTN_XML_2.5.0.xml +0 -1201
  359. data/spec/dotdir/blast_2.5.0/blastn/job.yaml +0 -8
  360. data/spec/dotdir/blast_2.5.0/blastn_nohits/BLASTN_NO_HITS_XML_2.5.0.xml +0 -866
  361. data/spec/dotdir/blast_2.5.0/blastn_nohits/job.yaml +0 -8
  362. data/spec/dotdir/blast_2.5.0/blastp/BLASTP +0 -2161
  363. data/spec/dotdir/blast_2.5.0/blastp/BLASTP_XML_2.5.0.xml +0 -1181
  364. data/spec/dotdir/blast_2.5.0/blastp/job.yaml +0 -8
  365. data/spec/dotdir/blast_2.5.0/blastx/BLASTX +0 -28080
  366. data/spec/dotdir/blast_2.5.0/blastx/BLASTX_XML_2.5.0.xml +0 -1181
  367. data/spec/dotdir/blast_2.5.0/blastx/job.yaml +0 -8
  368. data/spec/dotdir/blast_2.5.0/tblastn/TBLASTN +0 -29486
  369. data/spec/dotdir/blast_2.5.0/tblastn/TBLASTN_XML_2.5.0.xml +0 -1181
  370. data/spec/dotdir/blast_2.5.0/tblastn/job.yaml +0 -8
  371. data/spec/dotdir/blast_2.5.0/tblastx/TBLASTX +0 -180859
  372. data/spec/dotdir/blast_2.5.0/tblastx/TBLASTX_XML_2.5.0.xml +0 -8857
  373. data/spec/dotdir/blast_2.5.0/tblastx/job.yaml +0 -8
  374. data/spec/dotdir/blast_2.6.0/blastn/BLASTN_XML_2.6.0.xml +0 -1201
  375. data/spec/dotdir/blast_2.6.0/blastn/job.yaml +0 -8
  376. data/spec/dotdir/blast_2.6.0/blastn_nohits/BLASTN_NO_HITS_XML_2.6.0.xml +0 -866
  377. data/spec/dotdir/blast_2.6.0/blastn_nohits/job.yaml +0 -8
  378. data/spec/dotdir/blast_2.6.0/blastp/BLASTP_XML_2.6.0.xml +0 -1181
  379. data/spec/dotdir/blast_2.6.0/blastp/job.yaml +0 -8
  380. data/spec/dotdir/blast_2.6.0/blastx/BLASTX_XML_2.6.0.xml +0 -1181
  381. data/spec/dotdir/blast_2.6.0/blastx/job.yaml +0 -8
  382. data/spec/dotdir/blast_2.6.0/tblastn/TBLASTN_XML_2.6.0.xml +0 -1181
  383. data/spec/dotdir/blast_2.6.0/tblastn/job.yaml +0 -8
  384. data/spec/dotdir/blast_2.6.0/tblastx/TBLASTX_XML_2.6.0.xml +0 -8857
  385. data/spec/dotdir/blast_2.6.0/tblastx/job.yaml +0 -8
  386. data/spec/dotdir/blast_2.7.1/blastn/BLASTN_XML_2.7.1.xml +0 -1201
  387. data/spec/dotdir/blast_2.7.1/blastn/job.yaml +0 -8
  388. data/spec/dotdir/blast_2.7.1/blastn_nohits/BLASTN_NO_HITS_XML_2.7.1.xml +0 -866
  389. data/spec/dotdir/blast_2.7.1/blastn_nohits/job.yaml +0 -8
  390. data/spec/dotdir/blast_2.7.1/blastp/BLASTP_XML_2.7.1.xml +0 -1181
  391. data/spec/dotdir/blast_2.7.1/blastp/job.yaml +0 -8
  392. data/spec/dotdir/blast_2.7.1/blastx/BLASTX_XML_2.7.1.xml +0 -1181
  393. data/spec/dotdir/blast_2.7.1/blastx/job.yaml +0 -8
  394. data/spec/dotdir/blast_2.7.1/tblastn/TBLASTN_XML_2.7.1.xml +0 -1181
  395. data/spec/dotdir/blast_2.7.1/tblastn/job.yaml +0 -8
  396. data/spec/dotdir/blast_2.7.1/tblastx/TBLASTX_XML_2.7.1.xml +0 -8857
  397. data/spec/dotdir/blast_2.7.1/tblastx/job.yaml +0 -8
  398. data/spec/dotdir/blast_2.8.1/blastn/BLASTN_XML_2.8.1.xml +0 -1201
  399. data/spec/dotdir/blast_2.8.1/blastn/job.yaml +0 -8
  400. data/spec/dotdir/blast_2.8.1/blastn_nohits/BLASTN_NO_HITS_XML_2.8.1.xml +0 -866
  401. data/spec/dotdir/blast_2.8.1/blastn_nohits/job.yaml +0 -8
  402. data/spec/dotdir/blast_2.8.1/blastp/BLASTP_XML_2.8.1.xml +0 -1181
  403. data/spec/dotdir/blast_2.8.1/blastp/job.yaml +0 -8
  404. data/spec/dotdir/blast_2.8.1/blastx/BLASTX_XML_2.8.1.xml +0 -1181
  405. data/spec/dotdir/blast_2.8.1/blastx/job.yaml +0 -8
  406. data/spec/dotdir/blast_2.8.1/tblastn/TBLASTN_XML_2.8.1.xml +0 -1181
  407. data/spec/dotdir/blast_2.8.1/tblastn/job.yaml +0 -8
  408. data/spec/dotdir/blast_2.8.1/tblastx/TBLASTX_XML_2.8.1.xml +0 -8857
  409. data/spec/dotdir/blast_2.8.1/tblastx/job.yaml +0 -8
  410. data/spec/dotdir/blast_2.9.0/blastn/BLASTN_XML_2.9.0.xml +0 -1201
  411. data/spec/dotdir/blast_2.9.0/blastn/job.yaml +0 -8
  412. data/spec/dotdir/blast_2.9.0/blastn_nohits/BLASTN_NO_HITS_XML_2.9.0.xml +0 -866
  413. data/spec/dotdir/blast_2.9.0/blastn_nohits/job.yaml +0 -8
  414. data/spec/dotdir/blast_2.9.0/blastp/BLASTP_XML_2.9.0.xml +0 -1181
  415. data/spec/dotdir/blast_2.9.0/blastp/job.yaml +0 -8
  416. data/spec/dotdir/blast_2.9.0/blastx/BLASTX_XML_2.9.0.xml +0 -1181
  417. data/spec/dotdir/blast_2.9.0/blastx/job.yaml +0 -8
  418. data/spec/dotdir/blast_2.9.0/tblastn/TBLASTN_XML_2.9.0.xml +0 -1181
  419. data/spec/dotdir/blast_2.9.0/tblastn/job.yaml +0 -8
  420. data/spec/dotdir/blast_2.9.0/tblastx/TBLASTX_XML_2.9.0.xml +0 -8857
  421. data/spec/dotdir/blast_2.9.0/tblastx/job.yaml +0 -8
  422. data/spec/dotdir/diamond_0.9.24/blastp/DIAMOND_BLASTP_0.9.24.xml +0 -1040
  423. data/spec/dotdir/diamond_0.9.24/blastp/job.yaml +0 -8
  424. data/spec/dotdir/diamond_0.9.24/blastx/DIAMOND_BLASTX_0.9.24.xml +0 -1040
  425. data/spec/dotdir/diamond_0.9.24/blastx/job.yaml +0 -8
  426. data/spec/dotdir/diamond_0.9.24/blastx_nohits/DIAMOND_BLASTX_NOHITS_0.9.24.xml +0 -41
  427. data/spec/dotdir/diamond_0.9.24/blastx_nohits/job.yaml +0 -8
  428. data/spec/download_helper.rb +0 -35
  429. data/spec/empty_config.yml +0 -0
  430. data/spec/routes_spec.rb +0 -93
  431. data/spec/sample.conf +0 -2
  432. data/spec/sequence_spec.rb +0 -100
  433. data/spec/sequences/MH011443_1_gi_1486783306_gb_MH011443_1.txt +0 -6
  434. data/spec/sequences/MH011443_1_gi_1486783307_gb_AYF55702_1.txt +0 -6
  435. data/spec/sequences/MH011443_1_gi_1528997474_gb_MH447967_1.txt +0 -30
  436. data/spec/sequences/MH011443_1_sp_P04637_P53_HUMAN.txt +0 -6
  437. data/spec/sequences/Nucleotide_TP53_COX41.fasta +0 -15
  438. data/spec/sequences/Protein_TP53_COX41.fasta +0 -12
  439. data/spec/sequences/Query_1_SI2_2_0_06267.txt +0 -6
  440. data/spec/sequences/alignment-2_hits.txt +0 -12
  441. data/spec/sequences/alignment-35_hits_diamond_blastp.txt +0 -210
  442. data/spec/sequences/alignment-35_hits_diamond_blastx.txt +0 -210
  443. data/spec/sequences/alignment-3_hits.txt +0 -18
  444. data/spec/sequences/alignment-40_hits_blastn.txt +0 -246
  445. data/spec/sequences/alignment-40_hits_blastp.txt +0 -240
  446. data/spec/sequences/alignment-40_hits_blastp_2.2.30.txt +0 -240
  447. data/spec/sequences/alignment-40_hits_blastx.txt +0 -240
  448. data/spec/sequences/alignment-40_hits_tblastn.txt +0 -240
  449. data/spec/sequences/alignment-40_hits_tblastn_2.2.30.txt +0 -240
  450. data/spec/sequences/alignment-40_hits_tblastx.txt +0 -2664
  451. data/spec/sequences/alignment-4_hits.txt +0 -24
  452. data/spec/sequences/alignment-4_hits_blastn.txt +0 -24
  453. data/spec/sequences/alignment-4_hits_blastp.txt +0 -24
  454. data/spec/sequences/alignment-4_hits_blastp_2.2.30.txt +0 -24
  455. data/spec/sequences/alignment-4_hits_blastx.txt +0 -24
  456. data/spec/sequences/alignment-4_hits_diamond_blastp.txt +0 -24
  457. data/spec/sequences/alignment-4_hits_diamond_blastx.txt +0 -24
  458. data/spec/sequences/alignment-4_hits_tblastn.txt +0 -24
  459. data/spec/sequences/alignment-4_hits_tblastn_2.2.30.txt +0 -24
  460. data/spec/sequences/alignment-4_hits_tblastx.txt +0 -318
  461. data/spec/sequences/nucleotide_query.fa +0 -21
  462. data/spec/sequences/problematic_query.fa +0 -5
  463. data/spec/sequences/protein_query.fa +0 -9
  464. data/spec/sequences/sample_query_fire_ant_obps.fa +0 -44
  465. data/spec/sequences/sequenceserver-2_hits.fa +0 -10
  466. data/spec/sequences/sequenceserver-SI2.2.0_06267.fa +0 -5
  467. data/spec/sequences/sp_P04637_P53_HUMAN_gi_1099170394_ref_XP_018868681_1.txt +0 -6
  468. data/spec/sequences/sp_P04637_P53_HUMAN_gi_120407068_ref_NP_000537_3.txt +0 -6
  469. data/spec/sequences/sp_P04637_P53_HUMAN_gi_1484127324_gb_MG595988_1.txt +0 -6
  470. data/spec/sequences/sp_P04637_P53_HUMAN_gi_395440626_gb_JQ694049_1.txt +0 -6
  471. data/spec/sequences/sp_P04637_P53_HUMAN_sp_P04637_P53_HUMAN.txt +0 -6
  472. data/spec/sequenceserver_spec.rb +0 -90
  473. data/spec/spec_helper.rb +0 -63
@@ -1,176 +0,0 @@
1
- require 'spec_helper'
2
-
3
- # Test BLAST module.
4
- module SequenceServer
5
-
6
- with_hits = Job.fetch('diamond_0.9.24/blastx')
7
- no_hits = Job.fetch('diamond_0.9.24/blastx_nohits')
8
-
9
- init
10
-
11
- describe 'Report' do
12
- hits_report = BLAST::Report.new(with_hits)
13
- no_hits_report = BLAST::Report.new(no_hits)
14
-
15
- it 'will return an Array of queries' do
16
- hits_report.queries.should be_a Array
17
- no_hits_report.queries.should be_a Array
18
- end
19
-
20
- it 'will return a Hash of stats' do
21
- hits_report.stats.should be_a Hash
22
- no_hits_report.stats.should be_a Hash
23
- end
24
-
25
- it 'contains all the necessary stats' do
26
- hits_report.stats.length.should eql(7)
27
- no_hits_report.stats.length.should eql(7)
28
- end
29
- end
30
-
31
- describe 'Query' do
32
- hits_report = BLAST::Report.new(with_hits)
33
- no_hits_report = BLAST::Report.new(no_hits)
34
-
35
- it 'will return queries with valid length' do
36
- hits_report.queries.first.length.should be_a Integer
37
- hits_report.queries.first.length.should satisfy { |n| n > 0 }
38
- no_hits_report.queries.first.length.should be_a Integer
39
- no_hits_report.queries.first.length.should satisfy { |n| n > 0 }
40
- end
41
-
42
- it 'will return an Array of hits' do
43
- hits_report.queries.first.hits.should be_a Array
44
- no_hits_report.queries.first.hits.should be_a Array
45
- end
46
- end
47
-
48
- describe 'Hits' do
49
- hits_report = BLAST::Report.new(with_hits)
50
- no_hits_report = BLAST::Report.new(no_hits)
51
-
52
- it 'will have non zero length' do
53
- hits_report.queries.last.hits.first.length.should satisfy { |n| n > 0 }
54
- end
55
-
56
- it 'will return an Array of HSPs' do
57
- hits_report.queries.first.hits.first.hsps.should be_a Array
58
- end
59
-
60
- it 'will return an Array with atleast one HSP' do
61
- hits_report.queries.first.hits.first.hsps.length.should be >= 1
62
- end
63
-
64
- it 'will contain no element if no hits were obtained' do
65
- no_hits_report.queries.first.hits.length.should eql(0)
66
- end
67
- end
68
-
69
- # Test general features of HSPs. Algorithm specific customizations are
70
- # tested separetly.
71
- describe 'HSPs' do
72
- hits_report = BLAST::Report.new(with_hits)
73
-
74
- # Currently using all 17 HSP parameters in BLAST Report + 1 to refer to the
75
- # hit object it belongs to.
76
- it 'have all the necessary values' do
77
- hits_report.queries.last.hits.first.hsps.last.count.should eql(19)
78
- end
79
-
80
- # Test Random HSPs to ensure that all the values from HSP struct are valid.
81
- it 'have correct alignment values' do
82
- hits_report.queries.last.hits.first.hsps.last.bit_score.should be_a Float
83
- hits_report.queries.last.hits.first.hsps.last.score.should be_a Integer
84
-
85
- hits_report.queries.first.hits.first.hsps.first.evalue.should be_a Float
86
- hits_report.queries.first.hits.first.hsps.first.evalue
87
- .should_not satisfy { |n| n < 0 }
88
-
89
- hits_report.queries.first.hits.last.hsps.first.qstart.should be_a Integer
90
- hits_report.queries.first.hits.last.hsps.first.qstart
91
- .should_not satisfy { |n| n < 0 }
92
-
93
- hits_report.queries.first.hits.last.hsps.first.qend.should be_a Integer
94
- hits_report.queries.first.hits.last.hsps.first.qend
95
- .should_not satisfy { |n| n < 0 }
96
-
97
- hits_report.queries.last.hits.last.hsps.last.sstart.should be_a Integer
98
- hits_report.queries.last.hits.last.hsps.last.sstart
99
- .should_not satisfy { |n| n < 0 }
100
-
101
- hits_report.queries.first.hits.first.hsps.last.send.should be_a Integer
102
- hits_report.queries.first.hits.first.hsps.last.send
103
- .should_not satisfy { |n| n < 0 }
104
-
105
- hits_report.queries.first.hits.first.hsps.last.qframe.should be_a Integer
106
- hits_report.queries.first.hits.first.hsps.last.sframe.should be_a Integer
107
-
108
- hits_report.queries.first.hits.first.hsps.last.identity.should be_a Integer
109
- hits_report.queries.first.hits.first.hsps.last.identity
110
- .should_not satisfy { |n| n < 0 }
111
-
112
- hits_report.queries.first.hits.first.hsps.last.gaps.should be_a Integer
113
- hits_report.queries.first.hits.first.hsps.last.gaps
114
- .should_not satisfy { |n| n < 0 }
115
-
116
- hits_report.queries.first.hits.first.hsps.last.positives
117
- .should be_a Integer
118
- hits_report.queries.first.hits.first.hsps.last.positives
119
- .should_not satisfy { |n| n < 0 }
120
-
121
- hits_report.queries.first.hits.first.hsps.last.length.should be_a Integer
122
- hits_report.queries.first.hits.first.hsps.last.length
123
- .should satisfy { |n| n > 0 }
124
-
125
- hits_report.queries.last.hits.last.hsps.first.qseq.should be_a String
126
- hits_report.queries.last.hits.last.hsps.first.sseq.should be_a String
127
- hits_report.queries.last.hits.last.hsps.first.midline.should be_a String
128
- end
129
-
130
- it 'have correctly matched query, hit and midline alignments' do
131
- hsp = hits_report.queries.last.hits.last.hsps.first
132
- hsp.qseq.length.should eql(hsp.sseq.length)
133
- hsp.sseq.length.should eql(hsp.midline.length)
134
- hsp.midline.length.should eql(hsp.qseq.length)
135
- end
136
- end
137
-
138
- # Individually test different DIAMOND BLASTP/BLASTX algorithms
139
- #
140
-
141
- describe 'diamond BLASTP' do
142
- let 'hsp' do
143
- report = BLAST::Report.new(Job.fetch('diamond_0.9.24/blastp'))
144
- report.queries.first.hits.last.hsps.first
145
- end
146
-
147
- it 'have correct query and subject frame' do
148
- hsp.qframe.should eql(0)
149
- hsp.sframe.should eql(0)
150
- end
151
-
152
- it 'have correct qstart, qend, sstart, send values' do
153
- hsp.qstart.should be <= hsp.qend
154
- hsp.sstart.should be <= hsp.send
155
- end
156
-
157
- end
158
-
159
- describe 'diamond BLASTX' do
160
- let 'hsp' do
161
- report = BLAST::Report.new(Job.fetch('diamond_0.9.24/blastx'))
162
- report.queries.first.hits.last.hsps.first
163
- end
164
-
165
- it 'have correct query and subject frame' do
166
- hsp.qframe.should_not eql(0)
167
- hsp.sframe.should eql(0)
168
- end
169
-
170
- it 'have correct qstart, qend, sstart, send' do
171
- hsp.qstart.should be <= hsp.qend
172
- hsp.sstart.should be <= hsp.send
173
- end
174
- end
175
- end
176
-
@@ -1,237 +0,0 @@
1
- describe 'report generated from imported XML', type: :feature, js: true do
2
- # Fasta files used for testing consist of TP53 and COX41 protein/nucleotide
3
- # sequences for reproducibility.
4
- it 'loads diamond BLASTP xml and tests hit alignment and sidebar Alignment download' do
5
- access_by_uuid('diamond_0.9.24/blastp')
6
- # Click on the first Alignment download button on the page and wait for the
7
- # download to finish.
8
- page.execute_script("$('.download-aln:eq(0)').click()")
9
- wait_for_download
10
- expect(File.basename(downloaded_file)).to eq('sp_P04637_P53_HUMAN_sp_P04637_P53_HUMAN.txt')
11
- expect(File.read(downloaded_file)).to eq(File.read('spec/sequences/sp_P04637_P53_HUMAN_sp_P04637_P53_HUMAN.txt'))
12
-
13
- clear_downloads
14
-
15
- # Click on the Alignment of all hits download and compare the downloaded
16
- # content
17
-
18
- page.click_link('Alignment of all hits')
19
- wait_for_download
20
-
21
- expect(File.basename(downloaded_file)).to eq('alignment-35_hits.txt')
22
- expect(File.read(downloaded_file)).to eq(File.read('spec/sequences/alignment-35_hits_diamond_blastp.txt'))
23
- clear_downloads
24
-
25
- # Check the cheboxes of indicted hits and click on the download of Alignment
26
- # of selected hits and compare the downloaded content
27
-
28
- page.check('Query_1_hit_1_checkbox')
29
- page.check('Query_1_hit_2_checkbox')
30
- page.check('Query_2_hit_1_checkbox')
31
- page.check('Query_2_hit_2_checkbox')
32
- page.click_link('Alignment of 4 selected hit(s)')
33
- wait_for_download
34
-
35
- expect(File.basename(downloaded_file)).to eq('alignment-4_hits.txt')
36
- expect(File.read(downloaded_file)).to eq(File.read('spec/sequences/alignment-4_hits_diamond_blastp.txt'))
37
- page.should have_content('BLASTP')
38
- end
39
-
40
- it 'loads diamond BLASTP XML and tests alignment overview and hit PNG/SVG download' do
41
- access_by_uuid('diamond_0.9.24/blastp')
42
-
43
- # Click on the PNG/SVG download button of the alignment overview and compare
44
- # the downloaded content.
45
-
46
- page.execute_script("$('.export-to-png:eq(0)').click()")
47
- wait_for_download
48
- expect(File.basename(downloaded_file)).to eq('Alignment-Overview-sp_P04637_P53_HUMAN.png')
49
-
50
- clear_downloads
51
-
52
- page.execute_script("$('.export-to-svg:eq(0)').click()")
53
- wait_for_download
54
- expect(File.basename(downloaded_file)).to eq('Alignment-Overview-sp_P04637_P53_HUMAN.svg')
55
-
56
- clear_downloads
57
-
58
- # Click on the PNG/SVG download button of the first hit available and
59
- # compare the downloaded content.
60
- page.execute_script("$('.export-to-png:eq(1)').click()")
61
- wait_for_download
62
- expect(File.basename(downloaded_file)).to eq('Kablammo-sp_P04637_P53_HUMAN-sp_P04637_P53_HUMAN.png')
63
-
64
- clear_downloads
65
-
66
- page.execute_script("$('.export-to-svg:eq(1)').click()")
67
- wait_for_download
68
- expect(File.basename(downloaded_file)).to eq('Kablammo-sp_P04637_P53_HUMAN-sp_P04637_P53_HUMAN.svg')
69
- page.should have_content('BLASTP')
70
- end
71
-
72
- it 'loads diamond BLASTP XML and tests Circos download' do
73
- access_by_uuid('diamond_0.9.24/blastp')
74
-
75
- # Click on the Circos expanding button, wait for animation, click on the
76
- # download of PNG/SVG file and test that it initiated a file download in a
77
- # right format.
78
-
79
- page.should have_content('Queries and their top hits: chord diagram')
80
- page.execute_script("$('.circos > .grapher-header > h5').click()")
81
- sleep 1
82
-
83
- page.execute_script("$('.export-to-png:eq(0)').click()")
84
- wait_for_download
85
- expect(File.basename(downloaded_file)).to eq('Circos-visualisation.png')
86
-
87
- clear_downloads
88
-
89
- page.execute_script("$('.export-to-svg:eq(0)').click()")
90
- wait_for_download
91
- expect(File.basename(downloaded_file)).to eq('Circos-visualisation.svg')
92
- end
93
-
94
- it 'loads BLASTP XML and tests Length distribution download' do
95
- access_by_uuid('diamond_0.9.24/blastp')
96
-
97
- # Click on the Length distribution expanding button, wait for animation,
98
- # click on the download of PNG/SVG file and test that it initiated a file
99
- # download in a right format.
100
-
101
- page.should have_content('Length distribution of hits')
102
- page.execute_script("$('.length-distribution > .grapher-header > h5').click()")
103
- sleep 1
104
-
105
- page.execute_script("$('.export-to-png:eq(1)').click()")
106
- wait_for_download
107
- expect(File.basename(downloaded_file)).to eq('length-distribution-sp_P04637_P53_HUMAN.png')
108
-
109
- clear_downloads
110
-
111
- page.execute_script("$('.export-to-svg:eq(1)').click()")
112
- wait_for_download
113
- expect(File.basename(downloaded_file)).to eq('length-distribution-sp_P04637_P53_HUMAN.svg')
114
- end
115
-
116
- # BLASTX test scenarios
117
-
118
- it 'loads diamond BLASTX XML and tests hit alignment and sidebar Alignment download' do
119
- access_by_uuid('diamond_0.9.24/blastx')
120
-
121
- # Click on the first Alignment download button on the page and wait for the
122
- # download to finish.
123
- page.execute_script("$('.download-aln:eq(0)').click()")
124
- wait_for_download
125
-
126
- expect(File.basename(downloaded_file)).to eq('MH011443_1_sp_P04637_P53_HUMAN.txt')
127
- expect(File.read(downloaded_file)).to eq(File.read('spec/sequences/MH011443_1_sp_P04637_P53_HUMAN.txt'))
128
-
129
- clear_downloads
130
-
131
- # Click on the Alignment of all hits download and compare the downloaded
132
- # content
133
-
134
- page.click_link('Alignment of all hits')
135
- wait_for_download
136
-
137
- expect(File.basename(downloaded_file)).to eq('alignment-35_hits.txt')
138
- expect(File.read(downloaded_file)).to eq(File.read('spec/sequences/alignment-35_hits_diamond_blastx.txt'))
139
- clear_downloads
140
-
141
- # Select four hit checkboxes and click on the Alignment of selected hits.
142
- # Compare the downloaded content.
143
- page.check('Query_1_hit_3_checkbox')
144
- page.check('Query_1_hit_4_checkbox')
145
- page.check('Query_2_hit_3_checkbox')
146
- page.check('Query_2_hit_4_checkbox')
147
- page.click_link('Alignment of 4 selected hit(s)')
148
- wait_for_download
149
-
150
- expect(File.basename(downloaded_file)).to eq('alignment-4_hits.txt')
151
- expect(File.read(downloaded_file)).to eq(File.read('spec/sequences/alignment-4_hits_diamond_blastx.txt'))
152
-
153
- page.should have_content('BLASTX')
154
- end
155
-
156
- it 'loads diamond BLASTX XML and tests alignment overview and hit PNG/SVG download' do
157
- access_by_uuid('diamond_0.9.24/blastx')
158
-
159
- # Click on the PNG/SVG download button of the alignment overview and compare
160
- # the downloaded content.
161
- page.execute_script("$('.export-to-png:eq(0)').click()")
162
- wait_for_download
163
- expect(File.basename(downloaded_file)).to eq('Alignment-Overview-MH011443_1.png')
164
-
165
- clear_downloads
166
-
167
- page.execute_script("$('.export-to-svg:eq(0)').click()")
168
- wait_for_download
169
- expect(File.basename(downloaded_file)).to eq('Alignment-Overview-MH011443_1.svg')
170
-
171
- clear_downloads
172
- # Click on the PNG/SVG download button of the first hit available and
173
- # compare the downloaded content.
174
- page.execute_script("$('.export-to-png:eq(1)').click()")
175
-
176
- wait_for_download
177
- expect(File.basename(downloaded_file)).to eq('Kablammo-MH011443_1-sp_P04637_P53_HUMAN.png')
178
-
179
- clear_downloads
180
-
181
- page.execute_script("$('.export-to-svg:eq(1)').click()")
182
- wait_for_download
183
- expect(File.basename(downloaded_file)).to eq('Kablammo-MH011443_1-sp_P04637_P53_HUMAN.svg')
184
- page.should have_content('BLASTX')
185
- end
186
-
187
- it 'loads diamond BLASTX XML and tests Circos download' do
188
- access_by_uuid('diamond_0.9.24/blastx')
189
- # Click on the Circos expanding button, wait for animation, click on the
190
- # download of PNG/SVG file and test that it initiated a file download in a
191
- # right format.
192
-
193
- page.should have_content('Queries and their top hits: chord diagram')
194
- page.execute_script("$('.circos > .grapher-header > h5').click()")
195
- sleep 1
196
-
197
- page.execute_script("$('.export-to-png:eq(0)').click()")
198
- wait_for_download
199
- expect(File.basename(downloaded_file)).to eq('Circos-visualisation.png')
200
-
201
- clear_downloads
202
-
203
- page.execute_script("$('.export-to-svg:eq(0)').click()")
204
- wait_for_download
205
- expect(File.basename(downloaded_file)).to eq('Circos-visualisation.svg')
206
- end
207
-
208
- it 'loads diamond BLASTX XML and tests Length distribution download' do
209
- access_by_uuid('diamond_0.9.24/blastx')
210
-
211
- # Click on the Length distribution expanding button, wait for animation,
212
- # click on the download of PNG/SVG file and test that it initiated a file
213
- # download in a right format.
214
-
215
- page.should have_content('Length distribution of hits')
216
- page.execute_script("$('.length-distribution > .grapher-header > h5').click()")
217
- sleep 1
218
-
219
- page.execute_script("$('.export-to-png:eq(1)').click()")
220
- wait_for_download
221
- expect(File.basename(downloaded_file)).to eq('length-distribution-MH011443_1.png')
222
-
223
- clear_downloads
224
-
225
- page.execute_script("$('.export-to-svg:eq(1)').click()")
226
- wait_for_download
227
- expect(File.basename(downloaded_file)).to eq('length-distribution-MH011443_1.svg')
228
- end
229
-
230
- ## Helpers ##
231
-
232
- def access_by_uuid(id)
233
- url = url_encode(id)
234
- visit "/#{url}"
235
- page.should have_content('Query')
236
- end
237
- end
@@ -1,334 +0,0 @@
1
- describe 'a browser', type: :feature, js: true do
2
- it 'properly controls blast button' do
3
- visit '/'
4
-
5
- fill_in('sequence', with: nucleotide_query)
6
- page.evaluate_script("$('#method').is(':disabled')").should eq(true)
7
-
8
- check(nucleotide_databases.first)
9
- page.evaluate_script("$('#method').is(':disabled')").should eq(false)
10
- end
11
-
12
- it 'properly controls interaction with database listing' do
13
- visit '/'
14
- fill_in('sequence', with: nucleotide_query)
15
- check(nucleotide_databases.first)
16
- page.evaluate_script("$('.protein .database').first().hasClass('disabled')")
17
- .should eq(true)
18
- end
19
-
20
- it 'shows a dropdown menu when other blast methods are available' do
21
- visit '/'
22
- fill_in('sequence', with: nucleotide_query)
23
- check(nucleotide_databases.first)
24
- page.has_css?('button.dropdown-toggle').should eq(true)
25
- end
26
-
27
- it 'can run a simple blastn search' do
28
- perform_search query: nucleotide_query,
29
- databases: nucleotide_databases
30
- page.should have_content('BLASTN')
31
- end
32
-
33
- it 'can run a simple blastp search' do
34
- perform_search query: protein_query,
35
- databases: protein_databases
36
- page.should have_content('BLASTP')
37
- end
38
-
39
- it 'can run a simple blastx search' do
40
- perform_search query: nucleotide_query,
41
- databases: protein_databases
42
- page.should have_content('BLASTX')
43
- end
44
-
45
- it 'can run a simple tblastx search' do
46
- perform_search query: nucleotide_query,
47
- databases: nucleotide_databases,
48
- method: 'tblastx'
49
- page.should have_content('TBLASTX')
50
- end
51
-
52
- it 'can run a simple tblastn search' do
53
- perform_search query: protein_query,
54
- databases: nucleotide_databases
55
- page.should have_content('TBLASTN')
56
- end
57
-
58
- ### Test aspects of the generated report.
59
-
60
- it 'can download FASTA of each hit' do
61
- # Do a BLASTP search. protein_query refers to the first two sequence in
62
- # protein_databases[0], so the top hits are the query sequences themselves.
63
- perform_search(query: protein_query,
64
- databases: protein_databases.values_at(0))
65
-
66
- # Click on the first FASTA download button on the page and wait for the
67
- # download to finish.
68
- page.execute_script("$('.download-fa:eq(0)').click()")
69
- wait_for_download
70
-
71
- # Test name and content of the downloaded file.
72
- expect(File.basename(downloaded_file))
73
- .to eq('sequenceserver-SI2.2.0_06267.fa')
74
- expect(File.read(downloaded_file))
75
- .to eq(File.read("#{__dir__}/sequences/sequenceserver-SI2.2.0_06267.fa"))
76
- end
77
-
78
- it 'can download FASTA of selected hits' do
79
- # Do a BLASTP search. protein_query refers to the first two sequence in
80
- # protein_databases[0], so the top hits are the query sequences themselves.
81
- perform_search(query: protein_query,
82
- databases: protein_databases.values_at(0))
83
-
84
- # Select first hit for each query and click 'FASTA of 2 selected hits'.
85
- page.check('Query_1_hit_1_checkbox')
86
- page.check('Query_2_hit_1_checkbox')
87
- page.click_link('FASTA of 2 selected hit(s)')
88
- wait_for_download
89
-
90
- expect(File.basename(downloaded_file)).to eq('sequenceserver-2_hits.fa')
91
- expect(File.read(downloaded_file)).to eq(File.read('spec/sequences/sequenceserver-2_hits.fa'))
92
- end
93
-
94
- it 'can download FASTA of all hits' do
95
- # Do a BLASTP search. protein_query refers to the first two sequence in
96
- # protein_databases[0], so the top hits are the query sequences themselves.
97
- perform_search(query: protein_query,
98
- databases: protein_databases.values_at(0))
99
-
100
- # Click 'FASTA of all hits'.
101
- page.click_link('FASTA of all hits')
102
- wait_for_download
103
-
104
- expect(File.basename(downloaded_file)).to eq('sequenceserver-2_hits.fa')
105
- expect(File.read(downloaded_file)).to eq(File.read('spec/sequences/sequenceserver-2_hits.fa'))
106
- end
107
-
108
- it 'can download alignment for each hit' do
109
- # Do a BLASTP search. protein_query refers to the first two sequence in
110
- # protein_databases[0], so the top hits are the query sequences themselves.
111
- perform_search(query: protein_query,
112
- databases: protein_databases.values_at(0))
113
-
114
- # Click on the first Alignment download button on the page and wait for the
115
- # download to finish.
116
- page.execute_script("$('.download-aln:eq(0)').click()")
117
- wait_for_download
118
-
119
- # Test name and content of the downloaded file.
120
- expect(File.basename(downloaded_file)).to eq('Query_1_SI2_2_0_06267.txt')
121
- expect(File.read(downloaded_file))
122
- .to eq(File.read("#{__dir__}/sequences/Query_1_SI2_2_0_06267.txt"))
123
- end
124
-
125
- it 'can download Alignment of selected hits' do
126
- # Do a BLASTP search. protein_query refers to the first two sequence in
127
- # protein_databases[0], so the top hits are the query sequences themselves.
128
- perform_search(query: protein_query,
129
- databases: protein_databases.values_at(0))
130
-
131
- # Select first hit for each query and click 'Alignment of 2 selected hits'.
132
- page.check('Query_1_hit_1_checkbox')
133
- page.check('Query_2_hit_1_checkbox')
134
- page.click_link('Alignment of 2 selected hit(s)')
135
- wait_for_download
136
-
137
- expect(File.basename(downloaded_file)).to eq('alignment-2_hits.txt')
138
- expect(File.read(downloaded_file)).to eq(File.read('spec/sequences/alignment-2_hits.txt'))
139
- end
140
-
141
- it 'can download Alignment of all hits' do
142
- # Do a BLASTP search. protein_query refers to the first two sequence in
143
- # protein_databases[0], so the top hits are the query sequences themselves.
144
- perform_search(query: protein_query,
145
- databases: protein_databases.values_at(0))
146
-
147
- # Click 'Alignment of all hits'.
148
- page.click_link('Alignment of all hits')
149
- wait_for_download
150
-
151
- expect(File.basename(downloaded_file)).to eq('alignment-2_hits.txt')
152
- expect(File.read(downloaded_file)).to eq(File.read('spec/sequences/alignment-2_hits.txt'))
153
- end
154
-
155
- it 'can download BLAST results in XML and tabular formats' do
156
- # Do a BLASTP search. protein_query refers to the first two sequence in
157
- # protein_databases[0], so the top hits are the query sequences themselves.
158
- perform_search(query: protein_query,
159
- databases: protein_databases.values_at(0))
160
-
161
- page.click_link('Standard tabular report')
162
- wait_for_download
163
- expect(File.basename(downloaded_file)).to eq('sequenceserver-std_tsv_report.tsv')
164
- clear_downloads
165
-
166
- page.click_link('Full tabular report')
167
- wait_for_download
168
- expect(File.basename(downloaded_file)).to eq('sequenceserver-full_tsv_report.tsv')
169
- clear_downloads
170
-
171
- page.click_link('Full XML report')
172
- wait_for_download
173
- expect(File.basename(downloaded_file)).to eq('sequenceserver-xml_report.xml')
174
- clear_downloads
175
- end
176
-
177
- it 'can show hit sequences in a modal' do
178
- # Do a BLASTP search. protein_query refers to the first two sequence in
179
- # protein_databases[0], so the top hits are the query sequences themselves.
180
- perform_search(query: protein_query,
181
- databases: protein_databases.values_at(0))
182
-
183
- # Click on the first sequence viewer link in the report.
184
- page.execute_script("$('.view-sequence:eq(0)').click()")
185
-
186
- within('.sequence-viewer') do
187
- page.should have_content('SI2.2.0_06267')
188
- page.should have_content(<<~SEQ.chomp)
189
- MNTLWLSLWDYPGKLPLNFMVFDTKDDLQAAYWRDPYSIP
190
- LAVIFEDPQPISQRLIYEIRTNPSYTLPPPPTKLYSAPIS
191
- CRKNKTGHWMDDILSIKTGESCPVNNYLHSGFLALQMITD
192
- ITKIKLENSDVTIPDIKLIMFPKEPYTADWMLAFRVVIPL
193
- YMVLALSQFITYLLILIVGEKENKIKEGMKMMGLNDSVF
194
- SEQ
195
- end
196
-
197
- # Dismiss the first modal.
198
- page.execute_script("$('.sequence-viewer').modal('hide')")
199
-
200
- # Click on the second sequence viewer link in the report.
201
- page.execute_script("$('.view-sequence:eq(1)').click()")
202
-
203
- within('.sequence-viewer') do
204
- page.should have_content('SI2.2.0_13722')
205
- page.should have_content(<<~SEQ.chomp)
206
- MSANRLNVLVTLMLAVALLVTESGNAQVDGYLQFNPKRSA
207
- VSSPQKYCGKKLSNALQIICDGVYNSMFKKSGQDFPPQNK
208
- RHIAHRINGNEEESFTTLKSNFLNWCVEVYHRHYRFVFVS
209
- EMEMADYPLAYDISPYLPPFLSRARARGMLDGRFAGRRYR
210
- RESRGIHEECCINGCTINELTSYCGP
211
- SEQ
212
- end
213
- end
214
-
215
- it 'disables sequence viewer links if hits are longer than 10kb' do
216
- # BLASTN transcripts against genome. nucleotide_query refers to two fire
217
- # ant transcripts and nucleotide_databases[0] is subset of the fire ant
218
- # genome (few longest scaffolds). We expect sequence viewer links to be
219
- # disabled for all hits of this search.
220
- perform_search(query: nucleotide_query,
221
- databases: nucleotide_databases.values_at(0))
222
-
223
- # Check that the sequence viewer links are disabled.
224
- page.evaluate_script("$('.view-sequence').is(':disabled')").should eq(true)
225
- end
226
-
227
- it 'can download visualisations in svg and png format' do
228
- # Do a BLASTP search. protein_query refers to the first two sequence in
229
- # protein_databases[0], so the top hits are the query sequences themselves.
230
- perform_search(query: protein_query,
231
- databases: protein_databases.values_at(0))
232
-
233
- ## Check that there is a circos vis and unfold it.
234
- page.should have_content('Queries and their top hits: chord diagram')
235
- page.execute_script("$('.circos > .grapher-header > h4').click()")
236
- sleep 1
237
-
238
- page.execute_script("$('.export-to-svg:eq(0)').click()")
239
- wait_for_download
240
- expect(File.basename(downloaded_file)).to eq('Circos-visualisation.svg')
241
- clear_downloads
242
-
243
- page.execute_script("$('.export-to-png:eq(0)').click()")
244
- wait_for_download
245
- expect(File.basename(downloaded_file)).to eq('Circos-visualisation.png')
246
- clear_downloads
247
-
248
- ## Check that there is a graphical overview of hits.
249
- page.should have_content('Graphical overview of hits')
250
-
251
- page.execute_script("$('.export-to-svg:eq(1)').click()")
252
- wait_for_download
253
- expect(File.basename(downloaded_file)).to eq('Alignment-Overview-Query_1.svg')
254
- clear_downloads
255
-
256
- page.execute_script("$('.export-to-png:eq(1)').click()")
257
- wait_for_download
258
- expect(File.basename(downloaded_file)).to eq('Alignment-Overview-Query_1.png')
259
- clear_downloads
260
-
261
- ## Check that there is a length distribution of hits.
262
- page.should have_content('Length distribution of hits')
263
- page.execute_script("$('.length-distribution > .grapher-header > h4').click()")
264
- sleep 1
265
-
266
- page.execute_script("$('.export-to-svg:eq(2)').click()")
267
- wait_for_download
268
- expect(File.basename(downloaded_file)).to eq('length-distribution-Query_1.svg')
269
- clear_downloads
270
-
271
- page.execute_script("$('.export-to-png:eq(2)').click()")
272
- wait_for_download
273
- expect(File.basename(downloaded_file)).to eq('length-distribution-Query_1.png')
274
- clear_downloads
275
-
276
- ## Check that there is a kablammo vis of query vs hit.
277
- page.should have_content('Graphical overview of aligning region(s)')
278
-
279
- page.execute_script("$('.export-to-svg:eq(3)').click()")
280
- wait_for_download
281
- expect(File.basename(downloaded_file)).to eq('Kablammo-Query_1-SI2_2_0_06267.svg')
282
- clear_downloads
283
-
284
- page.execute_script("$('.export-to-png:eq(3)').click()")
285
- wait_for_download
286
- expect(File.basename(downloaded_file)).to eq('Kablammo-Query_1-SI2_2_0_06267.png')
287
- clear_downloads
288
- end
289
-
290
- ## Helpers ##
291
-
292
- def perform_search(query:, databases:, method: nil)
293
- # Load search form.
294
- visit '/'
295
-
296
- # Fill in query, select databases, submit form.
297
- fill_in('sequence', with: query)
298
- databases.each { |db| check db }
299
- if method == 'tblastx'
300
- find('.dropdown-toggle').click
301
- find('.dropdown-menu li').click
302
- end
303
- click_button('method')
304
-
305
- # Switch to new window because link opens in new window
306
- page.driver.browser.switch_to.window(page.driver.browser.window_handles.last)
307
-
308
- # It is important to have this line or the examples end prematurely with a
309
- # failure.
310
- page.should have_content('Query')
311
- end
312
-
313
- def nucleotide_query
314
- File.read File.join(__dir__, 'sequences', 'nucleotide_query.fa')
315
- end
316
-
317
- def protein_query
318
- File.read File.join(__dir__, 'sequences', 'protein_query.fa')
319
- end
320
-
321
- def nucleotide_databases
322
- [
323
- 'Solenopsis invicta gnG subset',
324
- 'Sinvicta 2-2-3 cdna subset'
325
- ]
326
- end
327
-
328
- def protein_databases
329
- [
330
- 'Sinvicta 2-2-3 prot subset',
331
- '2018-04 Swiss-Prot insecta'
332
- ]
333
- end
334
- end