sequenceserver 2.0.0 → 2.1.0

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 (667) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sequenceserver/api_errors.rb +24 -2
  3. data/lib/sequenceserver/blast/job.rb +41 -7
  4. data/lib/sequenceserver/blast/report.rb +36 -30
  5. data/lib/sequenceserver/config.rb +49 -27
  6. data/lib/sequenceserver/job.rb +13 -3
  7. data/lib/sequenceserver/job_remover.rb +25 -29
  8. data/lib/sequenceserver/refinements.rb +15 -0
  9. data/lib/sequenceserver/routes.rb +69 -7
  10. data/lib/sequenceserver/sequence.rb +8 -7
  11. data/lib/sequenceserver/sys.rb +2 -2
  12. data/lib/sequenceserver/version.rb +1 -1
  13. data/lib/sequenceserver/zip_file_generator.rb +56 -0
  14. data/lib/sequenceserver.rb +1 -0
  15. data/public/config.js +149 -143
  16. data/public/css/sequenceserver.css +44 -3
  17. data/public/css/sequenceserver.min.css +3 -3
  18. data/public/js/alignment_exporter.js +16 -8
  19. data/public/js/circos.js +370 -234
  20. data/public/js/cloud_share_modal.js +216 -0
  21. data/public/js/databases.js +144 -0
  22. data/public/js/databases_tree.js +42 -113
  23. data/public/js/dnd.js +164 -0
  24. data/public/js/error_modal.js +4 -11
  25. data/public/js/exporter.js +7 -3
  26. data/public/js/form.js +260 -0
  27. data/public/js/grapher.js +113 -106
  28. data/public/js/hit.js +80 -67
  29. data/public/js/hits_overview.js +2 -2
  30. data/public/js/hsp.js +343 -288
  31. data/public/js/jquery_world.js +4 -4
  32. data/public/js/mailto.js +36 -0
  33. data/public/js/options.js +84 -0
  34. data/public/js/query.js +319 -59
  35. data/public/js/report.js +315 -269
  36. data/public/js/report_root.js +75 -0
  37. data/public/js/search.js +28 -1011
  38. data/public/js/search_button.js +195 -0
  39. data/public/js/sequence.js +2409 -2411
  40. data/public/js/sequence_modal.js +152 -159
  41. data/public/js/share_url.js +23 -0
  42. data/public/js/sidebar.js +262 -83
  43. data/public/js/tests/database.spec.js +60 -0
  44. data/public/js/tests/mock_data/databases.json +91 -0
  45. data/public/js/tests/mock_data/long_response.json +269 -0
  46. data/public/js/tests/mock_data/short_response.json +2240 -0
  47. data/public/js/tests/report.spec.js +99 -0
  48. data/public/js/tests/search_button.spec.js +14 -0
  49. data/public/js/tests/search_query.spec.js +41 -0
  50. data/public/packages/circosJS@1.7.0.js +1640 -0
  51. data/public/packages/jquery-ui@1.11.4.js +16624 -0
  52. data/public/sequenceserver-report.min.js +2425 -19
  53. data/public/sequenceserver-search.min.js +2337 -15
  54. data/public/vendor/github/jspm/nodelibs-assert@0.1.0/index.js +2 -0
  55. data/public/vendor/github/jspm/{nodelibs-buffer@0.1.0 → nodelibs-assert@0.1.0}/package.json +1 -1
  56. data/public/vendor/github/jspm/nodelibs-assert@0.1.0.js +1 -0
  57. data/public/vendor/github/jspm/nodelibs-buffer@0.1.1/package.json +6 -0
  58. data/public/vendor/github/jspm/nodelibs-buffer@0.1.1.js +1 -0
  59. data/public/vendor/github/jspm/{nodelibs-process@0.1.1 → nodelibs-process@0.1.2}/package.json +2 -2
  60. data/public/vendor/github/jspm/nodelibs-process@0.1.2.js +1 -0
  61. data/public/vendor/github/jspm/nodelibs-vm@0.1.0/index.js +2 -0
  62. data/public/vendor/github/jspm/nodelibs-vm@0.1.0/package.json +6 -0
  63. data/public/vendor/github/jspm/nodelibs-vm@0.1.0.js +1 -0
  64. data/public/vendor/npm/assert@1.5.0/CHANGELOG.md +8 -0
  65. data/public/vendor/npm/assert@1.5.0/README.md +105 -0
  66. data/public/vendor/npm/assert@1.5.0/assert.js +327 -0
  67. data/public/vendor/npm/assert@1.5.0/package.json +32 -0
  68. data/public/vendor/npm/assert@1.5.0/test.js +288 -0
  69. data/public/vendor/npm/assert@1.5.0.js +1 -0
  70. data/public/vendor/npm/{base64-js@0.0.8/LICENSE.MIT → base64-js@1.5.1/LICENSE} +1 -1
  71. data/public/vendor/npm/{base64-js@0.0.8 → base64-js@1.5.1}/README.md +10 -7
  72. data/public/vendor/npm/base64-js@1.5.1/base64js.min.js +3 -0
  73. data/public/vendor/npm/base64-js@1.5.1/index.d.ts +3 -0
  74. data/public/vendor/npm/base64-js@1.5.1/index.js +151 -0
  75. data/public/vendor/npm/base64-js@1.5.1/package.json +47 -0
  76. data/public/vendor/npm/base64-js@1.5.1.js +1 -0
  77. data/public/vendor/npm/buffer@5.7.1/AUTHORS.md +70 -0
  78. data/public/vendor/npm/{buffer@3.4.3 → buffer@5.7.1}/README.md +111 -41
  79. data/public/vendor/npm/buffer@5.7.1/index.d.ts +186 -0
  80. data/public/vendor/npm/buffer@5.7.1/index.js +1817 -0
  81. data/public/vendor/npm/buffer@5.7.1/package.json +96 -0
  82. data/public/vendor/npm/buffer@5.7.1.js +1 -0
  83. data/public/vendor/npm/core-util-is@1.0.3/LICENSE +19 -0
  84. data/public/vendor/npm/core-util-is@1.0.3/lib/util.js +64 -0
  85. data/public/vendor/npm/{core-util-is@1.0.1 → core-util-is@1.0.3}/package.json +13 -1
  86. data/public/vendor/npm/core-util-is@1.0.3.js +1 -0
  87. data/public/vendor/npm/events@1.0.2/tests/add-listeners.js +2 -2
  88. data/public/vendor/npm/events@1.0.2/tests/check-listener-leaks.js +3 -3
  89. data/public/vendor/npm/events@1.0.2/tests/common.js +1 -1
  90. data/public/vendor/npm/events@1.0.2/tests/index.js +13 -13
  91. data/public/vendor/npm/events@1.0.2/tests/listeners-side-effects.js +2 -2
  92. data/public/vendor/npm/events@1.0.2/tests/listeners.js +2 -2
  93. data/public/vendor/npm/events@1.0.2/tests/max-listeners.js +2 -2
  94. data/public/vendor/npm/events@1.0.2/tests/modify-in-emit.js +2 -2
  95. data/public/vendor/npm/events@1.0.2/tests/num-args.js +2 -2
  96. data/public/vendor/npm/events@1.0.2/tests/once.js +2 -2
  97. data/public/vendor/npm/events@1.0.2/tests/remove-all-listeners.js +3 -3
  98. data/public/vendor/npm/events@1.0.2/tests/remove-listeners.js +3 -3
  99. data/public/vendor/npm/events@1.0.2/tests/set-max-listeners-side-effects.js +2 -2
  100. data/public/vendor/npm/events@1.0.2/tests/subclass.js +3 -3
  101. data/public/vendor/npm/events@1.0.2.js +1 -1
  102. data/public/vendor/npm/ieee754@1.2.1/LICENSE +11 -0
  103. data/public/vendor/npm/{ieee754@1.1.6 → ieee754@1.2.1}/README.md +12 -8
  104. data/public/vendor/npm/ieee754@1.2.1/index.d.ts +10 -0
  105. data/public/vendor/npm/{ieee754@1.1.6 → ieee754@1.2.1}/index.js +6 -6
  106. data/public/vendor/npm/ieee754@1.2.1/package.json +52 -0
  107. data/public/vendor/npm/ieee754@1.2.1.js +1 -0
  108. data/public/vendor/npm/{is-array@1.0.1 → indexof@0.0.1}/Makefile +3 -3
  109. data/public/vendor/npm/indexof@0.0.1/Readme.md +15 -0
  110. data/public/vendor/npm/indexof@0.0.1/component.json +10 -0
  111. data/public/vendor/npm/indexof@0.0.1/index.js +11 -0
  112. data/public/vendor/npm/indexof@0.0.1/package.json +12 -0
  113. data/public/vendor/npm/indexof@0.0.1.js +1 -0
  114. data/public/vendor/npm/inherits@2.0.1/inherits.js +1 -1
  115. data/public/vendor/npm/inherits@2.0.1.js +1 -1
  116. data/public/vendor/npm/isarray@0.0.1.js +1 -1
  117. data/public/vendor/npm/js-tokens@4.0.0/index.js +23 -0
  118. data/public/vendor/npm/js-tokens@4.0.0/package.json +30 -0
  119. data/public/vendor/npm/js-tokens@4.0.0.js +1 -0
  120. data/public/vendor/npm/loose-envify@1.4.0/LICENSE +21 -0
  121. data/public/vendor/npm/loose-envify@1.4.0/README.md +45 -0
  122. data/public/vendor/npm/loose-envify@1.4.0/cli.js +12 -0
  123. data/public/vendor/npm/loose-envify@1.4.0/custom.js +3 -0
  124. data/public/vendor/npm/loose-envify@1.4.0/index.js +5 -0
  125. data/public/vendor/npm/loose-envify@1.4.0/loose-envify.js +33 -0
  126. data/public/vendor/npm/loose-envify@1.4.0/package.json +36 -0
  127. data/public/vendor/npm/loose-envify@1.4.0/replace.js +52 -0
  128. data/public/vendor/npm/loose-envify@1.4.0.js +1 -0
  129. data/public/vendor/npm/object-assign@4.1.1/index.js +90 -0
  130. data/public/vendor/npm/object-assign@4.1.1/package.json +42 -0
  131. data/public/vendor/npm/object-assign@4.1.1.js +1 -0
  132. data/public/vendor/npm/path-browserify@0.0.0/index.js +1 -1
  133. data/public/vendor/npm/path-browserify@0.0.0.js +1 -1
  134. data/public/vendor/npm/{process@0.10.1 → process@0.11.10}/README.md +4 -1
  135. data/public/vendor/npm/process@0.11.10/browser.js +184 -0
  136. data/public/vendor/npm/{process@0.10.1 → process@0.11.10}/package.json +10 -1
  137. data/public/vendor/npm/process@0.11.10/test.js +185 -0
  138. data/public/vendor/npm/process@0.11.10.js +1 -0
  139. data/public/vendor/npm/react-dom@18.0.0/LICENSE +21 -0
  140. data/public/vendor/npm/react-dom@18.0.0/README.md +50 -0
  141. data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-server-legacy.browser.development.js +4771 -0
  142. data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-server-legacy.browser.production.min.js +85 -0
  143. data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-server-legacy.node.development.js +4813 -0
  144. data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-server-legacy.node.production.min.js +1705 -0
  145. data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-server.browser.development.js +4746 -0
  146. data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-server.browser.production.min.js +90 -0
  147. data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-server.node.development.js +4714 -0
  148. data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-server.node.production.min.js +1746 -0
  149. data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-test-utils.development.js +1017 -0
  150. data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-test-utils.production.min.js +617 -0
  151. data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom.development.js +20092 -0
  152. data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom.production.min.js +322 -0
  153. data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom.profiling.min.js +364 -0
  154. data/public/vendor/npm/react-dom@18.0.0/client.js +27 -0
  155. data/public/vendor/npm/react-dom@18.0.0/index.js +23 -0
  156. data/public/vendor/npm/react-dom@18.0.0/package.json +62 -0
  157. data/public/vendor/npm/react-dom@18.0.0/profiling.js +23 -0
  158. data/public/vendor/npm/react-dom@18.0.0/server.browser.js +19 -0
  159. data/public/vendor/npm/react-dom@18.0.0/server.js +3 -0
  160. data/public/vendor/npm/react-dom@18.0.0/server.node.js +19 -0
  161. data/public/vendor/npm/react-dom@18.0.0/test-utils.js +9 -0
  162. data/public/vendor/npm/react-dom@18.0.0/umd/react-dom-server-legacy.browser.development.js +4770 -0
  163. data/public/vendor/npm/react-dom@18.0.0/umd/react-dom-server-legacy.browser.production.min.js +72 -0
  164. data/public/vendor/npm/react-dom@18.0.0/umd/react-dom-server.browser.development.js +4745 -0
  165. data/public/vendor/npm/react-dom@18.0.0/umd/react-dom-server.browser.production.min.js +74 -0
  166. data/public/vendor/npm/react-dom@18.0.0/umd/react-dom-test-utils.development.js +1013 -0
  167. data/public/vendor/npm/react-dom@18.0.0/umd/react-dom-test-utils.production.min.js +625 -0
  168. data/public/vendor/npm/react-dom@18.0.0/umd/react-dom.development.js +20106 -0
  169. data/public/vendor/npm/react-dom@18.0.0/umd/react-dom.production.min.js +269 -0
  170. data/public/vendor/npm/react-dom@18.0.0/umd/react-dom.profiling.min.js +285 -0
  171. data/public/vendor/npm/react-dom@18.0.0.js +1 -0
  172. data/public/vendor/npm/react@18.0.0/LICENSE +21 -0
  173. data/public/vendor/npm/react@18.0.0/README.md +13 -0
  174. data/public/vendor/npm/react@18.0.0/cjs/react-jsx-dev-runtime.development.js +837 -0
  175. data/public/vendor/npm/react@18.0.0/cjs/react-jsx-dev-runtime.production.min.js +10 -0
  176. data/public/vendor/npm/react@18.0.0/cjs/react-jsx-dev-runtime.profiling.min.js +10 -0
  177. data/public/vendor/npm/react@18.0.0/cjs/react-jsx-runtime.development.js +849 -0
  178. data/public/vendor/npm/react@18.0.0/cjs/react-jsx-runtime.production.min.js +38 -0
  179. data/public/vendor/npm/react@18.0.0/cjs/react-jsx-runtime.profiling.min.js +38 -0
  180. data/public/vendor/npm/react@18.0.0/cjs/react.development.js +1746 -0
  181. data/public/vendor/npm/react@18.0.0/cjs/react.production.min.js +26 -0
  182. data/public/vendor/npm/react@18.0.0/cjs/react.shared-subset.development.js +10 -0
  183. data/public/vendor/npm/react@18.0.0/cjs/react.shared-subset.production.min.js +12 -0
  184. data/public/vendor/npm/react@18.0.0/index.js +9 -0
  185. data/public/vendor/npm/react@18.0.0/jsx-dev-runtime.js +9 -0
  186. data/public/vendor/npm/react@18.0.0/jsx-runtime.js +9 -0
  187. data/public/vendor/npm/react@18.0.0/package.json +47 -0
  188. data/public/vendor/npm/react@18.0.0/react.shared-subset.js +9 -0
  189. data/public/vendor/npm/react@18.0.0/umd/react.development.js +2186 -0
  190. data/public/vendor/npm/react@18.0.0/umd/react.production.min.js +33 -0
  191. data/public/vendor/npm/react@18.0.0/umd/react.profiling.min.js +33 -0
  192. data/public/vendor/npm/react@18.0.0.js +1 -0
  193. data/public/vendor/npm/readable-stream@1.1.14/LICENSE +18 -0
  194. data/public/vendor/npm/readable-stream@1.1.14/duplex.js +2 -0
  195. data/public/vendor/npm/{readable-stream@1.1.13 → readable-stream@1.1.14}/lib/_stream_duplex.js +5 -5
  196. data/public/vendor/npm/{readable-stream@1.1.13 → readable-stream@1.1.14}/lib/_stream_passthrough.js +3 -3
  197. data/public/vendor/npm/{readable-stream@1.1.13 → readable-stream@1.1.14}/lib/_stream_readable.js +10 -10
  198. data/public/vendor/npm/{readable-stream@1.1.13 → readable-stream@1.1.14}/lib/_stream_transform.js +4 -4
  199. data/public/vendor/npm/{readable-stream@1.1.13 → readable-stream@1.1.14}/lib/_stream_writable.js +6 -6
  200. data/public/vendor/npm/{readable-stream@1.1.13 → readable-stream@1.1.14}/package.json +1 -1
  201. data/public/vendor/npm/readable-stream@1.1.14/passthrough.js +2 -0
  202. data/public/vendor/npm/readable-stream@1.1.14/readable.js +13 -0
  203. data/public/vendor/npm/readable-stream@1.1.14/transform.js +2 -0
  204. data/public/vendor/npm/readable-stream@1.1.14/writable.js +2 -0
  205. data/public/vendor/npm/readable-stream@1.1.14.js +1 -0
  206. data/public/vendor/npm/scheduler@0.21.0/LICENSE +21 -0
  207. data/public/vendor/npm/scheduler@0.21.0/README.md +9 -0
  208. data/public/vendor/npm/scheduler@0.21.0/cjs/scheduler-unstable_mock.development.js +530 -0
  209. data/public/vendor/npm/scheduler@0.21.0/cjs/scheduler-unstable_mock.production.min.js +20 -0
  210. data/public/vendor/npm/scheduler@0.21.0/cjs/scheduler-unstable_post_task.development.js +153 -0
  211. data/public/vendor/npm/scheduler@0.21.0/cjs/scheduler-unstable_post_task.production.min.js +14 -0
  212. data/public/vendor/npm/scheduler@0.21.0/cjs/scheduler.development.js +444 -0
  213. data/public/vendor/npm/scheduler@0.21.0/cjs/scheduler.production.min.js +19 -0
  214. data/public/vendor/npm/scheduler@0.21.0/index.js +9 -0
  215. data/public/vendor/npm/scheduler@0.21.0/package.json +36 -0
  216. data/public/vendor/npm/scheduler@0.21.0/umd/scheduler-unstable_mock.development.js +701 -0
  217. data/public/vendor/npm/scheduler@0.21.0/umd/scheduler-unstable_mock.production.min.js +21 -0
  218. data/public/vendor/npm/scheduler@0.21.0/umd/scheduler.development.js +154 -0
  219. data/public/vendor/npm/scheduler@0.21.0/umd/scheduler.production.min.js +148 -0
  220. data/public/vendor/npm/scheduler@0.21.0/umd/scheduler.profiling.min.js +148 -0
  221. data/public/vendor/npm/scheduler@0.21.0/unstable_mock.js +9 -0
  222. data/public/vendor/npm/scheduler@0.21.0/unstable_post_task.js +9 -0
  223. data/public/vendor/npm/scheduler@0.21.0.js +1 -0
  224. data/public/vendor/npm/stream-browserify@1.0.0/index.js +7 -7
  225. data/public/vendor/npm/stream-browserify@1.0.0/test/buf.js +5 -5
  226. data/public/vendor/npm/stream-browserify@1.0.0.js +1 -1
  227. data/public/vendor/npm/string_decoder@0.10.31/index.js +2 -2
  228. data/public/vendor/npm/string_decoder@0.10.31.js +1 -1
  229. data/public/vendor/npm/util@0.10.3/support/isBuffer.js +1 -1
  230. data/public/vendor/npm/util@0.10.3/test/browser/inspect.js +2 -2
  231. data/public/vendor/npm/util@0.10.3/test/browser/is.js +3 -3
  232. data/public/vendor/npm/util@0.10.3/test/node/debug.js +4 -4
  233. data/public/vendor/npm/util@0.10.3/test/node/format.js +2 -2
  234. data/public/vendor/npm/util@0.10.3/test/node/inspect.js +3 -3
  235. data/public/vendor/npm/util@0.10.3/test/node/log.js +3 -3
  236. data/public/vendor/npm/util@0.10.3/test/node/util.js +3 -3
  237. data/public/vendor/npm/util@0.10.3/util.js +3 -3
  238. data/public/vendor/npm/util@0.10.3.js +1 -1
  239. data/public/vendor/npm/vm-browserify@0.0.4/LICENSE +18 -0
  240. data/public/vendor/npm/vm-browserify@0.0.4/example/run/bundle.js +376 -0
  241. data/public/vendor/npm/vm-browserify@0.0.4/example/run/entry.js +6 -0
  242. data/public/vendor/npm/vm-browserify@0.0.4/example/run/index.html +9 -0
  243. data/public/vendor/npm/vm-browserify@0.0.4/example/run/server.js +6 -0
  244. data/public/vendor/npm/vm-browserify@0.0.4/index.js +139 -0
  245. data/public/vendor/npm/vm-browserify@0.0.4/package.json +46 -0
  246. data/public/vendor/npm/vm-browserify@0.0.4/readme.markdown +67 -0
  247. data/public/vendor/npm/vm-browserify@0.0.4/test/vm.js +34 -0
  248. data/public/vendor/npm/vm-browserify@0.0.4.js +1 -0
  249. data/public/vendor/npm/webshim@1.15.8/Gruntfile.js +4 -4
  250. data/public/vendor/npm/webshim@1.15.8/build/combobuild.js +2 -2
  251. data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/color-picker.js +1 -1
  252. data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/combos/10.js +1 -1
  253. data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/combos/11.js +1 -1
  254. data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/combos/17.js +1 -1
  255. data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/combos/5.js +1 -1
  256. data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/combos/6.js +1 -1
  257. data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/combos/9.js +1 -1
  258. data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/es6.js +1 -1
  259. data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/excanvas.js +1 -1
  260. data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/form-number-date-ui.js +1 -1
  261. data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/moxie/js/moxie-html4.js +1 -1
  262. data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/moxie/js/moxie-swf.js +1 -1
  263. data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/sizzle.js +1 -1
  264. data/public/vendor/npm/webshim@1.15.8/js-webshim/minified/shims/es6.js +1 -1
  265. data/public/vendor/npm/webshim@1.15.8/src/shims/color-picker.js +1 -1
  266. data/public/vendor/npm/webshim@1.15.8/src/shims/combos/10.js +1 -1
  267. data/public/vendor/npm/webshim@1.15.8/src/shims/combos/11.js +1 -1
  268. data/public/vendor/npm/webshim@1.15.8/src/shims/combos/17.js +1 -1
  269. data/public/vendor/npm/webshim@1.15.8/src/shims/combos/5.js +1 -1
  270. data/public/vendor/npm/webshim@1.15.8/src/shims/combos/6.js +1 -1
  271. data/public/vendor/npm/webshim@1.15.8/src/shims/combos/9.js +1 -1
  272. data/public/vendor/npm/webshim@1.15.8/src/shims/es6.js +1 -1
  273. data/public/vendor/npm/webshim@1.15.8/src/shims/excanvas.js +1 -1
  274. data/public/vendor/npm/webshim@1.15.8/src/shims/form-number-date-ui.js +1 -1
  275. data/public/vendor/npm/webshim@1.15.8/src/shims/moxie/js/moxie-html4.js +1 -1
  276. data/public/vendor/npm/webshim@1.15.8/src/shims/moxie/js/moxie-swf.js +1 -1
  277. data/public/vendor/npm/webshim@1.15.8/src/shims/sizzle.js +1 -1
  278. data/public/vendor/npm/webshim@1.15.8/tests/dist/jquery.js +1 -1
  279. data/public/vendor/npm/webshim@1.15.8/tests/jquery/unit/core.js +1 -1
  280. data/public/vendor/npm/webshim@1.15.8/tests/jquery/unit/event.js +1388 -711
  281. data/public/vendor/npm/webshim@1.15.8/tests/qunit/qunit.js +1 -1
  282. data/public/vendor/npm/webshim@1.15.8/tests/test-ext/jquery-1-custom.js +1 -1
  283. data/public/vendor/npm/webshim@1.15.8/tests/test-ext/jquery-2-custom.js +1 -1
  284. data/public/vendor/npm/webshim@1.15.8/tests/test-ext/punycode.js +1 -1
  285. data/public/vendor/system-polyfills.js +865 -1
  286. data/views/blastn_options.erb +291 -0
  287. data/views/blastp_options.erb +288 -0
  288. data/views/blastx_options.erb +318 -0
  289. data/views/error.erb +12 -0
  290. data/views/layout.erb +2 -30
  291. data/views/report.erb +0 -8
  292. data/views/search.erb +16 -9
  293. data/views/tblastn_options.erb +266 -0
  294. data/views/tblastx_options.erb +291 -0
  295. metadata +318 -439
  296. data/public/vendor/github/jspm/nodelibs-buffer@0.1.0.js +0 -1
  297. data/public/vendor/github/jspm/nodelibs-module@0.1.0/index.js +0 -1
  298. data/public/vendor/github/jspm/nodelibs-module@0.1.0.js +0 -1
  299. data/public/vendor/github/jspm/nodelibs-process@0.1.1.js +0 -1
  300. data/public/vendor/npm/amdefine@1.0.0/LICENSE +0 -58
  301. data/public/vendor/npm/amdefine@1.0.0/README.md +0 -171
  302. data/public/vendor/npm/amdefine@1.0.0/amdefine.js +0 -200
  303. data/public/vendor/npm/amdefine@1.0.0/intercept.js +0 -24
  304. data/public/vendor/npm/amdefine@1.0.0/package.json +0 -16
  305. data/public/vendor/npm/amdefine@1.0.0.js +0 -1
  306. data/public/vendor/npm/base62@0.1.1/LICENSE +0 -20
  307. data/public/vendor/npm/base62@0.1.1/Readme.md +0 -30
  308. data/public/vendor/npm/base62@0.1.1/base62.js +0 -28
  309. data/public/vendor/npm/base62@0.1.1/package.json +0 -21
  310. data/public/vendor/npm/base62@0.1.1/test/test.js +0 -13
  311. data/public/vendor/npm/base62@0.1.1.js +0 -1
  312. data/public/vendor/npm/base64-js@0.0.8/lib/b64.js +0 -125
  313. data/public/vendor/npm/base64-js@0.0.8/package.json +0 -34
  314. data/public/vendor/npm/base64-js@0.0.8/test/convert.js +0 -39
  315. data/public/vendor/npm/base64-js@0.0.8/test/url-safe.js +0 -15
  316. data/public/vendor/npm/base64-js@0.0.8.js +0 -1
  317. data/public/vendor/npm/buffer@3.4.3/index.js +0 -1533
  318. data/public/vendor/npm/buffer@3.4.3/package.json +0 -67
  319. data/public/vendor/npm/buffer@3.4.3/test/_polyfill.js +0 -152
  320. data/public/vendor/npm/buffer@3.4.3/test/base64.js +0 -33
  321. data/public/vendor/npm/buffer@3.4.3/test/basic.js +0 -58
  322. data/public/vendor/npm/buffer@3.4.3/test/compare.js +0 -53
  323. data/public/vendor/npm/buffer@3.4.3/test/constructor.js +0 -132
  324. data/public/vendor/npm/buffer@3.4.3/test/deprecated.js +0 -21
  325. data/public/vendor/npm/buffer@3.4.3/test/from-string.js +0 -105
  326. data/public/vendor/npm/buffer@3.4.3/test/methods.js +0 -109
  327. data/public/vendor/npm/buffer@3.4.3/test/node/README.txt +0 -1
  328. data/public/vendor/npm/buffer@3.4.3/test/node/test-buffer-ascii.js +0 -20
  329. data/public/vendor/npm/buffer@3.4.3/test/node/test-buffer-bytelength.js +0 -38
  330. data/public/vendor/npm/buffer@3.4.3/test/node/test-buffer-concat.js +0 -26
  331. data/public/vendor/npm/buffer@3.4.3/test/node/test-buffer-indexof.js +0 -78
  332. data/public/vendor/npm/buffer@3.4.3/test/node/test-buffer-inspect.js +0 -31
  333. data/public/vendor/npm/buffer@3.4.3/test/node/test-buffer.js +0 -804
  334. data/public/vendor/npm/buffer@3.4.3/test/node-es6/README.txt +0 -1
  335. data/public/vendor/npm/buffer@3.4.3/test/node-es6/test-buffer-arraybuffer.js +0 -37
  336. data/public/vendor/npm/buffer@3.4.3/test/node-es6/test-buffer-iterator.js +0 -32
  337. data/public/vendor/npm/buffer@3.4.3/test/slice.js +0 -33
  338. data/public/vendor/npm/buffer@3.4.3/test/static.js +0 -32
  339. data/public/vendor/npm/buffer@3.4.3/test/to-string.js +0 -106
  340. data/public/vendor/npm/buffer@3.4.3/test/write.js +0 -90
  341. data/public/vendor/npm/buffer@3.4.3.js +0 -1
  342. data/public/vendor/npm/core-util-is@1.0.1/float.patch +0 -604
  343. data/public/vendor/npm/core-util-is@1.0.1/lib/util.js +0 -66
  344. data/public/vendor/npm/core-util-is@1.0.1/util.js +0 -66
  345. data/public/vendor/npm/core-util-is@1.0.1.js +0 -1
  346. data/public/vendor/npm/envify@3.4.0/README.md +0 -145
  347. data/public/vendor/npm/envify@3.4.0/bin/envify +0 -17
  348. data/public/vendor/npm/envify@3.4.0/custom.js +0 -33
  349. data/public/vendor/npm/envify@3.4.0/index.js +0 -4
  350. data/public/vendor/npm/envify@3.4.0/package.json +0 -35
  351. data/public/vendor/npm/envify@3.4.0/visitors.js +0 -33
  352. data/public/vendor/npm/envify@3.4.0.js +0 -1
  353. data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/bin/esparse.js +0 -90
  354. data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/bin/esvalidate.js +0 -145
  355. data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/esprima.js +0 -6191
  356. data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/package.json +0 -72
  357. data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/test/compat.js +0 -167
  358. data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/test/reflect.js +0 -421
  359. data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/test/run.js +0 -34
  360. data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/test/runner.js +0 -418
  361. data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/test/test.js +0 -34730
  362. data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb.js +0 -1
  363. data/public/vendor/npm/ieee754@1.1.6/LICENSE +0 -56
  364. data/public/vendor/npm/ieee754@1.1.6/package.json +0 -34
  365. data/public/vendor/npm/ieee754@1.1.6/test/basic.js +0 -20
  366. data/public/vendor/npm/ieee754@1.1.6.js +0 -1
  367. data/public/vendor/npm/is-array@1.0.1/History.md +0 -11
  368. data/public/vendor/npm/is-array@1.0.1/Readme.md +0 -27
  369. data/public/vendor/npm/is-array@1.0.1/component.json +0 -13
  370. data/public/vendor/npm/is-array@1.0.1/index.js +0 -33
  371. data/public/vendor/npm/is-array@1.0.1/package.json +0 -10
  372. data/public/vendor/npm/is-array@1.0.1/test/test.html +0 -46
  373. data/public/vendor/npm/is-array@1.0.1.js +0 -1
  374. data/public/vendor/npm/jstransform@10.1.0/LICENSE +0 -201
  375. data/public/vendor/npm/jstransform@10.1.0/README.md +0 -98
  376. data/public/vendor/npm/jstransform@10.1.0/jestEnvironment.js +0 -3
  377. data/public/vendor/npm/jstransform@10.1.0/jestPreprocessor.js +0 -8
  378. data/public/vendor/npm/jstransform@10.1.0/package.json +0 -52
  379. data/public/vendor/npm/jstransform@10.1.0/polyfill/Object.es6.js +0 -54
  380. data/public/vendor/npm/jstransform@10.1.0/src/__tests__/jstransform-test.js +0 -246
  381. data/public/vendor/npm/jstransform@10.1.0/src/__tests__/jstransform-utils-test.js +0 -31
  382. data/public/vendor/npm/jstransform@10.1.0/src/docblock.js +0 -86
  383. data/public/vendor/npm/jstransform@10.1.0/src/jstransform.js +0 -180
  384. data/public/vendor/npm/jstransform@10.1.0/src/utils.js +0 -386
  385. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-arrow-function-visitors-test.js +0 -57
  386. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-call-spread-visitors-test.js +0 -46
  387. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-class-visitors-test.js +0 -463
  388. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-destructuring-visitors-test.js +0 -144
  389. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-es7-object-integration-test.js +0 -40
  390. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-object-concise-method-visitors-test.js +0 -47
  391. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-object-short-notation-visitors-test.js +0 -33
  392. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-rest-param-visitors-test.js +0 -119
  393. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-template-visitors-test.js +0 -138
  394. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es7-rest-property-helpers-test.js +0 -47
  395. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es7-spread-property-visitors-test.js +0 -90
  396. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/gen/generate-type-syntax-test.js +0 -40
  397. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/gen/type-syntax-test.rec.js +0 -846
  398. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/reserved-words-test.js +0 -40
  399. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/type-alias-syntax-test.js +0 -34
  400. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/type-class-syntax-test.js +0 -105
  401. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/type-function-syntax-test.js +0 -126
  402. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/type-interface-syntax-test.js +0 -29
  403. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/type-object-method-syntax-test.js +0 -65
  404. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/type-pattern-syntax-test.js +0 -45
  405. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/type-syntax-test.js +0 -46
  406. data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/type-variable-declaration-syntax-test.js +0 -102
  407. data/public/vendor/npm/jstransform@10.1.0/visitors/es6-arrow-function-visitors.js +0 -66
  408. data/public/vendor/npm/jstransform@10.1.0/visitors/es6-call-spread-visitors.js +0 -72
  409. data/public/vendor/npm/jstransform@10.1.0/visitors/es6-class-visitors.js +0 -316
  410. data/public/vendor/npm/jstransform@10.1.0/visitors/es6-destructuring-visitors.js +0 -135
  411. data/public/vendor/npm/jstransform@10.1.0/visitors/es6-object-concise-method-visitors.js +0 -28
  412. data/public/vendor/npm/jstransform@10.1.0/visitors/es6-object-short-notation-visitors.js +0 -12
  413. data/public/vendor/npm/jstransform@10.1.0/visitors/es6-rest-param-visitors.js +0 -45
  414. data/public/vendor/npm/jstransform@10.1.0/visitors/es6-template-visitors.js +0 -90
  415. data/public/vendor/npm/jstransform@10.1.0/visitors/es7-rest-property-helpers.js +0 -80
  416. data/public/vendor/npm/jstransform@10.1.0/visitors/es7-spread-property-visitors.js +0 -56
  417. data/public/vendor/npm/jstransform@10.1.0/visitors/reserved-words-helper.js +0 -74
  418. data/public/vendor/npm/jstransform@10.1.0/visitors/reserved-words-visitors.js +0 -30
  419. data/public/vendor/npm/jstransform@10.1.0/visitors/type-syntax.js +0 -118
  420. data/public/vendor/npm/jstransform@10.1.0.js +0 -1
  421. data/public/vendor/npm/process@0.10.1/browser.js +0 -58
  422. data/public/vendor/npm/process@0.10.1.js +0 -1
  423. data/public/vendor/npm/qs@2.4.1/test/stringify.js +0 -162
  424. data/public/vendor/npm/react@0.13.3/README.md +0 -20
  425. data/public/vendor/npm/react@0.13.3/addons.js +0 -2
  426. data/public/vendor/npm/react@0.13.3/dist/JSXTransformer.js +0 -11346
  427. data/public/vendor/npm/react@0.13.3/dist/react-with-addons.js +0 -10483
  428. data/public/vendor/npm/react@0.13.3/dist/react-with-addons.min.js +0 -7297
  429. data/public/vendor/npm/react@0.13.3/dist/react.js +0 -9468
  430. data/public/vendor/npm/react@0.13.3/dist/react.min.js +0 -6764
  431. data/public/vendor/npm/react@0.13.3/lib/AutoFocusMixin.js +0 -9
  432. data/public/vendor/npm/react@0.13.3/lib/BeforeInputEventPlugin.js +0 -197
  433. data/public/vendor/npm/react@0.13.3/lib/CSSCore.js +0 -39
  434. data/public/vendor/npm/react@0.13.3/lib/CSSProperty.js +0 -123
  435. data/public/vendor/npm/react@0.13.3/lib/CSSPropertyOperations.js +0 -103
  436. data/public/vendor/npm/react@0.13.3/lib/CallbackQueue.js +0 -43
  437. data/public/vendor/npm/react@0.13.3/lib/ChangeEventPlugin.js +0 -174
  438. data/public/vendor/npm/react@0.13.3/lib/ClientReactRootIndex.js +0 -23
  439. data/public/vendor/npm/react@0.13.3/lib/DOMChildrenOperations.js +0 -57
  440. data/public/vendor/npm/react@0.13.3/lib/DOMProperty.js +0 -96
  441. data/public/vendor/npm/react@0.13.3/lib/DOMPropertyOperations.js +0 -99
  442. data/public/vendor/npm/react@0.13.3/lib/Danger.js +0 -67
  443. data/public/vendor/npm/react@0.13.3/lib/DefaultEventPluginOrder.js +0 -5
  444. data/public/vendor/npm/react@0.13.3/lib/EnterLeaveEventPlugin.js +0 -69
  445. data/public/vendor/npm/react@0.13.3/lib/EventConstants.js +0 -55
  446. data/public/vendor/npm/react@0.13.3/lib/EventListener.js +0 -34
  447. data/public/vendor/npm/react@0.13.3/lib/EventPluginHub.js +0 -103
  448. data/public/vendor/npm/react@0.13.3/lib/EventPluginRegistry.js +0 -115
  449. data/public/vendor/npm/react@0.13.3/lib/EventPluginUtils.js +0 -121
  450. data/public/vendor/npm/react@0.13.3/lib/EventPropagators.js +0 -62
  451. data/public/vendor/npm/react@0.13.3/lib/ExecutionEnvironment.js +0 -42
  452. data/public/vendor/npm/react@0.13.3/lib/FallbackCompositionState.js +0 -45
  453. data/public/vendor/npm/react@0.13.3/lib/HTMLDOMPropertyConfig.js +0 -155
  454. data/public/vendor/npm/react@0.13.3/lib/LinkedStateMixin.js +0 -8
  455. data/public/vendor/npm/react@0.13.3/lib/LinkedValueUtils.js +0 -74
  456. data/public/vendor/npm/react@0.13.3/lib/LocalEventTrapMixin.js +0 -26
  457. data/public/vendor/npm/react@0.13.3/lib/MobileSafariClickEventPlugin.js +0 -17
  458. data/public/vendor/npm/react@0.13.3/lib/Object.assign.js +0 -47
  459. data/public/vendor/npm/react@0.13.3/lib/PooledClass.js +0 -75
  460. data/public/vendor/npm/react@0.13.3/lib/React.js +0 -93
  461. data/public/vendor/npm/react@0.13.3/lib/ReactBrowserComponentMixin.js +0 -7
  462. data/public/vendor/npm/react@0.13.3/lib/ReactBrowserEventEmitter.js +0 -136
  463. data/public/vendor/npm/react@0.13.3/lib/ReactCSSTransitionGroup.js +0 -34
  464. data/public/vendor/npm/react@0.13.3/lib/ReactCSSTransitionGroupChild.js +0 -92
  465. data/public/vendor/npm/react@0.13.3/lib/ReactChildReconciler.js +0 -57
  466. data/public/vendor/npm/react@0.13.3/lib/ReactChildren.js +0 -67
  467. data/public/vendor/npm/react@0.13.3/lib/ReactClass.js +0 -338
  468. data/public/vendor/npm/react@0.13.3/lib/ReactComponent.js +0 -50
  469. data/public/vendor/npm/react@0.13.3/lib/ReactComponentBrowserEnvironment.js +0 -14
  470. data/public/vendor/npm/react@0.13.3/lib/ReactComponentEnvironment.js +0 -19
  471. data/public/vendor/npm/react@0.13.3/lib/ReactComponentWithPureRenderMixin.js +0 -7
  472. data/public/vendor/npm/react@0.13.3/lib/ReactCompositeComponent.js +0 -374
  473. data/public/vendor/npm/react@0.13.3/lib/ReactContext.js +0 -27
  474. data/public/vendor/npm/react@0.13.3/lib/ReactCurrentOwner.js +0 -32
  475. data/public/vendor/npm/react@0.13.3/lib/ReactDOM.js +0 -146
  476. data/public/vendor/npm/react@0.13.3/lib/ReactDOMButton.js +0 -35
  477. data/public/vendor/npm/react@0.13.3/lib/ReactDOMComponent.js +0 -267
  478. data/public/vendor/npm/react@0.13.3/lib/ReactDOMForm.js +0 -21
  479. data/public/vendor/npm/react@0.13.3/lib/ReactDOMIDOperations.js +0 -63
  480. data/public/vendor/npm/react@0.13.3/lib/ReactDOMIframe.js +0 -20
  481. data/public/vendor/npm/react@0.13.3/lib/ReactDOMImg.js +0 -21
  482. data/public/vendor/npm/react@0.13.3/lib/ReactDOMInput.js +0 -94
  483. data/public/vendor/npm/react@0.13.3/lib/ReactDOMOption.js +0 -23
  484. data/public/vendor/npm/react@0.13.3/lib/ReactDOMSelect.js +0 -112
  485. data/public/vendor/npm/react@0.13.3/lib/ReactDOMSelection.js +0 -103
  486. data/public/vendor/npm/react@0.13.3/lib/ReactDOMTextComponent.js +0 -38
  487. data/public/vendor/npm/react@0.13.3/lib/ReactDOMTextarea.js +0 -70
  488. data/public/vendor/npm/react@0.13.3/lib/ReactDefaultBatchingStrategy.js +0 -37
  489. data/public/vendor/npm/react@0.13.3/lib/ReactDefaultInjection.js +0 -93
  490. data/public/vendor/npm/react@0.13.3/lib/ReactDefaultPerf.js +0 -183
  491. data/public/vendor/npm/react@0.13.3/lib/ReactDefaultPerfAnalysis.js +0 -145
  492. data/public/vendor/npm/react@0.13.3/lib/ReactElement.js +0 -151
  493. data/public/vendor/npm/react@0.13.3/lib/ReactElementValidator.js +0 -218
  494. data/public/vendor/npm/react@0.13.3/lib/ReactEmptyComponent.js +0 -47
  495. data/public/vendor/npm/react@0.13.3/lib/ReactErrorUtils.js +0 -30
  496. data/public/vendor/npm/react@0.13.3/lib/ReactEventEmitterMixin.js +0 -12
  497. data/public/vendor/npm/react@0.13.3/lib/ReactEventListener.js +0 -93
  498. data/public/vendor/npm/react@0.13.3/lib/ReactFragment.js +0 -110
  499. data/public/vendor/npm/react@0.13.3/lib/ReactInjection.js +0 -27
  500. data/public/vendor/npm/react@0.13.3/lib/ReactInputSelection.js +0 -75
  501. data/public/vendor/npm/react@0.13.3/lib/ReactInstanceHandles.js +0 -113
  502. data/public/vendor/npm/react@0.13.3/lib/ReactInstanceMap.js +0 -47
  503. data/public/vendor/npm/react@0.13.3/lib/ReactLifeCycle.js +0 -9
  504. data/public/vendor/npm/react@0.13.3/lib/ReactLink.js +0 -16
  505. data/public/vendor/npm/react@0.13.3/lib/ReactMarkupChecksum.js +0 -17
  506. data/public/vendor/npm/react@0.13.3/lib/ReactMount.js +0 -347
  507. data/public/vendor/npm/react@0.13.3/lib/ReactMultiChild.js +0 -190
  508. data/public/vendor/npm/react@0.13.3/lib/ReactMultiChildUpdateTypes.js +0 -10
  509. data/public/vendor/npm/react@0.13.3/lib/ReactNativeComponent.js +0 -53
  510. data/public/vendor/npm/react@0.13.3/lib/ReactOwner.js +0 -21
  511. data/public/vendor/npm/react@0.13.3/lib/ReactPerf.js +0 -42
  512. data/public/vendor/npm/react@0.13.3/lib/ReactPropTransferer.js +0 -40
  513. data/public/vendor/npm/react@0.13.3/lib/ReactPropTypeLocationNames.js +0 -13
  514. data/public/vendor/npm/react@0.13.3/lib/ReactPropTypeLocations.js +0 -9
  515. data/public/vendor/npm/react@0.13.3/lib/ReactPropTypes.js +0 -225
  516. data/public/vendor/npm/react@0.13.3/lib/ReactPutListenerQueue.js +0 -31
  517. data/public/vendor/npm/react@0.13.3/lib/ReactReconcileTransaction.js +0 -66
  518. data/public/vendor/npm/react@0.13.3/lib/ReactReconciler.js +0 -44
  519. data/public/vendor/npm/react@0.13.3/lib/ReactRef.js +0 -36
  520. data/public/vendor/npm/react@0.13.3/lib/ReactRootIndex.js +0 -29
  521. data/public/vendor/npm/react@0.13.3/lib/ReactServerRendering.js +0 -44
  522. data/public/vendor/npm/react@0.13.3/lib/ReactServerRenderingTransaction.js +0 -47
  523. data/public/vendor/npm/react@0.13.3/lib/ReactStateSetters.js +0 -104
  524. data/public/vendor/npm/react@0.13.3/lib/ReactTestUtils.js +0 -249
  525. data/public/vendor/npm/react@0.13.3/lib/ReactTransitionChildMapping.js +0 -53
  526. data/public/vendor/npm/react@0.13.3/lib/ReactTransitionEvents.js +0 -68
  527. data/public/vendor/npm/react@0.13.3/lib/ReactTransitionGroup.js +0 -140
  528. data/public/vendor/npm/react@0.13.3/lib/ReactUpdateQueue.js +0 -107
  529. data/public/vendor/npm/react@0.13.3/lib/ReactUpdates.js +0 -139
  530. data/public/vendor/npm/react@0.13.3/lib/ReactWithAddons.js +0 -30
  531. data/public/vendor/npm/react@0.13.3/lib/SVGDOMPropertyConfig.js +0 -76
  532. data/public/vendor/npm/react@0.13.3/lib/SelectEventPlugin.js +0 -91
  533. data/public/vendor/npm/react@0.13.3/lib/ServerReactRootIndex.js +0 -29
  534. data/public/vendor/npm/react@0.13.3/lib/SimpleEventPlugin.js +0 -287
  535. data/public/vendor/npm/react@0.13.3/lib/SyntheticClipboardEvent.js +0 -11
  536. data/public/vendor/npm/react@0.13.3/lib/SyntheticCompositionEvent.js +0 -9
  537. data/public/vendor/npm/react@0.13.3/lib/SyntheticDragEvent.js +0 -9
  538. data/public/vendor/npm/react@0.13.3/lib/SyntheticEvent.js +0 -90
  539. data/public/vendor/npm/react@0.13.3/lib/SyntheticFocusEvent.js +0 -9
  540. data/public/vendor/npm/react@0.13.3/lib/SyntheticInputEvent.js +0 -9
  541. data/public/vendor/npm/react@0.13.3/lib/SyntheticKeyboardEvent.js +0 -43
  542. data/public/vendor/npm/react@0.13.3/lib/SyntheticMouseEvent.js +0 -38
  543. data/public/vendor/npm/react@0.13.3/lib/SyntheticTouchEvent.js +0 -19
  544. data/public/vendor/npm/react@0.13.3/lib/SyntheticUIEvent.js +0 -29
  545. data/public/vendor/npm/react@0.13.3/lib/SyntheticWheelEvent.js +0 -18
  546. data/public/vendor/npm/react@0.13.3/lib/Transaction.js +0 -90
  547. data/public/vendor/npm/react@0.13.3/lib/ViewportMetrics.js +0 -27
  548. data/public/vendor/npm/react@0.13.3/lib/accumulateInto.js +0 -26
  549. data/public/vendor/npm/react@0.13.3/lib/adler32.js +0 -32
  550. data/public/vendor/npm/react@0.13.3/lib/camelize.js +0 -30
  551. data/public/vendor/npm/react@0.13.3/lib/camelizeStyleName.js +0 -8
  552. data/public/vendor/npm/react@0.13.3/lib/cloneWithProps.js +0 -20
  553. data/public/vendor/npm/react@0.13.3/lib/containsNode.js +0 -20
  554. data/public/vendor/npm/react@0.13.3/lib/createArrayFromMixed.js +0 -15
  555. data/public/vendor/npm/react@0.13.3/lib/createFullPageComponent.js +0 -22
  556. data/public/vendor/npm/react@0.13.3/lib/createNodesFromMarkup.js +0 -39
  557. data/public/vendor/npm/react@0.13.3/lib/cx.js +0 -20
  558. data/public/vendor/npm/react@0.13.3/lib/dangerousStyleValue.js +0 -19
  559. data/public/vendor/npm/react@0.13.3/lib/emptyFunction.js +0 -32
  560. data/public/vendor/npm/react@0.13.3/lib/emptyObject.js +0 -9
  561. data/public/vendor/npm/react@0.13.3/lib/escapeTextContentForBrowser.js +0 -38
  562. data/public/vendor/npm/react@0.13.3/lib/findDOMNode.js +0 -31
  563. data/public/vendor/npm/react@0.13.3/lib/flattenChildren.js +0 -25
  564. data/public/vendor/npm/react@0.13.3/lib/focusNode.js +0 -27
  565. data/public/vendor/npm/react@0.13.3/lib/forEachAccumulated.js +0 -29
  566. data/public/vendor/npm/react@0.13.3/lib/getActiveElement.js +0 -27
  567. data/public/vendor/npm/react@0.13.3/lib/getEventCharCode.js +0 -50
  568. data/public/vendor/npm/react@0.13.3/lib/getEventKey.js +0 -72
  569. data/public/vendor/npm/react@0.13.3/lib/getEventModifierState.js +0 -45
  570. data/public/vendor/npm/react@0.13.3/lib/getEventTarget.js +0 -29
  571. data/public/vendor/npm/react@0.13.3/lib/getIteratorFn.js +0 -42
  572. data/public/vendor/npm/react@0.13.3/lib/getMarkupWrap.js +0 -73
  573. data/public/vendor/npm/react@0.13.3/lib/getNodeForCharacterOffset.js +0 -73
  574. data/public/vendor/npm/react@0.13.3/lib/getReactRootElementInContainer.js +0 -33
  575. data/public/vendor/npm/react@0.13.3/lib/getTextContentAccessor.js +0 -11
  576. data/public/vendor/npm/react@0.13.3/lib/getUnboundedScrollPosition.js +0 -38
  577. data/public/vendor/npm/react@0.13.3/lib/hyphenate.js +0 -31
  578. data/public/vendor/npm/react@0.13.3/lib/hyphenateStyleName.js +0 -8
  579. data/public/vendor/npm/react@0.13.3/lib/instantiateReactComponent.js +0 -55
  580. data/public/vendor/npm/react@0.13.3/lib/invariant.js +0 -26
  581. data/public/vendor/npm/react@0.13.3/lib/isEventSupported.js +0 -24
  582. data/public/vendor/npm/react@0.13.3/lib/isNode.js +0 -25
  583. data/public/vendor/npm/react@0.13.3/lib/isTextInputElement.js +0 -41
  584. data/public/vendor/npm/react@0.13.3/lib/isTextNode.js +0 -6
  585. data/public/vendor/npm/react@0.13.3/lib/joinClasses.js +0 -39
  586. data/public/vendor/npm/react@0.13.3/lib/keyMirror.js +0 -18
  587. data/public/vendor/npm/react@0.13.3/lib/keyOf.js +0 -34
  588. data/public/vendor/npm/react@0.13.3/lib/mapObject.js +0 -51
  589. data/public/vendor/npm/react@0.13.3/lib/memoizeStringOnly.js +0 -31
  590. data/public/vendor/npm/react@0.13.3/lib/onlyChild.js +0 -11
  591. data/public/vendor/npm/react@0.13.3/lib/performance.js +0 -8
  592. data/public/vendor/npm/react@0.13.3/lib/performanceNow.js +0 -7
  593. data/public/vendor/npm/react@0.13.3/lib/quoteAttributeValueForBrowser.js +0 -7
  594. data/public/vendor/npm/react@0.13.3/lib/setInnerHTML.js +0 -40
  595. data/public/vendor/npm/react@0.13.3/lib/setTextContent.js +0 -16
  596. data/public/vendor/npm/react@0.13.3/lib/shallowEqual.js +0 -42
  597. data/public/vendor/npm/react@0.13.3/lib/shouldUpdateReactComponent.js +0 -51
  598. data/public/vendor/npm/react@0.13.3/lib/toArray.js +0 -21
  599. data/public/vendor/npm/react@0.13.3/lib/traverseAllChildren.js +0 -104
  600. data/public/vendor/npm/react@0.13.3/lib/update.js +0 -78
  601. data/public/vendor/npm/react@0.13.3/lib/warning.js +0 -34
  602. data/public/vendor/npm/react@0.13.3/package.json +0 -34
  603. data/public/vendor/npm/react@0.13.3/react.js +0 -2
  604. data/public/vendor/npm/react@0.13.3.js +0 -1
  605. data/public/vendor/npm/readable-stream@1.1.13/duplex.js +0 -2
  606. data/public/vendor/npm/readable-stream@1.1.13/passthrough.js +0 -2
  607. data/public/vendor/npm/readable-stream@1.1.13/readable.js +0 -8
  608. data/public/vendor/npm/readable-stream@1.1.13/transform.js +0 -2
  609. data/public/vendor/npm/readable-stream@1.1.13/writable.js +0 -2
  610. data/public/vendor/npm/readable-stream@1.1.13.js +0 -1
  611. data/public/vendor/npm/source-map@0.1.31/CHANGELOG.md +0 -112
  612. data/public/vendor/npm/source-map@0.1.31/LICENSE +0 -28
  613. data/public/vendor/npm/source-map@0.1.31/Makefile.dryice.js +0 -89
  614. data/public/vendor/npm/source-map@0.1.31/README.md +0 -434
  615. data/public/vendor/npm/source-map@0.1.31/build/assert-shim.js +0 -58
  616. data/public/vendor/npm/source-map@0.1.31/build/mini-require.js +0 -154
  617. data/public/vendor/npm/source-map@0.1.31/build/prefix-source-map.jsm +0 -20
  618. data/public/vendor/npm/source-map@0.1.31/build/prefix-utils.jsm +0 -18
  619. data/public/vendor/npm/source-map@0.1.31/build/suffix-browser.js +0 -8
  620. data/public/vendor/npm/source-map@0.1.31/build/suffix-source-map.jsm +0 -6
  621. data/public/vendor/npm/source-map@0.1.31/build/suffix-utils.jsm +0 -21
  622. data/public/vendor/npm/source-map@0.1.31/build/test-prefix.js +0 -10
  623. data/public/vendor/npm/source-map@0.1.31/build/test-suffix.js +0 -5
  624. data/public/vendor/npm/source-map@0.1.31/lib/source-map/array-set.js +0 -49
  625. data/public/vendor/npm/source-map@0.1.31/lib/source-map/base64-vlq.js +0 -56
  626. data/public/vendor/npm/source-map@0.1.31/lib/source-map/base64.js +0 -44
  627. data/public/vendor/npm/source-map@0.1.31/lib/source-map/binary-search.js +0 -83
  628. data/public/vendor/npm/source-map@0.1.31/lib/source-map/source-map-consumer.js +0 -238
  629. data/public/vendor/npm/source-map@0.1.31/lib/source-map/source-map-generator.js +0 -231
  630. data/public/vendor/npm/source-map@0.1.31/lib/source-map/source-node.js +0 -234
  631. data/public/vendor/npm/source-map@0.1.31/lib/source-map/util.js +0 -207
  632. data/public/vendor/npm/source-map@0.1.31/lib/source-map.js +0 -4
  633. data/public/vendor/npm/source-map@0.1.31/package.json +0 -52
  634. data/public/vendor/npm/source-map@0.1.31/test/run-tests.js +0 -50
  635. data/public/vendor/npm/source-map@0.1.31/test/source-map/test-api.js +0 -19
  636. data/public/vendor/npm/source-map@0.1.31/test/source-map/test-array-set.js +0 -84
  637. data/public/vendor/npm/source-map@0.1.31/test/source-map/test-base64-vlq.js +0 -17
  638. data/public/vendor/npm/source-map@0.1.31/test/source-map/test-base64.js +0 -26
  639. data/public/vendor/npm/source-map@0.1.31/test/source-map/test-binary-search.js +0 -37
  640. data/public/vendor/npm/source-map@0.1.31/test/source-map/test-dog-fooding.js +0 -76
  641. data/public/vendor/npm/source-map@0.1.31/test/source-map/test-source-map-consumer.js +0 -426
  642. data/public/vendor/npm/source-map@0.1.31/test/source-map/test-source-map-generator.js +0 -480
  643. data/public/vendor/npm/source-map@0.1.31/test/source-map/test-source-node.js +0 -307
  644. data/public/vendor/npm/source-map@0.1.31/test/source-map/util.js +0 -84
  645. data/public/vendor/npm/source-map@0.1.31.js +0 -1
  646. data/public/vendor/npm/through@2.3.8/LICENSE.APACHE2 +0 -15
  647. data/public/vendor/npm/through@2.3.8/LICENSE.MIT +0 -24
  648. data/public/vendor/npm/through@2.3.8/index.js +0 -93
  649. data/public/vendor/npm/through@2.3.8/package.json +0 -36
  650. data/public/vendor/npm/through@2.3.8/readme.markdown +0 -64
  651. data/public/vendor/npm/through@2.3.8/test/async.js +0 -26
  652. data/public/vendor/npm/through@2.3.8/test/auto-destroy.js +0 -26
  653. data/public/vendor/npm/through@2.3.8/test/buffering.js +0 -57
  654. data/public/vendor/npm/through@2.3.8/test/end.js +0 -37
  655. data/public/vendor/npm/through@2.3.8/test/index.js +0 -98
  656. data/public/vendor/npm/through@2.3.8/test.js +0 -2
  657. data/public/vendor/npm/through@2.3.8.js +0 -1
  658. data/views/_options.erb +0 -156
  659. /data/public/vendor/github/jspm/{nodelibs-buffer@0.1.0 → nodelibs-buffer@0.1.1}/index.js +0 -0
  660. /data/public/vendor/github/jspm/{nodelibs-process@0.1.1 → nodelibs-process@0.1.2}/index.js +0 -0
  661. /data/public/vendor/npm/{readable-stream@1.1.13 → assert@1.5.0}/LICENSE +0 -0
  662. /data/public/vendor/npm/{buffer@3.4.3 → buffer@5.7.1}/LICENSE +0 -0
  663. /data/public/vendor/npm/{core-util-is@1.0.1 → core-util-is@1.0.3}/README.md +0 -0
  664. /data/public/vendor/npm/{process@0.10.1 → process@0.11.10}/LICENSE +0 -0
  665. /data/public/vendor/npm/{process@0.10.1 → process@0.11.10}/index.js +0 -0
  666. /data/public/vendor/npm/{readable-stream@1.1.13 → readable-stream@1.1.14}/README.md +0 -0
  667. /data/public/vendor/npm/{readable-stream@1.1.13 → readable-stream@1.1.14}/float.patch +0 -0
@@ -0,0 +1,1640 @@
1
+ var circosJS,
2
+ indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
3
+
4
+ if (typeof Object.assign !== 'function') {
5
+ Object.assign = function(target) {
6
+ 'use strict';
7
+ var index, key, source;
8
+ if (target === null) {
9
+ throw new TypeError('Cannot convert undefined or null to object');
10
+ }
11
+ target = Object(target);
12
+ index = 1;
13
+ while (index < arguments.length) {
14
+ source = arguments[index];
15
+ if (source !== null) {
16
+ for (key in source) {
17
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
18
+ target[key] = source[key];
19
+ }
20
+ }
21
+ }
22
+ index++;
23
+ }
24
+ return target;
25
+ };
26
+ }
27
+
28
+ circosJS = function(conf) {
29
+ var instance;
30
+ instance = new circosJS.Core(conf);
31
+ return instance;
32
+ };
33
+
34
+ circosJS.Core = function(conf) {
35
+ this.tracks = {
36
+ heatmaps: {},
37
+ histograms: {},
38
+ chords: {},
39
+ scatters: {},
40
+ lines: {},
41
+ stacks: {},
42
+ highlights: {},
43
+ texts: {}
44
+ };
45
+ this.conf = circosJS.mixConf(conf, this.defaultConf);
46
+ return this;
47
+ };
48
+
49
+ circosJS.Core.prototype.removeTracks = function(trackIds) {
50
+ var id, l, len, ref, store, svg, trackId, type;
51
+ svg = d3.select(this.conf.container);
52
+ ref = this.tracks;
53
+ for (type in ref) {
54
+ store = ref[type];
55
+ if (typeof trackIds === 'object') {
56
+ for (l = 0, len = trackIds.length; l < len; l++) {
57
+ id = trackIds[l];
58
+ if (id in store) {
59
+ svg.select('.' + id).remove();
60
+ delete store[id];
61
+ }
62
+ }
63
+ } else if (typeof trackIds === 'string') {
64
+ if (trackIds in store) {
65
+ svg.select('.' + trackIds).remove();
66
+ delete store[trackIds];
67
+ }
68
+ } else if (typeof trackIds === 'undefined') {
69
+ for (trackId in store) {
70
+ svg.select('.' + trackId).remove();
71
+ delete store[trackId];
72
+ }
73
+ }
74
+ }
75
+ return this;
76
+ };
77
+
78
+ circosJS.Core.prototype.layout = function(conf, data) {
79
+ this._layout = new circosJS.Layout(conf, data);
80
+ return this;
81
+ };
82
+
83
+ circosJS.log = function(level, code, message, data) {
84
+ var levels;
85
+ levels = ['Permanent log', 'Error', 'Warning', 'Info'];
86
+ console.log('CircosJS: ', levels[level] + ' [' + code + '] ', message, data);
87
+ };
88
+
89
+ circosJS.mixConf = function(conf, defaultConf) {
90
+ var key, newConf, value;
91
+ newConf = {};
92
+ for (key in defaultConf) {
93
+ value = defaultConf[key];
94
+ if (key in conf) {
95
+ if (Object.prototype.toString.call(value) === '[object Array]') {
96
+ newConf[key] = conf[key];
97
+ } else if (typeof value === 'object' && (value != null)) {
98
+ if ((value != null) && Object.keys(value).length === 0) {
99
+ newConf[key] = conf[key];
100
+ } else {
101
+ newConf[key] = circosJS.mixConf(conf[key], value);
102
+ }
103
+ } else {
104
+ newConf[key] = conf[key];
105
+ }
106
+ } else {
107
+ newConf[key] = value;
108
+ }
109
+ }
110
+ return newConf;
111
+ };
112
+
113
+ circosJS.Core.prototype.smartBorders = function() {
114
+ var border, borders, currentBorder, l, layout, len, ref, store, track, trackId, trackType, width;
115
+ width = this.conf.defaultTrackWidth;
116
+ layout = {
117
+ 'in': this._layout.conf.innerRadius,
118
+ out: this._layout.conf.outerRadius
119
+ };
120
+ borders = [];
121
+ ref = this.tracks;
122
+ for (trackType in ref) {
123
+ store = ref[trackType];
124
+ for (trackId in store) {
125
+ track = store[trackId];
126
+ if (track.conf.innerRadius) {
127
+ borders.push({
128
+ 'in': track.conf.innerRadius,
129
+ out: track.conf.outerRadius
130
+ });
131
+ }
132
+ }
133
+ }
134
+ borders = borders.sort(function(a, b) {
135
+ if (a.out > b.out) {
136
+ 1;
137
+ }
138
+ if (a.out < b.out) {
139
+ -1;
140
+ }
141
+ return 0;
142
+ });
143
+ currentBorder = layout;
144
+ for (l = 0, len = borders.length; l < len; l++) {
145
+ border = borders[l];
146
+ if (border.out < currentBorder['in'] - width) {
147
+ return {
148
+ 'in': currentBorder['in'] - width,
149
+ out: currentBorder['in']
150
+ };
151
+ }
152
+ currentBorder = border;
153
+ }
154
+ if (currentBorder['in'] > width) {
155
+ return {
156
+ 'in': currentBorder['in'] - width,
157
+ out: currentBorder['in']
158
+ };
159
+ } else {
160
+ return {
161
+ 'in': borders[0].out,
162
+ out: borders[0].out + width
163
+ };
164
+ }
165
+ };
166
+
167
+ if (typeof module !== 'undefined' && module !== null) {
168
+ module.exports = circosJS;
169
+ }
170
+
171
+ circosJS.checkParent = function(key, index, layoutSummary, header) {
172
+ if (!(key in layoutSummary)) {
173
+ circosJS.log(1, 'datum', 'unknown parent id', {
174
+ line: index + 1,
175
+ value: key,
176
+ header: header,
177
+ layoutSummary: layoutSummary
178
+ });
179
+ return false;
180
+ }
181
+ return true;
182
+ };
183
+
184
+ circosJS.checkNumber = function(keys, index) {
185
+ var header, value;
186
+ for (header in keys) {
187
+ value = keys[header];
188
+ if (isNaN(value)) {
189
+ circosJS.log(1, 'datum', 'not a number', {
190
+ line: index + 1,
191
+ value: value,
192
+ header: header
193
+ });
194
+ return false;
195
+ }
196
+ }
197
+ return true;
198
+ };
199
+
200
+ circosJS.parseSpanValueData = function(data, layoutSummary) {
201
+ var groups, sample;
202
+ if (!(data.length > 0)) {
203
+ return {
204
+ data: [],
205
+ meta: {
206
+ min: null,
207
+ max: null
208
+ }
209
+ };
210
+ }
211
+ sample = data[0];
212
+ if ('parent_id' in sample && 'start' in sample && 'end' in sample && 'value' in sample) {
213
+ data = data.map(function(datum) {
214
+ return [datum.parent_id, datum.start, datum.end, datum.value];
215
+ });
216
+ }
217
+ data = data.filter(function(datum, index) {
218
+ return circosJS.checkParent(datum[0], index, layoutSummary, 'parent');
219
+ }).filter(function(datum, index) {
220
+ return circosJS.checkNumber({
221
+ start: datum[1],
222
+ end: datum[2],
223
+ value: datum[3]
224
+ }, index);
225
+ }).map(function(datum) {
226
+ if (datum[1] < 0 || datum[2] > layoutSummary[datum[0]]) {
227
+ circosJS.log(2, 'position', 'position inconsistency', {
228
+ datum: datum,
229
+ layoutSummary: layoutSummary
230
+ });
231
+ }
232
+ return {
233
+ block_id: datum[0],
234
+ start: Math.max(0, parseFloat(datum[1])),
235
+ end: Math.min(layoutSummary[datum[0]], parseFloat(datum[2])),
236
+ value: parseFloat(datum[3]) || 1
237
+ };
238
+ });
239
+ groups = d3.nest().key(function(datum) {
240
+ return datum.block_id;
241
+ }).entries(data);
242
+ return {
243
+ data: groups,
244
+ meta: {
245
+ min: d3.min(data, function(d) {
246
+ return d.value;
247
+ }),
248
+ max: d3.max(data, function(d) {
249
+ return d.value;
250
+ })
251
+ }
252
+ };
253
+ };
254
+
255
+ circosJS.parseSpanStringData = function(data, layoutSummary) {
256
+ var groups, sample;
257
+ sample = data[0];
258
+ if ('parent_id' in sample && 'start' in sample && 'end' in sample && 'value' in sample) {
259
+ data = data.map(function(datum) {
260
+ return [datum.parent_id, datum.start, datum.end, datum.value];
261
+ });
262
+ }
263
+ data = data.filter(function(datum, index) {
264
+ return circosJS.checkParent(datum[0], index, layoutSummary, 'parent');
265
+ }).filter(function(datum, index) {
266
+ return circosJS.checkNumber({
267
+ start: datum[1],
268
+ end: datum[2]
269
+ }, index);
270
+ }).map(function(datum) {
271
+ var value;
272
+ if (datum[1] < 0 || datum[2] > layoutSummary[datum[0]]) {
273
+ circosJS.log(2, 'position', 'position inconsistency', {
274
+ datum: datum,
275
+ layoutSummary: layoutSummary
276
+ });
277
+ }
278
+ value = datum[3] != null ? datum[3] : null;
279
+ return {
280
+ block_id: datum[0],
281
+ start: Math.max(0, parseFloat(datum[1])),
282
+ end: Math.min(layoutSummary[datum[0]], parseFloat(datum[2])),
283
+ value: value
284
+ };
285
+ });
286
+ groups = d3.nest().key(function(datum) {
287
+ return datum.block_id;
288
+ }).entries(data);
289
+ return {
290
+ data: groups,
291
+ meta: {
292
+ min: d3.min(data, function(d) {
293
+ return d.value;
294
+ }),
295
+ max: d3.max(data, function(d) {
296
+ return d.value;
297
+ })
298
+ }
299
+ };
300
+ };
301
+
302
+ circosJS.parsePositionValueData = function(data, layoutSummary) {
303
+ var groups, sample;
304
+ sample = data[0];
305
+ if ('parent_id' in sample && 'position' in sample) {
306
+ data = data.map(function(datum) {
307
+ return [datum.parent_id, datum.position, datum.value];
308
+ });
309
+ }
310
+ data = data.filter(function(datum, index) {
311
+ return circosJS.checkParent(datum[0], index, layoutSummary, 'parent');
312
+ }).filter(function(datum, index) {
313
+ return circosJS.checkNumber({
314
+ position: datum[1],
315
+ value: datum[2]
316
+ }, index);
317
+ }).map(function(datum) {
318
+ return {
319
+ block_id: datum[0],
320
+ position: Math.min(layoutSummary[datum[0]], parseFloat(datum[1])),
321
+ value: parseFloat(datum[2]) || 1
322
+ };
323
+ });
324
+ groups = d3.nest().key(function(datum) {
325
+ return datum.block_id;
326
+ }).entries(data);
327
+ return {
328
+ data: groups,
329
+ meta: {
330
+ min: d3.min(data, function(d) {
331
+ return d.value;
332
+ }),
333
+ max: d3.max(data, function(d) {
334
+ return d.value;
335
+ })
336
+ }
337
+ };
338
+ };
339
+
340
+ circosJS.parsePositionTextData = function(data, layoutSummary) {
341
+ var groups, sample;
342
+ sample = data[0];
343
+ if ('parent_id' in sample && 'position' in sample) {
344
+ data = data.map(function(datum) {
345
+ return [datum.parent_id, datum.position, datum.value];
346
+ });
347
+ }
348
+ data = data.filter(function(datum, index) {
349
+ return circosJS.checkParent(datum[0], index, layoutSummary, 'parent');
350
+ }).filter(function(datum, index) {
351
+ return circosJS.checkNumber({
352
+ position: datum[1]
353
+ }, index);
354
+ }).map(function(datum) {
355
+ return {
356
+ block_id: datum[0],
357
+ position: Math.min(layoutSummary[datum[0]], parseFloat(datum[1])),
358
+ value: datum[2]
359
+ };
360
+ });
361
+ groups = d3.nest().key(function(datum) {
362
+ return datum.block_id;
363
+ }).entries(data);
364
+ return {
365
+ data: groups,
366
+ meta: {
367
+ min: d3.min(data, function(d) {
368
+ return d.value;
369
+ }),
370
+ max: d3.max(data, function(d) {
371
+ return d.value;
372
+ })
373
+ }
374
+ };
375
+ };
376
+
377
+ circosJS.parseChordData = function(data, layoutSummary) {
378
+ var sample;
379
+ sample = data[0];
380
+ if ('source_id' in sample && 'source_start' in sample && 'source_end' && 'target_id' in sample && 'target_start' in sample && 'target_end' in sample) {
381
+ data = data.map(function(datum) {
382
+ var elts;
383
+ elts = [datum.source_id, datum.source_start, datum.source_end, datum.target_id, datum.target_start, datum.target_end];
384
+ if (datum.value != null) {
385
+ elts.push(datum.value);
386
+ }
387
+ return elts;
388
+ });
389
+ }
390
+ data = data.filter(function(datum, index) {
391
+ return circosJS.checkParent(datum[0], index, layoutSummary, 'source_id');
392
+ }).filter(function(datum, index) {
393
+ return circosJS.checkParent(datum[3], index, layoutSummary, 'target_id');
394
+ }).filter(function(datum, index) {
395
+ return circosJS.checkNumber({
396
+ source_start: datum[1],
397
+ source_end: datum[2],
398
+ target_start: datum[4],
399
+ target_end: datum[5],
400
+ value: datum[6] || 1
401
+ }, index);
402
+ }).map(function(datum) {
403
+ return {
404
+ source: {
405
+ id: datum[0],
406
+ start: Math.max(0, parseFloat(datum[1])),
407
+ end: Math.min(layoutSummary[datum[0]], parseFloat(datum[2]))
408
+ },
409
+ target: {
410
+ id: datum[3],
411
+ start: Math.max(0, parseFloat(datum[4])),
412
+ end: Math.min(layoutSummary[datum[3]], parseFloat(datum[5]))
413
+ },
414
+ value: parseFloat(datum[6]),
415
+ hsp: datum[7]
416
+ };
417
+ });
418
+ return {
419
+ data: data,
420
+ meta: {
421
+ min: d3.min(data, function(d) {
422
+ return d.value;
423
+ }),
424
+ max: d3.max(data, function(d) {
425
+ return d.value;
426
+ })
427
+ }
428
+ };
429
+ };
430
+
431
+ circosJS.Layout = function(conf, data) {
432
+ var block_nb, gap, k, offset, ref, ref1, size, v;
433
+ if (data == null) {
434
+ circosJS.log(2, 'no layout data', '');
435
+ }
436
+ this.conf = circosJS.mixConf(conf, JSON.parse(JSON.stringify(this.defaultConf)));
437
+ this.data = data;
438
+ this.blocks = {};
439
+ this.size = 0;
440
+ offset = 0;
441
+ ref = this.data;
442
+ for (k in ref) {
443
+ v = ref[k];
444
+ this.blocks[v.id] = {
445
+ label: v.label,
446
+ len: v.len,
447
+ color: v.color,
448
+ offset: offset
449
+ };
450
+ v.offset = offset;
451
+ offset += v.len;
452
+ }
453
+ this.size = offset;
454
+ gap = this.conf.gap;
455
+ size = this.size;
456
+ block_nb = this.data.length;
457
+ ref1 = this.data;
458
+ for (k in ref1) {
459
+ v = ref1[k];
460
+ this.blocks[v.id].start = v.offset / size * (2 * Math.PI - block_nb * gap) + k * gap;
461
+ this.blocks[v.id].end = (v.offset + v.len) / size * (2 * Math.PI - block_nb * gap) + k * gap;
462
+ v.start = v.offset / size * (2 * Math.PI - block_nb * gap) + k * gap;
463
+ v.end = (v.offset + v.len) / size * (2 * Math.PI - block_nb * gap) + k * gap;
464
+ }
465
+ this.getAngle = function(blockId, unit) {
466
+ var block;
467
+ block = this.blocks[blockId].start / this._size;
468
+ if (unit === 'deg') {
469
+ return block * 360;
470
+ } else if (unit === 'rad') {
471
+ return block * 2 * Math.PI;
472
+ } else {
473
+ return null;
474
+ }
475
+ };
476
+ this.summary = function() {
477
+ var d, l, layoutSummary, len, ref2;
478
+ layoutSummary = {};
479
+ ref2 = this._data;
480
+ for (l = 0, len = ref2.length; l < len; l++) {
481
+ d = ref2[l];
482
+ layoutSummary[d.id] = d.len;
483
+ }
484
+ return layoutSummary;
485
+ };
486
+ return this;
487
+ };
488
+
489
+ circosJS.Core.prototype.heatmap = function(id, conf, data) {
490
+ var track;
491
+ track = new circosJS.Heatmap();
492
+ track.build(this, conf, data);
493
+ this.tracks.heatmaps[id] = track;
494
+ return this;
495
+ };
496
+
497
+ circosJS.Core.prototype.histogram = function(id, conf, data) {
498
+ var track;
499
+ track = new circosJS.Histogram();
500
+ track.build(this, conf, data);
501
+ this.tracks.histograms[id] = track;
502
+ return this;
503
+ };
504
+
505
+ circosJS.Core.prototype.chord = function(id, conf, data) {
506
+ var track;
507
+ track = new circosJS.Chord();
508
+ track.build(this, conf, data);
509
+ this.tracks.chords[id] = track;
510
+ return this;
511
+ };
512
+
513
+ circosJS.Core.prototype.scatter = function(id, conf, data) {
514
+ var track;
515
+ track = new circosJS.Scatter();
516
+ track.build(this, conf, data);
517
+ this.tracks.scatters[id] = track;
518
+ return this;
519
+ };
520
+
521
+ circosJS.Core.prototype.line = function(id, conf, data) {
522
+ var track;
523
+ track = new circosJS.Line();
524
+ track.build(this, conf, data);
525
+ this.tracks.lines[id] = track;
526
+ return this;
527
+ };
528
+
529
+ circosJS.Core.prototype.stack = function(id, conf, data) {
530
+ var track;
531
+ track = new circosJS.Stack();
532
+ track.build(this, conf, data);
533
+ this.tracks.stacks[id] = track;
534
+ return this;
535
+ };
536
+
537
+ circosJS.Core.prototype.highlight = function(id, conf, data) {
538
+ var track;
539
+ track = new circosJS.Highlight();
540
+ track.build(this, conf, data);
541
+ this.tracks.highlights[id] = track;
542
+ return this;
543
+ };
544
+
545
+ circosJS.Core.prototype.text = function(id, conf, data) {
546
+ var track;
547
+ track = new circosJS.Text();
548
+ track.build(this, conf, data);
549
+ this.tracks.texts[id] = track;
550
+ return this;
551
+ };
552
+
553
+ circosJS.Chord = function() {
554
+ circosJS.Track.call(this);
555
+ this.parseData = circosJS.parseChordData;
556
+ this.applyRules = function(rules, data) {
557
+ var datum, l, len, results, rule;
558
+ rules = rules || [];
559
+ results = [];
560
+ for (l = 0, len = data.length; l < len; l++) {
561
+ datum = data[l];
562
+ results.push((function() {
563
+ var len1, m, results1;
564
+ results1 = [];
565
+ for (m = 0, len1 = rules.length; m < len1; m++) {
566
+ rule = rules[m];
567
+ if (rule.condition(datum)) {
568
+ results1.push(datum[rule.parameter] = rule.value);
569
+ } else {
570
+ results1.push(void 0);
571
+ }
572
+ }
573
+ return results1;
574
+ })());
575
+ }
576
+ return results;
577
+ };
578
+ this.getSource = (function(_this) {
579
+ return function(d, layout) {
580
+ var block, endAngle, result, startAngle;
581
+ d = d.source;
582
+ block = layout.blocks[d.id];
583
+ startAngle = block.start + d.start / block.len * (block.end - block.start);
584
+ endAngle = block.start + d.end / block.len * (block.end - block.start);
585
+ return result = {
586
+ radius: layout.conf.innerRadius,
587
+ startAngle: startAngle,
588
+ endAngle: endAngle
589
+ };
590
+ };
591
+ })(this);
592
+ this.getTarget = (function(_this) {
593
+ return function(d, layout) {
594
+ var block, endAngle, result, startAngle;
595
+ d = d.target;
596
+ block = layout.blocks[d.id];
597
+ startAngle = block.start + d.start / block.len * (block.end - block.start);
598
+ endAngle = block.start + d.end / block.len * (block.end - block.start);
599
+ return result = {
600
+ radius: layout.conf.innerRadius,
601
+ startAngle: startAngle,
602
+ endAngle: endAngle
603
+ };
604
+ };
605
+ })(this);
606
+ this.dimChords = function (parentElement, d, conf, index) {
607
+ parentElement.selectAll('path').style('opacity', function (p, i) {
608
+ if (index == i) {
609
+ return 1;
610
+ }
611
+ return 0;
612
+ });
613
+ };
614
+ this.resetChords = function (parentElement,conf) {
615
+ parentElement.selectAll('path').style('opacity',conf.opacity);
616
+ };
617
+ this.renderChords = function(parentElement, name, conf, data, layout, ratio, getSource, getTarget) {
618
+ var link, track;
619
+ track = parentElement.append('g').attr('class', conf.colorPalette);
620
+ link = track.selectAll('.chord').data(data).enter().append('path').attr('class', 'chord').attr('d', d3.svg.chord().source(function(d) {
621
+ return getSource(d, layout);
622
+ }).target(function(d) {
623
+ return getTarget(d, layout);
624
+ })).attr('opacity', function(d) {
625
+ return conf.opacity;
626
+ }).attr('id',function (d) {
627
+ return d.source.id+'_'+d.target.id;
628
+ }).on('mouseover', (function(_this) {
629
+ return function(d, i, j) {
630
+ _this.dimChords(track, d, conf, i);
631
+ return _this.dispatch.mouseover(d, i, j);
632
+ };
633
+ })(this)).on('mouseout', (function(_this) {
634
+ return function(d, i, j) {
635
+ _this.resetChords(track,conf);
636
+ return _this.dispatch.mouseout(d, i, j);
637
+ };
638
+ })(this));
639
+ if (conf.usePalette) {
640
+ link.attr('class', function(d) {
641
+ return 'q' + ratio(d.value, conf.cmin, conf.cmax, conf.colorPaletteSize, conf.colorPaletteReverse, conf.logScale) + '-' + conf.colorPaletteSize;
642
+ });
643
+ } else {
644
+ link.attr('fill', function(d) {
645
+ return d.color || conf.color;
646
+ });
647
+ }
648
+ return link;
649
+ };
650
+ this.render = (function(_this) {
651
+ return function(instance, parentElement, name) {
652
+ var selection, track;
653
+ parentElement.select('.' + name).remove();
654
+ track = parentElement.append('g').attr('class', name).attr('z-index', _this.conf.zIndex);
655
+ selection = _this.renderChords(track, name, _this.conf, _this.data, instance._layout, _this.ratio, _this.getSource, _this.getTarget);
656
+ if (_this.conf.tooltipContent != null) {
657
+ return circosJS.registerTooltip(instance, _this, selection, _this.conf);
658
+ }
659
+ };
660
+ })(this);
661
+ return this;
662
+ };
663
+
664
+ circosJS.Heatmap = function() {
665
+ circosJS.Track.call(this);
666
+ this.parseData = circosJS.parseSpanValueData;
667
+ this.renderDatumContainer = (function(_this) {
668
+ return function(instance, parentElement, name, data, conf) {
669
+ var group, track;
670
+ track = parentElement.append('g').attr('class', conf.colorPalette);
671
+ return group = _this.renderBlock(track, data, instance._layout, conf);
672
+ };
673
+ })(this);
674
+ this.renderDatum = function(parentElement, conf, layout, utils) {
675
+ return parentElement.selectAll('tile').data(function(d) {
676
+ return d.values;
677
+ }).enter().append('path').attr('class', 'tile').attr('opacity', function(d) {
678
+ return d.opacity || conf.opacity;
679
+ }).attr('d', d3.svg.arc().innerRadius(conf.innerRadius).outerRadius(conf.outerRadius).startAngle(function(d, i) {
680
+ return utils.theta(d.start, layout.blocks[d.block_id]);
681
+ }).endAngle(function(d, i) {
682
+ return utils.theta(d.end, layout.blocks[d.block_id]);
683
+ })).attr('class', function(d) {
684
+ return 'q' + utils.ratio(d.value, conf.cmin, conf.cmax, conf.colorPaletteSize, conf.colorPaletteReverse, conf.logScale) + '-' + conf.colorPaletteSize;
685
+ });
686
+ };
687
+ return this;
688
+ };
689
+
690
+ circosJS.Highlight = function() {
691
+ circosJS.Track.call(this);
692
+ this.parseData = circosJS.parseSpanStringData;
693
+ this.renderDatumContainer = (function(_this) {
694
+ return function(instance, parentElement, name, data, conf) {
695
+ var group;
696
+ return group = _this.renderBlock(parentElement, data, instance._layout, conf);
697
+ };
698
+ })(this);
699
+ this.renderDatum = function(parentElement, conf, layout, utils) {
700
+ return parentElement.selectAll('tile').data(function(d) {
701
+ return d.values;
702
+ }).enter().append('path').attr('class', 'tile').attr('d', d3.svg.arc().innerRadius(conf.innerRadius).outerRadius(conf.outerRadius).startAngle(function(d, i) {
703
+ return utils.theta(d.start, layout.blocks[d.block_id]);
704
+ }).endAngle(function(d, i) {
705
+ return utils.theta(d.end, layout.blocks[d.block_id]);
706
+ })).attr('fill', function(d) {
707
+ return d.value || conf.color;
708
+ }).attr('opacity', function(d) {
709
+ return d.opacity || conf.opacity;
710
+ }).attr('stroke-width', function(d) {
711
+ return d.strokeWidth || conf.strokeWidth;
712
+ }).attr('stroke', function(d) {
713
+ return d.strokeColor || conf.strokeColor;
714
+ });
715
+ };
716
+ return this;
717
+ };
718
+
719
+ circosJS.Histogram = function() {
720
+ circosJS.Track.call(this);
721
+ this.parseData = circosJS.parseSpanValueData;
722
+ this.renderDatumContainer = (function(_this) {
723
+ return function(instance, parentElement, name, data, conf) {
724
+ var group, track;
725
+ track = parentElement.append('g').attr('class', _this.conf.colorPalette);
726
+ return group = _this.renderBlock(track, data, instance._layout, conf);
727
+ };
728
+ })(this);
729
+ this.renderDatum = function(parentElement, conf, layout, utils) {
730
+ var bin;
731
+ bin = parentElement.selectAll('.bin').data(function(d) {
732
+ return d.values;
733
+ }).enter().append('path').attr('class', 'bin').attr('opacity', function(d) {
734
+ return d.opacity || conf.opacity;
735
+ }).attr('d', d3.svg.arc().innerRadius(function(d) {
736
+ var height;
737
+ if (conf.direction === 'in') {
738
+ height = utils.ratio(d.value, conf.cmin, conf.cmax, conf.outerRadius - conf.innerRadius, false, conf.logscale);
739
+ return conf.outerRadius - height;
740
+ } else {
741
+ return conf.innerRadius;
742
+ }
743
+ }).outerRadius(function(d) {
744
+ var height;
745
+ if (conf.direction === 'out') {
746
+ height = utils.ratio(d.value, conf.cmin, conf.cmax, conf.outerRadius - conf.innerRadius, false, conf.logscale);
747
+ return conf.innerRadius + height;
748
+ } else {
749
+ return conf.outerRadius;
750
+ }
751
+ }).startAngle(function(d) {
752
+ return utils.theta(d.start, layout.blocks[d.block_id]);
753
+ }).endAngle(function(d) {
754
+ return utils.theta(d.end, layout.blocks[d.block_id]);
755
+ }));
756
+ if (conf.usePalette) {
757
+ bin.attr('class', function(d) {
758
+ return 'q' + utils.ratio(d.value, conf.cmin, conf.cmax, conf.colorPaletteSize, conf.colorPaletteReverse, conf.logScale) + '-' + conf.colorPaletteSize;
759
+ });
760
+ } else {
761
+ bin.attr('fill', d.color || conf.color);
762
+ }
763
+ return bin;
764
+ };
765
+ return this;
766
+ };
767
+
768
+ circosJS.Line = function() {
769
+ circosJS.Track.call(this);
770
+ this.parseData = circosJS.parsePositionValueData;
771
+ this.renderDatumContainer = (function(_this) {
772
+ return function(instance, parentElement, name, data, conf) {
773
+ var group, track;
774
+ track = parentElement.append('g').attr('class', name);
775
+ return group = _this.renderBlock(track, data, instance._layout, conf);
776
+ };
777
+ })(this);
778
+ this.renderDatum = function(parentElement, conf, layout, utils) {
779
+ var line;
780
+ line = d3.svg.line().x(function(d) {
781
+ return utils.x(d, layout, conf);
782
+ }).y(function(d) {
783
+ return utils.y(d, layout, conf);
784
+ }).interpolate(conf.interpolation);
785
+ return parentElement.append('path').datum(function(d) {
786
+ return d.values;
787
+ }).attr('class', 'line').attr('d', line).attr('opacity', function(d) {
788
+ return d.opacity || conf.opacity;
789
+ }).attr('stroke-width', function(d) {
790
+ return d.thickness || conf.thickness;
791
+ }).attr('stroke', function(d) {
792
+ return d.color || conf.color;
793
+ }).attr('fill', function(d) {
794
+ var color, fill;
795
+ fill = d.fill || conf.fill;
796
+ color = d.fill_color || conf.fill_color;
797
+ if (fill) {
798
+ return color;
799
+ } else {
800
+ return 'none';
801
+ }
802
+ });
803
+ };
804
+ return this;
805
+ };
806
+
807
+ circosJS.Scatter = function() {
808
+ circosJS.Track.call(this);
809
+ this.parseData = circosJS.parsePositionValueData;
810
+ this.renderDatumContainer = (function(_this) {
811
+ return function(instance, parentElement, name, data, conf) {
812
+ var group, track;
813
+ track = parentElement.append('g').attr('class', name);
814
+ return group = _this.renderBlock(track, data, instance._layout, conf);
815
+ };
816
+ })(this);
817
+ this.renderDatum = function(parentElement, conf, layout, utils) {
818
+ var point;
819
+ point = parentElement.selectAll('.point').data(function(d) {
820
+ return d.values;
821
+ }).enter().append('path').attr('class', 'point').attr('opacity', function(d) {
822
+ return d.opacity || conf.opacity;
823
+ }).attr('d', d3.svg.symbol().type(conf.glyph.shape).size(conf.glyph.size)).attr('transform', (function(_this) {
824
+ return function(d) {
825
+ return 'translate(' + utils.x(d, layout, conf) + ',' + utils.y(d, layout, conf) + ') rotate(' + utils.theta(d.position, layout.blocks[d.block_id]) * 360 / (2 * Math.PI) + ')';
826
+ };
827
+ })(this)).attr('stroke', function(d) {
828
+ return d.glyph_strokeColor || conf.glyph.strokeColor;
829
+ }).attr('stroke-width', function(d) {
830
+ return d.glyph_strokeWidth || conf.glyph.strokeWidth;
831
+ }).attr('fill', function(d) {
832
+ var color, fill;
833
+ fill = d.glyph_fill || conf.glyph.fill;
834
+ color = d.glyph_color || conf.glyph.color;
835
+ if (fill) {
836
+ return color;
837
+ } else {
838
+ return 'none';
839
+ }
840
+ });
841
+ return point;
842
+ };
843
+ return this;
844
+ };
845
+
846
+ circosJS.Stack = function() {
847
+ circosJS.Track.call(this);
848
+ this.parseData = circosJS.parseSpanValueData;
849
+ this.build = function(instance, conf, data, rules, backgrounds) {
850
+ this.loadData(data, instance);
851
+ this.conf = this.processConf(conf, this.defaultConf, this.meta, instance, this);
852
+ this.buildLayers(this.data, this.conf.margin);
853
+ return this.applyRules(conf.rules, this.data);
854
+ };
855
+ this.buildLayers = function(data, margin) {
856
+ var block, datum, i, idx, l, lastDatumInLayer, layer, layers, len, len1, m, placed, ref;
857
+ for (idx in data) {
858
+ block = data[idx];
859
+ block.values = block.values.sort(function(a, b) {
860
+ if (a.start < b.start) {
861
+ return -1;
862
+ }
863
+ if (a.start === b.start && a.end > b.end) {
864
+ return -1;
865
+ }
866
+ if (a.start === b.start && a.end === b.end) {
867
+ return 0;
868
+ }
869
+ return 1;
870
+ });
871
+ layers = [];
872
+ ref = block.values;
873
+ for (l = 0, len = ref.length; l < len; l++) {
874
+ datum = ref[l];
875
+ placed = false;
876
+ for (i = m = 0, len1 = layers.length; m < len1; i = ++m) {
877
+ layer = layers[i];
878
+ lastDatumInLayer = layer.slice(0).pop();
879
+ if (lastDatumInLayer.end + margin < datum.start) {
880
+ layer.push(datum);
881
+ datum.layer = i;
882
+ placed = true;
883
+ break;
884
+ }
885
+ }
886
+ if (!placed) {
887
+ datum.layer = layers.length;
888
+ }
889
+ if (!placed) {
890
+ layers.push([datum]);
891
+ }
892
+ }
893
+ }
894
+ };
895
+ this.applyRules = function(rules, data) {
896
+ var datum, i, k, layer, results, rule, v;
897
+ rules = rules || [];
898
+ results = [];
899
+ for (k in data) {
900
+ v = data[k];
901
+ results.push((function() {
902
+ var ref, results1;
903
+ ref = v.layers;
904
+ results1 = [];
905
+ for (i in ref) {
906
+ layer = ref[i];
907
+ results1.push((function() {
908
+ var l, len, results2;
909
+ results2 = [];
910
+ for (l = 0, len = layer.length; l < len; l++) {
911
+ datum = layer[l];
912
+ results2.push((function() {
913
+ var len1, m, results3;
914
+ results3 = [];
915
+ for (m = 0, len1 = rules.length; m < len1; m++) {
916
+ rule = rules[m];
917
+ if (rule.condition(v.parent, datum, i)) {
918
+ results3.push(datum[rule.parameter] = rule.value);
919
+ } else {
920
+ results3.push(void 0);
921
+ }
922
+ }
923
+ return results3;
924
+ })());
925
+ }
926
+ return results2;
927
+ })());
928
+ }
929
+ return results1;
930
+ })());
931
+ }
932
+ return results;
933
+ };
934
+ this.datumRadialPosition = (function(_this) {
935
+ return function(d) {
936
+ var origin, radialEnd, radialStart;
937
+ radialStart = (_this.conf.thickness + _this.conf.radialMargin) * d.layer;
938
+ radialEnd = radialStart + _this.conf.thickness;
939
+ if (_this.conf.direction === 'out') {
940
+ return [_this.conf.innerRadius + radialStart, Math.min(_this.conf.innerRadius + radialEnd, _this.conf.outerRadius)];
941
+ }
942
+ if (_this.conf.direction === 'in') {
943
+ return [Math.max(_this.conf.outerRadius - radialEnd, _this.conf.innerRadius), _this.conf.outerRadius - radialStart];
944
+ }
945
+ if (_this.conf.direction === 'center') {
946
+ origin = Math.floor((_this.conf.outerRadius + _this.conf.innerRadius) / 2);
947
+ radialStart = (_this.conf.thickness + _this.conf.radialMargin) * Math.floor(d.layer / 2);
948
+ radialEnd = radialStart + _this.conf.thickness;
949
+ if (d.layer % 2 === 0) {
950
+ return [origin + radialStart, origin + radialEnd];
951
+ } else {
952
+ return [origin - radialStart - _this.conf.radialMargin, origin - radialEnd - _this.conf.radialMargin];
953
+ }
954
+ }
955
+ };
956
+ })(this);
957
+ this.datumInnerRadius = (function(_this) {
958
+ return function(d, i, j) {
959
+ return _this.datumRadialPosition(d, i, j)[0];
960
+ };
961
+ })(this);
962
+ this.datumOuterRadius = (function(_this) {
963
+ return function(d, i, j) {
964
+ return _this.datumRadialPosition(d, i, j)[1];
965
+ };
966
+ })(this);
967
+ this.renderDatumContainer = (function(_this) {
968
+ return function(instance, parentElement, name, data, conf) {
969
+ var group, track;
970
+ track = parentElement.append('g').attr('class', conf.colorPalette);
971
+ return group = _this.renderBlock(track, data, instance._layout, conf);
972
+ };
973
+ })(this);
974
+ this.renderDatum = function(parentElement, conf, layout, utils) {
975
+ var tile;
976
+ tile = parentElement.selectAll('.tile').data(function(d) {
977
+ return d.values;
978
+ }).enter().append('path').attr('class', 'tile').attr('d', d3.svg.arc().innerRadius(utils.datumInnerRadius).outerRadius(utils.datumOuterRadius).startAngle(function(d) {
979
+ return utils.theta(d.start, layout.blocks[d.block_id]);
980
+ }).endAngle(function(d) {
981
+ return utils.theta(d.end, layout.blocks[d.block_id]);
982
+ }));
983
+ tile.attr('opacity', function(d) {
984
+ return d.opacity || conf.opacity;
985
+ });
986
+ tile.attr('stroke-width', function(d) {
987
+ return d.strokeWidth || conf.strokeWidth;
988
+ });
989
+ tile.attr('stroke', function(d) {
990
+ return d.strokeColor || conf.strokeColor;
991
+ });
992
+ tile.attr('fill', function(d) {
993
+ return d.color || conf.color;
994
+ });
995
+ tile.attr('class', function(d) {
996
+ var usePalette;
997
+ usePalette = d.usePalette || conf.usePalette;
998
+ if (usePalette) {
999
+ return 'q' + utils.ratio(d.value, conf.cmin, conf.cmax, conf.colorPaletteSize, conf.colorPaletteReverse, conf.logScale) + '-' + conf.colorPaletteSize;
1000
+ }
1001
+ });
1002
+ return tile;
1003
+ };
1004
+ return this;
1005
+ };
1006
+
1007
+ circosJS.Text = function() {
1008
+ circosJS.Track.call(this);
1009
+ this.parseData = circosJS.parsePositionTextData;
1010
+ this.renderDatumContainer = (function(_this) {
1011
+ return function(instance, parentElement, name, data, conf) {
1012
+ var group, track;
1013
+ track = parentElement.append('g').attr('class', name);
1014
+ return group = _this.renderBlock(track, data, instance._layout, conf);
1015
+ };
1016
+ })(this);
1017
+ this.renderDatum = function(parentElement, conf, layout, utils) {
1018
+ var key, ref, text, value;
1019
+ text = parentElement.selectAll('g').data(function(d) {
1020
+ return d.values;
1021
+ }).enter().append('g').append('text').text(function(d) {
1022
+ return d.value;
1023
+ }).attr('transform', function(d) {
1024
+ var angle;
1025
+ angle = utils.theta(d.position, layout.blocks[d.block_id]) * 360 / (2 * Math.PI) - 90;
1026
+ return 'rotate(' + angle + ')' + 'translate(' + conf.innerRadius + ',0)';
1027
+ });
1028
+ ref = conf.style;
1029
+ for (key in ref) {
1030
+ value = ref[key];
1031
+ text.style(key, value);
1032
+ }
1033
+ return text;
1034
+ };
1035
+ return this;
1036
+ };
1037
+
1038
+ circosJS.Track = function() {
1039
+ this.build = function(instance, conf, data) {
1040
+ this.dispatch = d3.dispatch('mouseover', 'mouseout');
1041
+ this.loadData(data, instance);
1042
+ this.conf = this.processConf(conf, this.defaultConf, this.meta, instance, this);
1043
+ return this.applyRules(conf.rules, this.data);
1044
+ };
1045
+ this.loadData = function(data, instance) {
1046
+ var d, l, layoutSummary, len, ref, result;
1047
+ layoutSummary = {};
1048
+ ref = instance._layout.data;
1049
+ for (l = 0, len = ref.length; l < len; l++) {
1050
+ d = ref[l];
1051
+ layoutSummary[d.id] = d.len;
1052
+ }
1053
+ result = this.parseData(data, layoutSummary);
1054
+ this.data = result.data;
1055
+ return this.meta = result.meta;
1056
+ };
1057
+ this.processConf = function(conf, defaultConf, meta, instance, utils) {
1058
+ var smartBorders;
1059
+ conf = circosJS.mixConf(conf, Object.assign({}, defaultConf));
1060
+ conf = utils.computeMinMax(conf, meta);
1061
+ if (conf.innerRadius === 0 && conf.outerRadius === 0) {
1062
+ smartBorders = instance.smartBorders();
1063
+ conf.innerRadius = smartBorders['in'];
1064
+ conf.outerRadius = smartBorders.out;
1065
+ }
1066
+ return conf;
1067
+ };
1068
+ this.applyRules = function(rules, data) {
1069
+ var datum, i, k, results, rule, v;
1070
+ rules = rules || [];
1071
+ results = [];
1072
+ for (k in data) {
1073
+ v = data[k];
1074
+ results.push((function() {
1075
+ var ref, results1;
1076
+ ref = v.values;
1077
+ results1 = [];
1078
+ for (i in ref) {
1079
+ datum = ref[i];
1080
+ results1.push((function() {
1081
+ var l, len, results2;
1082
+ results2 = [];
1083
+ for (l = 0, len = rules.length; l < len; l++) {
1084
+ rule = rules[l];
1085
+ if (rule.condition(v.key, datum, i)) {
1086
+ results2.push(datum[rule.parameter] = rule.value);
1087
+ } else {
1088
+ results2.push(void 0);
1089
+ }
1090
+ }
1091
+ return results2;
1092
+ })());
1093
+ }
1094
+ return results1;
1095
+ })());
1096
+ }
1097
+ return results;
1098
+ };
1099
+ this.computeMinMax = function(conf, meta) {
1100
+ conf.cmin = conf.min === 'smart' ? meta.min : conf.min;
1101
+ conf.cmax = conf.max === 'smart' ? meta.max : conf.max;
1102
+ return conf;
1103
+ };
1104
+ this.ratio = function(value, min, max, scope, reverse, logScale) {
1105
+ var fraction, scaleLogBase, x;
1106
+ scaleLogBase = logScale ? 2.3 : 1;
1107
+ if (min === max || (value === min && !reverse) || (value === max && reverse)) {
1108
+ return 0;
1109
+ }
1110
+ if (value === max || (value === min && reverse)) {
1111
+ return scope - 1;
1112
+ }
1113
+ fraction = (value - min) / (max - min);
1114
+ x = Math.exp(1 / scaleLogBase * Math.log(fraction));
1115
+ if (reverse) {
1116
+ x = 1 - x;
1117
+ }
1118
+ return Math.floor(scope * x);
1119
+ };
1120
+ this.render = (function(_this) {
1121
+ return function(instance, parentElement, name) {
1122
+ var datumContainer, ref, selection, track;
1123
+ parentElement.select('.' + name).remove();
1124
+ track = parentElement.append('g').attr('class', name).attr('z-index', _this.conf.zIndex);
1125
+ datumContainer = _this.renderDatumContainer(instance, track, name, _this.data, _this.conf);
1126
+ if ((ref = _this.conf.axes) != null ? ref.display : void 0) {
1127
+ _this.renderAxes(datumContainer, _this.conf, instance._layout, _this.data);
1128
+ }
1129
+ selection = _this.renderDatum(datumContainer, _this.conf, instance._layout, _this);
1130
+ if (_this.conf.tooltipContent != null) {
1131
+ circosJS.registerTooltip(instance, _this, selection, _this.conf);
1132
+ }
1133
+ selection.on('mouseover', function(d, i, j) {
1134
+ return _this.dispatch.mouseover(d, i, j);
1135
+ });
1136
+ return selection.on('mouseout', function(d, i, j) {
1137
+ return _this.dispatch.mouseout(d, i, j);
1138
+ });
1139
+ };
1140
+ })(this);
1141
+ this.renderBlock = function(parentElement, data, layout, conf) {
1142
+ var block, scope;
1143
+ scope = conf.outerRadius - conf.innerRadius;
1144
+ block = parentElement.selectAll('.block').data(data).enter().append('g').attr('class', 'block').attr('transform', function(d) {
1145
+ return 'rotate(' + layout.blocks[d.key].start * 360 / (2 * Math.PI) + ')';
1146
+ });
1147
+ if (conf.backgrounds) {
1148
+ block.selectAll('.background').data(conf.backgrounds).enter().append('path').attr('class', 'background').attr('fill', function(background) {
1149
+ return background.color;
1150
+ }).attr('opacity', function(background) {
1151
+ return background.opacity || 1;
1152
+ }).attr('d', d3.svg.arc().innerRadius(function(background) {
1153
+ if (conf.direction === 'in') {
1154
+ return conf.outerRadius - scope * background.start;
1155
+ } else {
1156
+ return conf.innerRadius + scope * background.start;
1157
+ }
1158
+ }).outerRadius(function(background) {
1159
+ if (conf.direction === 'in') {
1160
+ return conf.outerRadius - scope * background.end;
1161
+ } else {
1162
+ return conf.innerRadius + scope * background.end;
1163
+ }
1164
+ }).startAngle(function(d, i, j) {
1165
+ return 0;
1166
+ }).endAngle(function(d, i, j) {
1167
+ return layout.blocks[data[j].key].end - layout.blocks[data[j].key].start;
1168
+ }));
1169
+ }
1170
+ return block;
1171
+ };
1172
+ this.renderAxes = function(parentElement, conf, layout, data) {
1173
+ var axes, axis, x;
1174
+ if (conf.axes.minor.spacingType === 'pixel') {
1175
+ axes = (function() {
1176
+ var l, ref, ref1, ref2, results;
1177
+ results = [];
1178
+ for (x = l = ref = conf.innerRadius, ref1 = conf.outerRadius, ref2 = conf.axes.minor.spacing; ref2 > 0 ? l <= ref1 : l >= ref1; x = l += ref2) {
1179
+ results.push(x);
1180
+ }
1181
+ return results;
1182
+ })();
1183
+ }
1184
+ axis = d3.svg.arc().innerRadius(function(d) {
1185
+ return d;
1186
+ }).outerRadius(function(d) {
1187
+ return d;
1188
+ }).startAngle(0).endAngle(function(d, i, j) {
1189
+ var block;
1190
+ block = layout.blocks[data[j].key];
1191
+ return block.end - block.start;
1192
+ });
1193
+ return parentElement.selectAll('.axis').data(axes).enter().append('path').attr('opacity', conf.opacity).attr('class', 'axis').attr('d', axis).attr('stroke-width', function(d, i) {
1194
+ if (i % conf.axes.major.spacing === 0) {
1195
+ return conf.axes.major.thickness;
1196
+ } else {
1197
+ return conf.axes.minor.thickness;
1198
+ }
1199
+ }).attr('stroke', function(d, i) {
1200
+ if (i % conf.axes.major.spacing === 0) {
1201
+ return conf.axes.major.color;
1202
+ } else {
1203
+ return conf.axes.minor.color;
1204
+ }
1205
+ });
1206
+ };
1207
+ this.theta = function(position, block) {
1208
+ return position / block.len * (block.end - block.start);
1209
+ };
1210
+ this.x = (function(_this) {
1211
+ return function(d, layout, conf) {
1212
+ var angle, height, r;
1213
+ height = _this.ratio(d.value, conf.cmin, conf.cmax, conf.outerRadius - conf.innerRadius, false, conf.logscale);
1214
+ if (conf.direction === 'in') {
1215
+ r = conf.outerRadius - height;
1216
+ } else {
1217
+ r = conf.innerRadius + height;
1218
+ }
1219
+ angle = _this.theta(d.position, layout.blocks[d.block_id]) - Math.PI / 2;
1220
+ return r * Math.cos(angle);
1221
+ };
1222
+ })(this);
1223
+ this.y = (function(_this) {
1224
+ return function(d, layout, conf) {
1225
+ var angle, height, r;
1226
+ height = _this.ratio(d.value, conf.cmin, conf.cmax, conf.outerRadius - conf.innerRadius, false, conf.logscale);
1227
+ if (conf.direction === 'in') {
1228
+ r = conf.outerRadius - height;
1229
+ } else {
1230
+ r = conf.innerRadius + height;
1231
+ }
1232
+ angle = _this.theta(d.position, layout.blocks[d.block_id]) - Math.PI / 2;
1233
+ return r * Math.sin(angle);
1234
+ };
1235
+ })(this);
1236
+ this.ratio = function(value, min, max, scope, reverse, logScale) {
1237
+ var fraction, scaleLogBase, x;
1238
+ scaleLogBase = logScale ? 2.3 : 1;
1239
+ if (min === max || (value === min && !reverse) || (value === max && reverse)) {
1240
+ return 0;
1241
+ }
1242
+ if (value === max || (value === min && reverse)) {
1243
+ return scope - 1;
1244
+ }
1245
+ fraction = (value - min) / (max - min);
1246
+ x = Math.exp(1 / scaleLogBase * Math.log(fraction));
1247
+ if (reverse) {
1248
+ x = 1 - x;
1249
+ }
1250
+ return Math.floor(scope * x);
1251
+ };
1252
+ return this;
1253
+ };
1254
+
1255
+ circosJS.renderLayout = function(d3, parentElement, instance) {
1256
+ var block, conf, entry, layout;
1257
+ conf = instance._layout.conf;
1258
+ parentElement.select('.cs-layout').remove();
1259
+ layout = parentElement.append('g').attr('class', 'cs-layout').attr('z-index', conf.zIndex).on('click', conf.onClick);
1260
+ block = layout.selectAll('g').data(instance._layout.data).enter().append('g').attr('class', function(d) {
1261
+ return d.id;
1262
+ }).attr('opacity', conf.opacity);
1263
+ entry = d3.svg.arc().innerRadius(conf.innerRadius).outerRadius(conf.outerRadius).cornerRadius(conf.cornerRadius).startAngle(function(d) {
1264
+ return d.start;
1265
+ }).endAngle(function(d) {
1266
+ return d.end;
1267
+ });
1268
+ block.append('path').attr('d', entry).attr('fill', function(d) {
1269
+ return d.color;
1270
+ }).attr('id', function(d) {
1271
+ return d.id;
1272
+ });
1273
+ if (conf.labels.display) {
1274
+ circosJS.renderLayoutLabels(conf, d3, block);
1275
+ }
1276
+ if (conf.ticks.display) {
1277
+ return circosJS.renderLayoutTicks(conf, layout, d3, instance);
1278
+ }
1279
+ };
1280
+
1281
+ circosJS.renderLayoutLabels = function(conf, d3, block) {
1282
+ var label, labelArc, r;
1283
+ r = conf.innerRadius + conf.labels.radialOffset;
1284
+ labelArc = d3.svg.arc().innerRadius(r).outerRadius(r).startAngle(function(d, i) {
1285
+ return d.start;
1286
+ }).endAngle(function(d, i) {
1287
+ return d.end;
1288
+ });
1289
+ block.append('path').attr('fill', 'none').attr('stroke', 'none').attr('d', labelArc).attr('id', function(d) {
1290
+ return 'arc-label' + d.id;
1291
+ });
1292
+ label = block.append('text').attr('font-size', conf.labels.size).attr('text-anchor', 'middle');
1293
+ return label.append('textPath').attr('startOffset', '25%').attr('xlink:href', function(d) {
1294
+ return '#arc-label' + d.id;
1295
+ }).style('fill', conf.labels.color).text(function(d) {
1296
+ var arc_len = d.end - d.start;
1297
+ return d.label.slice(0, Math.floor(21 * arc_len)) + '..';
1298
+ });
1299
+ };
1300
+
1301
+ circosJS.renderLayoutTicks = function(conf, layout, d3, instance) {
1302
+ var blockTicks, displayLabel, ticks;
1303
+ blockTicks = function(d) {
1304
+ var k,space;
1305
+ k = (d.end - d.start) / d.len;
1306
+ if ((d.end - d.start) > 1.57) {
1307
+ space = 8;
1308
+ } else if ((d.end - d.start) > 0.785) {
1309
+ space = 4;
1310
+ } else if ((d.end - d.start) > 0.3925) {
1311
+ space = 2;
1312
+ } else if ((d.end - d.start) > 0) {
1313
+ space = 0;
1314
+ }
1315
+ var arr = [];
1316
+ var item = {angle: 0 * k + d.start, label: 0};
1317
+ arr.push(item);
1318
+ var temp_scale = d3.scale.linear()
1319
+ .domain([1, d.len])
1320
+ .range([d.start, d.end]);
1321
+ var len = temp_scale.ticks(space).length;
1322
+ temp_scale.ticks(space).map(function (v,i) {
1323
+ var init = v * k + d.start;
1324
+ var final = d.len * k +d.start;
1325
+ if ((final - init) > 0.5) {
1326
+ }
1327
+ var item = {
1328
+ angle: v * k + d.start,
1329
+ label: v / conf.ticks.labelDenominator + conf.ticks.labelSuffix
1330
+ };
1331
+ arr.push(item);
1332
+ });
1333
+ arr.splice(len, 1);
1334
+ var item = {
1335
+ angle: (d.len * k + d.start) - 0.006,
1336
+ label: d.len / conf.ticks.labelDenominator + conf.ticks.labelSuffix
1337
+ };
1338
+ arr.push(item);
1339
+ return arr;
1340
+ };
1341
+ displayLabel = function(v, i) {
1342
+ if (conf.ticks.labels === false) {
1343
+ return null;
1344
+ } else if (conf.ticks.labelDisplay0 === false && i === 0) {
1345
+ return null;
1346
+ } else if (i % conf.ticks.labelSpacing) {
1347
+ return null;
1348
+ } else if (i === 0) {
1349
+ return v / conf.ticks.labelDenominator; // added support for 0 without suffix.
1350
+ }
1351
+ else {
1352
+ return v / conf.ticks.labelDenominator + conf.ticks.labelSuffix;
1353
+ }
1354
+ };
1355
+ ticks = layout.append('g').selectAll('g').data(instance._layout.data).enter().append('g').selectAll('g').data(blockTicks).enter().append('g').attr('transform', function(d) {
1356
+ return 'rotate(' + (d.angle * 180 / Math.PI - 90) + ')' + 'translate(' + conf.outerRadius + ',0)';
1357
+ });
1358
+ ticks.append('line').attr('x1', 0).attr('y1', 1).attr('x2', function(d, i) {
1359
+ return conf.ticks.size.major;
1360
+ }).attr('y2', 1).style('stroke', conf.ticks.color);
1361
+ return ticks.append('text').attr('x', 8).attr('dy', '.35em').attr('transform', function(d) {
1362
+ if (d.angle > Math.PI) {
1363
+ return 'rotate(180)translate(-16)';
1364
+ } else {
1365
+ return null;
1366
+ }
1367
+ }).attr('text-anchor', function(d) {
1368
+ if (d.angle > Math.PI) {
1369
+ return 'end';
1370
+ } else {
1371
+ return null;
1372
+ }
1373
+ }).attr('font-size', conf.ticks.labelSize).style('fill', conf.ticks.labelColor).text(function(d) {
1374
+ return d.label;
1375
+ });
1376
+ };
1377
+
1378
+ circosJS.Core.prototype.render = function(ids, removeTracks) {
1379
+ var name, ref, ref1, renderAll, svg, track, trackStore, trackType, tracks, translated;
1380
+ if (typeof ids === 'undefined') {
1381
+ renderAll = true;
1382
+ ids = [];
1383
+ }
1384
+ if (removeTracks) {
1385
+ ref = this.tracks;
1386
+ for (trackType in ref) {
1387
+ trackStore = ref[trackType];
1388
+ for (name in trackStore) {
1389
+ track = trackStore[name];
1390
+ svg.select('.' + name).remove();
1391
+ }
1392
+ }
1393
+ }
1394
+ svg = d3.select(this.conf.container).attr('width', this.conf.width).attr('height', this.conf.height);
1395
+ translated = svg.select('.all');
1396
+ if (translated.empty()) {
1397
+ translated = svg.append('g').attr('class', 'all').attr('transform', 'translate(' + parseInt(this.conf.width / 2) + ',' + parseInt(this.conf.height / 2) + ')');
1398
+ }
1399
+ ref1 = this.tracks;
1400
+ for (trackType in ref1) {
1401
+ trackStore = ref1[trackType];
1402
+ for (name in trackStore) {
1403
+ track = trackStore[name];
1404
+ if (renderAll || indexOf.call(ids, name) >= 0) {
1405
+ track.render(this, translated, name);
1406
+ }
1407
+ }
1408
+ }
1409
+ if (renderAll || indexOf.call(ids, 'layout') >= 0) {
1410
+ circosJS.renderLayout(d3, translated, this);
1411
+ }
1412
+ tracks = svg.selectAll('.all > g').remove();
1413
+ tracks[0].sort(function(a, b) {
1414
+ if (parseInt(a.getAttribute('z-index')) < parseInt(b.getAttribute('z-index'))) {
1415
+ return -1;
1416
+ } else if (parseInt(a.getAttribute('z-index')) > parseInt(b.getAttribute('z-index'))) {
1417
+ return 1;
1418
+ } else {
1419
+ return 0;
1420
+ }
1421
+ });
1422
+ svg.select('.all').selectAll('g').data(tracks[0]).enter().append(function(d) {
1423
+ return d;
1424
+ });
1425
+ return this;
1426
+ };
1427
+
1428
+ circosJS.Core.prototype.defaultConf = {
1429
+ width: 700,
1430
+ height: 700,
1431
+ container: 'circos',
1432
+ defaultTrackWidth: 10
1433
+ };
1434
+
1435
+ circosJS.Layout.prototype.defaultConf = {
1436
+ innerRadius: 250,
1437
+ outerRadius: 300,
1438
+ cornerRadius: 5,
1439
+ gap: 0.04,
1440
+ opacity: 1,
1441
+ labels: {
1442
+ position: 'center',
1443
+ display: true,
1444
+ size: 14,
1445
+ color: '#000',
1446
+ radialOffset: 20
1447
+ },
1448
+ ticks: {
1449
+ display: true,
1450
+ color: 'grey',
1451
+ spacing: 10000000,
1452
+ labels: true,
1453
+ labelSpacing: 10,
1454
+ labelSuffix: 'Mb',
1455
+ labelDenominator: 1000000,
1456
+ labelDisplay0: true,
1457
+ labelSize: 10,
1458
+ labelColor: '#000',
1459
+ labelFont: 'default',
1460
+ majorSpacing: 5,
1461
+ size: {
1462
+ minor: 2,
1463
+ major: 5
1464
+ }
1465
+ },
1466
+ onClick: null,
1467
+ onMouseOver: null,
1468
+ zIndex: 100
1469
+ };
1470
+
1471
+ circosJS.axes = {
1472
+ display: false,
1473
+ minor: {
1474
+ spacing: 5,
1475
+ spacingType: 'pixel',
1476
+ color: '#d3d3d3',
1477
+ thickness: 2
1478
+ },
1479
+ major: {
1480
+ spacing: 5,
1481
+ color: '#000000',
1482
+ thickness: 2
1483
+ }
1484
+ };
1485
+
1486
+ circosJS.Heatmap.prototype.defaultConf = {
1487
+ innerRadius: 0,
1488
+ outerRadius: 0,
1489
+ min: 'smart',
1490
+ max: 'smart',
1491
+ colorPalette: 'YlGnBu',
1492
+ colorPaletteSize: 9,
1493
+ colorPaletteReverse: false,
1494
+ logScale: false,
1495
+ rules: [],
1496
+ backgrounds: [],
1497
+ zIndex: 1,
1498
+ opacity: 1,
1499
+ tooltipContent: null
1500
+ };
1501
+
1502
+ circosJS.Histogram.prototype.defaultConf = {
1503
+ innerRadius: 0,
1504
+ outerRadius: 0,
1505
+ min: 'smart',
1506
+ max: 'smart',
1507
+ direction: 'out',
1508
+ colorPaletteSize: 9,
1509
+ colorPalette: 'YlGnBu',
1510
+ usePalette: true,
1511
+ colorPaletteReverse: false,
1512
+ color: '#fd6a62',
1513
+ logScale: false,
1514
+ axes: circosJS.axes,
1515
+ rules: [],
1516
+ backgrounds: [],
1517
+ zIndex: 1,
1518
+ opacity: 1,
1519
+ tooltipContent: null
1520
+ };
1521
+
1522
+ circosJS.Chord.prototype.defaultConf = {
1523
+ colorPaletteSize: 9,
1524
+ colorPalette: 'PuBuGn',
1525
+ usePalette: true,
1526
+ colorPaletteReverse: false,
1527
+ color: '#fd6a62',
1528
+ opacity: 0.7,
1529
+ min: 'smart',
1530
+ max: 'smart',
1531
+ logScale: false,
1532
+ rules: [],
1533
+ backgrounds: [],
1534
+ zIndex: 1,
1535
+ tooltipContent: null
1536
+ };
1537
+
1538
+ circosJS.Scatter.prototype.defaultConf = {
1539
+ innerRadius: 0,
1540
+ outerRadius: 0,
1541
+ min: 'smart',
1542
+ max: 'smart',
1543
+ direction: 'out',
1544
+ logScale: false,
1545
+ glyph: {
1546
+ color: '#fd6a62',
1547
+ fill: true,
1548
+ size: 15,
1549
+ shape: 'circle',
1550
+ strokeColor: '#d3d3d3',
1551
+ strokeWidth: 2
1552
+ },
1553
+ axes: circosJS.axes,
1554
+ rules: [],
1555
+ backgrounds: [],
1556
+ zIndex: 1,
1557
+ opacity: 1,
1558
+ tooltipContent: null
1559
+ };
1560
+
1561
+ circosJS.Line.prototype.defaultConf = {
1562
+ innerRadius: 0,
1563
+ outerRadius: 0,
1564
+ min: 'smart',
1565
+ max: 'smart',
1566
+ direction: 'out',
1567
+ logScale: false,
1568
+ color: '#fd6a62',
1569
+ fill: true,
1570
+ fill_color: '#d3d3d3',
1571
+ thickness: 2,
1572
+ max_gap: 10000000,
1573
+ interpolation: 'linear',
1574
+ axes: circosJS.axes,
1575
+ rules: [],
1576
+ backgrounds: [],
1577
+ zIndex: 1,
1578
+ opacity: 1,
1579
+ tooltipContent: null
1580
+ };
1581
+
1582
+ circosJS.Stack.prototype.defaultConf = {
1583
+ innerRadius: 0,
1584
+ outerRadius: 0,
1585
+ colorPaletteSize: 9,
1586
+ colorPalette: 'PuBuGn',
1587
+ usePalette: true,
1588
+ colorPaletteReverse: false,
1589
+ color: '#fd6a62',
1590
+ min: 'smart',
1591
+ max: 'smart',
1592
+ direction: 'out',
1593
+ logScale: false,
1594
+ color: '#fd6a62',
1595
+ thickness: 10,
1596
+ radialMargin: 2,
1597
+ margin: 2,
1598
+ strokeWidth: 1,
1599
+ strokeColor: '#000000',
1600
+ axes: circosJS.axes,
1601
+ rules: [],
1602
+ backgrounds: [],
1603
+ zIndex: 1,
1604
+ opacity: 1,
1605
+ tooltipContent: null
1606
+ };
1607
+
1608
+ circosJS.Highlight.prototype.defaultConf = {
1609
+ innerRadius: 0,
1610
+ outerRadius: 0,
1611
+ defaultColor: '#fd6a62',
1612
+ opacity: 0.5,
1613
+ rules: [],
1614
+ zIndex: 101,
1615
+ strokeColor: '#d3d3d3',
1616
+ strokeWidth: 0,
1617
+ tooltipContent: null
1618
+ };
1619
+
1620
+ circosJS.Text.prototype.defaultConf = {
1621
+ innerRadius: 0,
1622
+ outerRadius: 0,
1623
+ rules: [],
1624
+ backgrounds: [],
1625
+ zIndex: 1,
1626
+ style: {},
1627
+ tooltipContent: null
1628
+ };
1629
+
1630
+ circosJS.registerTooltip = function(instance, track, element, trackParams) {
1631
+ track.tip = d3.tip().direction('s').offset([20, 0]).html(trackParams.tooltipContent);
1632
+ element.call(track.tip);
1633
+ track.dispatch.on('mouseover', function(d, i, j) {
1634
+ return track.tip.attr('class', 'd3-tip appear').show(d);
1635
+ });
1636
+ return track.dispatch.on('mouseout', function(d, i, j) {
1637
+ track.tip.attr('class', 'd3-tip').show(d);
1638
+ return track.tip.hide();
1639
+ });
1640
+ };