diff --git a/public/js/form.js b/public/js/form.js
index 3ceea51f9..95e35aa9a 100644
--- a/public/js/form.js
+++ b/public/js/form.js
@@ -156,16 +156,17 @@ export class Form extends Component {
}
handleAlgoChanged(algo) {
- if (this.state.preDefinedOpts.hasOwnProperty(algo)) {
+ if (algo in this.state.preDefinedOpts) {
var preDefinedOpts = this.state.preDefinedOpts[algo];
this.refs.opts.setState({
+ method: algo,
preOpts: preDefinedOpts,
value: (preDefinedOpts['last search'] ||
preDefinedOpts['default']).join(' ')
});
}
else {
- this.refs.opts.setState({ preOpts: {}, value: '' });
+ this.refs.opts.setState({ preOpts: {}, value: '', method: '' });
}
}
diff --git a/public/js/options.js b/public/js/options.js
index d18b62eb9..c78f2cb17 100644
--- a/public/js/options.js
+++ b/public/js/options.js
@@ -3,9 +3,10 @@ import React, { Component } from 'react';
export class Options extends Component {
constructor(props) {
super(props);
- this.state = { preOpts: {}, value: '' };
+ this.state = { preOpts: {}, value: '', method: '' };
this.updateBox = this.updateBox.bind(this);
this.optionsJSX = this.optionsJSX.bind(this);
+ this.showAdvancedOptions = this.showAdvancedOptions.bind(this);
}
updateBox(value) {
@@ -37,7 +38,14 @@ export class Options extends Component {
;
}
-
+ showAdvancedOptions(e) {
+ const ids = ['blastn', 'tblastn', 'blastp', 'blastx', 'tblastx'];
+ const method = this.state.method.toLowerCase();
+ // hide options for other algorithms and only show for selected algorithm
+ for (const id of ids) {
+ $(`#${id}`)[id === method ? 'show' : 'hide']();
+ }
+ }
render() {
var classNames = 'form-control';
if (this.state.value.trim()) {
@@ -50,12 +58,14 @@ export class Options extends Component {
this.updateBox(e.target.value)}
diff --git a/public/sequenceserver-search.min.js b/public/sequenceserver-search.min.js
index 8d6f874e2..7b2efa11b 100644
--- a/public/sequenceserver-search.min.js
+++ b/public/sequenceserver-search.min.js
@@ -60,7 +60,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Form\": () => (/* binding */ Form)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _search_button__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./search_button */ \"./public/js/search_button.js\");\n/* harmony import */ var _query__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./query */ \"./public/js/query.js\");\n/* harmony import */ var _databases_tree__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./databases_tree */ \"./public/js/databases_tree.js\");\n/* harmony import */ var _databases__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./databases */ \"./public/js/databases.js\");\n/* harmony import */ var underscore__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\");\n/* harmony import */ var _options__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./options */ \"./public/js/options.js\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* provided dependency */ var $ = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\n\n\n\n/**\n * Search form.\n *\n * Top level component that initialises and holds all other components, and\n * facilitates communication between them.\n */\n\n\n\nvar Form = /*#__PURE__*/function (_Component) {\n _inherits(Form, _Component);\n\n var _super = _createSuper(Form);\n\n function Form(props) {\n var _this;\n\n _classCallCheck(this, Form);\n\n _this = _super.call(this, props);\n _this.state = {\n databases: [],\n preDefinedOpts: {},\n tree: {}\n };\n _this.useTreeWidget = _this.useTreeWidget.bind(_assertThisInitialized(_this));\n _this.determineBlastMethod = _this.determineBlastMethod.bind(_assertThisInitialized(_this));\n _this.handleSequenceTypeChanged = _this.handleSequenceTypeChanged.bind(_assertThisInitialized(_this));\n _this.handleDatabaseTypeChanaged = _this.handleDatabaseTypeChanaged.bind(_assertThisInitialized(_this));\n _this.handleAlgoChanged = _this.handleAlgoChanged.bind(_assertThisInitialized(_this));\n _this.handleFormSubmission = _this.handleFormSubmission.bind(_assertThisInitialized(_this));\n _this.formRef = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createRef)();\n return _this;\n }\n\n _createClass(Form, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n /** \n * Fetch data to initialise the search interface from the server. These\n * include list of databases to search against, advanced options to\n * apply when an algorithm is selected, and a query sequence that\n * the user may want to search in the databases.\n */\n var search = location.search.split(/\\?|&/).filter(Boolean);\n var job_id = sessionStorage.getItem('job_id');\n\n if (job_id) {\n search.unshift(\"job_id=\".concat(job_id));\n }\n\n $.getJSON(\"searchdata.json?\".concat(search.join('&')), function (data) {\n /* Update form state (i.e., list of databases and predefined\n * advanced options.\n */\n this.setState({\n tree: data['tree'],\n databases: data['database'],\n preSelectedDbs: data['preSelectedDbs'],\n preDefinedOpts: data['options']\n });\n /* Pre-populate the form with server sent query sequences\n * (if any).\n */\n\n if (data['query']) {\n this.refs.query.value(data['query']);\n }\n\n setTimeout(function () {\n $('.jstree_div').click();\n }, 1000);\n }.bind(this));\n /* Enable submitting form on Cmd+Enter */\n\n $(document).on('keydown', function (e) {\n var $button = $('#method');\n\n if (!$button.is(':disabled') && e.ctrlKey && e.key === 'Enter') {\n $button.trigger('click');\n }\n }); // show overlay to create visual feedback on button click \n\n $('#method').on('click', function () {\n $('#overlay').css('display', 'block');\n });\n }\n }, {\n key: \"useTreeWidget\",\n value: function useTreeWidget() {\n return !underscore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].isEmpty(this.state.tree);\n }\n }, {\n key: \"handleFormSubmission\",\n value: function handleFormSubmission(evt) {\n evt.preventDefault();\n var form = this.formRef.current;\n var formData = new FormData(form);\n formData.append('method', this.refs.button.state.methods[0]);\n fetch(window.location.href, {\n method: 'POST',\n body: formData\n }).then(function (res) {\n //remove overlay when form is submitted\n $('#overlay').css('display', 'none'); // redirect\n\n if (res.redirected && res.url) {\n // setTimeout is needed here as a workaround because safari doesnt allow async calling of window.open\n // so setTimeout makes the method get called on the main thread.\n setTimeout(function () {\n window.open(res.url, $('#toggleNewTab').is(':checked') ? '_blank' : '_self');\n }, 0);\n }\n });\n }\n }, {\n key: \"determineBlastMethod\",\n value: function determineBlastMethod() {\n var database_type = this.databaseType;\n var sequence_type = this.sequenceType;\n\n if (this.refs.query.isEmpty()) {\n return [];\n } //database type is always known\n\n\n switch (database_type) {\n case 'protein':\n switch (sequence_type) {\n case undefined:\n return ['blastp', 'blastx'];\n\n case 'protein':\n return ['blastp'];\n\n case 'nucleotide':\n return ['blastx'];\n }\n\n break;\n\n case 'nucleotide':\n switch (sequence_type) {\n case undefined:\n return ['tblastn', 'blastn', 'tblastx'];\n\n case 'protein':\n return ['tblastn'];\n\n case 'nucleotide':\n return ['blastn', 'tblastx'];\n }\n\n break;\n }\n\n return [];\n }\n }, {\n key: \"handleSequenceTypeChanged\",\n value: function handleSequenceTypeChanged(type) {\n this.sequenceType = type;\n this.refs.button.setState({\n hasQuery: !this.refs.query.isEmpty(),\n hasDatabases: !!this.databaseType,\n methods: this.determineBlastMethod()\n });\n }\n }, {\n key: \"handleDatabaseTypeChanaged\",\n value: function handleDatabaseTypeChanaged(type) {\n this.databaseType = type;\n this.refs.button.setState({\n hasQuery: !this.refs.query.isEmpty(),\n hasDatabases: !!this.databaseType,\n methods: this.determineBlastMethod()\n });\n }\n }, {\n key: \"handleAlgoChanged\",\n value: function handleAlgoChanged(algo) {\n if (this.state.preDefinedOpts.hasOwnProperty(algo)) {\n var preDefinedOpts = this.state.preDefinedOpts[algo];\n this.refs.opts.setState({\n preOpts: preDefinedOpts,\n value: (preDefinedOpts['last search'] || preDefinedOpts['default']).join(' ')\n });\n } else {\n this.refs.opts.setState({\n preOpts: {},\n value: ''\n });\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(\"div\", {\n className: \"container\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"div\", {\n id: \"overlay\",\n style: {\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100vw',\n height: '100vw',\n background: 'rgba(0, 0, 0, 0.2)',\n display: 'none',\n zIndex: 99\n }\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(\"form\", {\n id: \"blast\",\n ref: this.formRef,\n onSubmit: this.handleFormSubmission,\n className: \"form-horizontal\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"div\", {\n className: \"form-group query-container\",\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_query__WEBPACK_IMPORTED_MODULE_2__.SearchQueryWidget, {\n ref: \"query\",\n onSequenceTypeChanged: this.handleSequenceTypeChanged\n })\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(\"div\", {\n className: \"notifications\",\n id: \"notifications\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(NucleotideNotification, {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(ProteinNotification, {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(MixedNotification, {})]\n }), this.useTreeWidget() ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_databases_tree__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n ref: \"databases\",\n databases: this.state.databases,\n tree: this.state.tree,\n preSelectedDbs: this.state.preSelectedDbs,\n onDatabaseTypeChanged: this.handleDatabaseTypeChanaged\n }) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_databases__WEBPACK_IMPORTED_MODULE_4__.Databases, {\n ref: \"databases\",\n databases: this.state.databases,\n preSelectedDbs: this.state.preSelectedDbs,\n onDatabaseTypeChanged: this.handleDatabaseTypeChanaged\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(\"div\", {\n className: \"form-group\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_options__WEBPACK_IMPORTED_MODULE_6__.Options, {\n ref: \"opts\"\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"div\", {\n className: \"col-md-2\",\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"div\", {\n className: \"form-group\",\n style: {\n 'textAlign': 'center',\n 'padding': '7px 0'\n },\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(\"label\", {\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"input\", {\n type: \"checkbox\",\n id: \"toggleNewTab\"\n }), \" Open results in new tab\"]\n })\n })\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_search_button__WEBPACK_IMPORTED_MODULE_1__.SearchButton, {\n ref: \"button\",\n onAlgoChanged: this.handleAlgoChanged\n })]\n })]\n })]\n });\n }\n }]);\n\n return Form;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\nvar ProteinNotification = /*#__PURE__*/function (_Component2) {\n _inherits(ProteinNotification, _Component2);\n\n var _super2 = _createSuper(ProteinNotification);\n\n function ProteinNotification() {\n _classCallCheck(this, ProteinNotification);\n\n return _super2.apply(this, arguments);\n }\n\n _createClass(ProteinNotification, [{\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"div\", {\n className: \"notification row\",\n id: \"protein-sequence-notification\",\n style: {\n display: 'none'\n },\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"div\", {\n className: \"alert-info col-md-6 col-md-offset-3\",\n children: \"Detected: amino-acid sequence(s).\"\n })\n });\n }\n }]);\n\n return ProteinNotification;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\nvar NucleotideNotification = /*#__PURE__*/function (_Component3) {\n _inherits(NucleotideNotification, _Component3);\n\n var _super3 = _createSuper(NucleotideNotification);\n\n function NucleotideNotification() {\n _classCallCheck(this, NucleotideNotification);\n\n return _super3.apply(this, arguments);\n }\n\n _createClass(NucleotideNotification, [{\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"div\", {\n className: \"notification row\",\n id: \"nucleotide-sequence-notification\",\n style: {\n display: 'none'\n },\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"div\", {\n className: \"alert-info col-md-6 col-md-offset-3\",\n children: \"Detected: nucleotide sequence(s).\"\n })\n });\n }\n }]);\n\n return NucleotideNotification;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\nvar MixedNotification = /*#__PURE__*/function (_Component4) {\n _inherits(MixedNotification, _Component4);\n\n var _super4 = _createSuper(MixedNotification);\n\n function MixedNotification() {\n _classCallCheck(this, MixedNotification);\n\n return _super4.apply(this, arguments);\n }\n\n _createClass(MixedNotification, [{\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"div\", {\n className: \"notification row\",\n id: \"mixed-sequence-notification\",\n style: {\n display: 'none'\n },\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"div\", {\n className: \"alert-danger col-md-10 col-md-offset-1\",\n children: \"Error: mixed nucleotide and amino-acid sequences detected.\"\n })\n });\n }\n }]);\n\n return MixedNotification;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\n//# sourceURL=webpack://SequenceServer/./public/js/form.js?");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Form\": () => (/* binding */ Form)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _search_button__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./search_button */ \"./public/js/search_button.js\");\n/* harmony import */ var _query__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./query */ \"./public/js/query.js\");\n/* harmony import */ var _databases_tree__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./databases_tree */ \"./public/js/databases_tree.js\");\n/* harmony import */ var _databases__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./databases */ \"./public/js/databases.js\");\n/* harmony import */ var underscore__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\");\n/* harmony import */ var _options__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./options */ \"./public/js/options.js\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* provided dependency */ var $ = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\n\n\n\n/**\n * Search form.\n *\n * Top level component that initialises and holds all other components, and\n * facilitates communication between them.\n */\n\n\n\nvar Form = /*#__PURE__*/function (_Component) {\n _inherits(Form, _Component);\n\n var _super = _createSuper(Form);\n\n function Form(props) {\n var _this;\n\n _classCallCheck(this, Form);\n\n _this = _super.call(this, props);\n _this.state = {\n databases: [],\n preDefinedOpts: {},\n tree: {}\n };\n _this.useTreeWidget = _this.useTreeWidget.bind(_assertThisInitialized(_this));\n _this.determineBlastMethod = _this.determineBlastMethod.bind(_assertThisInitialized(_this));\n _this.handleSequenceTypeChanged = _this.handleSequenceTypeChanged.bind(_assertThisInitialized(_this));\n _this.handleDatabaseTypeChanaged = _this.handleDatabaseTypeChanaged.bind(_assertThisInitialized(_this));\n _this.handleAlgoChanged = _this.handleAlgoChanged.bind(_assertThisInitialized(_this));\n _this.handleFormSubmission = _this.handleFormSubmission.bind(_assertThisInitialized(_this));\n _this.formRef = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createRef)();\n return _this;\n }\n\n _createClass(Form, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n /** \n * Fetch data to initialise the search interface from the server. These\n * include list of databases to search against, advanced options to\n * apply when an algorithm is selected, and a query sequence that\n * the user may want to search in the databases.\n */\n var search = location.search.split(/\\?|&/).filter(Boolean);\n var job_id = sessionStorage.getItem('job_id');\n\n if (job_id) {\n search.unshift(\"job_id=\".concat(job_id));\n }\n\n $.getJSON(\"searchdata.json?\".concat(search.join('&')), function (data) {\n /* Update form state (i.e., list of databases and predefined\n * advanced options.\n */\n this.setState({\n tree: data['tree'],\n databases: data['database'],\n preSelectedDbs: data['preSelectedDbs'],\n preDefinedOpts: data['options']\n });\n /* Pre-populate the form with server sent query sequences\n * (if any).\n */\n\n if (data['query']) {\n this.refs.query.value(data['query']);\n }\n\n setTimeout(function () {\n $('.jstree_div').click();\n }, 1000);\n }.bind(this));\n /* Enable submitting form on Cmd+Enter */\n\n $(document).on('keydown', function (e) {\n var $button = $('#method');\n\n if (!$button.is(':disabled') && e.ctrlKey && e.key === 'Enter') {\n $button.trigger('click');\n }\n }); // show overlay to create visual feedback on button click \n\n $('#method').on('click', function () {\n $('#overlay').css('display', 'block');\n });\n }\n }, {\n key: \"useTreeWidget\",\n value: function useTreeWidget() {\n return !underscore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].isEmpty(this.state.tree);\n }\n }, {\n key: \"handleFormSubmission\",\n value: function handleFormSubmission(evt) {\n evt.preventDefault();\n var form = this.formRef.current;\n var formData = new FormData(form);\n formData.append('method', this.refs.button.state.methods[0]);\n fetch(window.location.href, {\n method: 'POST',\n body: formData\n }).then(function (res) {\n //remove overlay when form is submitted\n $('#overlay').css('display', 'none'); // redirect\n\n if (res.redirected && res.url) {\n // setTimeout is needed here as a workaround because safari doesnt allow async calling of window.open\n // so setTimeout makes the method get called on the main thread.\n setTimeout(function () {\n window.open(res.url, $('#toggleNewTab').is(':checked') ? '_blank' : '_self');\n }, 0);\n }\n });\n }\n }, {\n key: \"determineBlastMethod\",\n value: function determineBlastMethod() {\n var database_type = this.databaseType;\n var sequence_type = this.sequenceType;\n\n if (this.refs.query.isEmpty()) {\n return [];\n } //database type is always known\n\n\n switch (database_type) {\n case 'protein':\n switch (sequence_type) {\n case undefined:\n return ['blastp', 'blastx'];\n\n case 'protein':\n return ['blastp'];\n\n case 'nucleotide':\n return ['blastx'];\n }\n\n break;\n\n case 'nucleotide':\n switch (sequence_type) {\n case undefined:\n return ['tblastn', 'blastn', 'tblastx'];\n\n case 'protein':\n return ['tblastn'];\n\n case 'nucleotide':\n return ['blastn', 'tblastx'];\n }\n\n break;\n }\n\n return [];\n }\n }, {\n key: \"handleSequenceTypeChanged\",\n value: function handleSequenceTypeChanged(type) {\n this.sequenceType = type;\n this.refs.button.setState({\n hasQuery: !this.refs.query.isEmpty(),\n hasDatabases: !!this.databaseType,\n methods: this.determineBlastMethod()\n });\n }\n }, {\n key: \"handleDatabaseTypeChanaged\",\n value: function handleDatabaseTypeChanaged(type) {\n this.databaseType = type;\n this.refs.button.setState({\n hasQuery: !this.refs.query.isEmpty(),\n hasDatabases: !!this.databaseType,\n methods: this.determineBlastMethod()\n });\n }\n }, {\n key: \"handleAlgoChanged\",\n value: function handleAlgoChanged(algo) {\n if (algo in this.state.preDefinedOpts) {\n var preDefinedOpts = this.state.preDefinedOpts[algo];\n this.refs.opts.setState({\n method: algo,\n preOpts: preDefinedOpts,\n value: (preDefinedOpts['last search'] || preDefinedOpts['default']).join(' ')\n });\n } else {\n this.refs.opts.setState({\n preOpts: {},\n value: '',\n method: ''\n });\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(\"div\", {\n className: \"container\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"div\", {\n id: \"overlay\",\n style: {\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100vw',\n height: '100vw',\n background: 'rgba(0, 0, 0, 0.2)',\n display: 'none',\n zIndex: 99\n }\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(\"form\", {\n id: \"blast\",\n ref: this.formRef,\n onSubmit: this.handleFormSubmission,\n className: \"form-horizontal\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"div\", {\n className: \"form-group query-container\",\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_query__WEBPACK_IMPORTED_MODULE_2__.SearchQueryWidget, {\n ref: \"query\",\n onSequenceTypeChanged: this.handleSequenceTypeChanged\n })\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(\"div\", {\n className: \"notifications\",\n id: \"notifications\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(NucleotideNotification, {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(ProteinNotification, {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(MixedNotification, {})]\n }), this.useTreeWidget() ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_databases_tree__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n ref: \"databases\",\n databases: this.state.databases,\n tree: this.state.tree,\n preSelectedDbs: this.state.preSelectedDbs,\n onDatabaseTypeChanged: this.handleDatabaseTypeChanaged\n }) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_databases__WEBPACK_IMPORTED_MODULE_4__.Databases, {\n ref: \"databases\",\n databases: this.state.databases,\n preSelectedDbs: this.state.preSelectedDbs,\n onDatabaseTypeChanged: this.handleDatabaseTypeChanaged\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(\"div\", {\n className: \"form-group\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_options__WEBPACK_IMPORTED_MODULE_6__.Options, {\n ref: \"opts\"\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"div\", {\n className: \"col-md-2\",\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"div\", {\n className: \"form-group\",\n style: {\n 'textAlign': 'center',\n 'padding': '7px 0'\n },\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(\"label\", {\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"input\", {\n type: \"checkbox\",\n id: \"toggleNewTab\"\n }), \" Open results in new tab\"]\n })\n })\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_search_button__WEBPACK_IMPORTED_MODULE_1__.SearchButton, {\n ref: \"button\",\n onAlgoChanged: this.handleAlgoChanged\n })]\n })]\n })]\n });\n }\n }]);\n\n return Form;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\nvar ProteinNotification = /*#__PURE__*/function (_Component2) {\n _inherits(ProteinNotification, _Component2);\n\n var _super2 = _createSuper(ProteinNotification);\n\n function ProteinNotification() {\n _classCallCheck(this, ProteinNotification);\n\n return _super2.apply(this, arguments);\n }\n\n _createClass(ProteinNotification, [{\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"div\", {\n className: \"notification row\",\n id: \"protein-sequence-notification\",\n style: {\n display: 'none'\n },\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"div\", {\n className: \"alert-info col-md-6 col-md-offset-3\",\n children: \"Detected: amino-acid sequence(s).\"\n })\n });\n }\n }]);\n\n return ProteinNotification;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\nvar NucleotideNotification = /*#__PURE__*/function (_Component3) {\n _inherits(NucleotideNotification, _Component3);\n\n var _super3 = _createSuper(NucleotideNotification);\n\n function NucleotideNotification() {\n _classCallCheck(this, NucleotideNotification);\n\n return _super3.apply(this, arguments);\n }\n\n _createClass(NucleotideNotification, [{\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"div\", {\n className: \"notification row\",\n id: \"nucleotide-sequence-notification\",\n style: {\n display: 'none'\n },\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"div\", {\n className: \"alert-info col-md-6 col-md-offset-3\",\n children: \"Detected: nucleotide sequence(s).\"\n })\n });\n }\n }]);\n\n return NucleotideNotification;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\nvar MixedNotification = /*#__PURE__*/function (_Component4) {\n _inherits(MixedNotification, _Component4);\n\n var _super4 = _createSuper(MixedNotification);\n\n function MixedNotification() {\n _classCallCheck(this, MixedNotification);\n\n return _super4.apply(this, arguments);\n }\n\n _createClass(MixedNotification, [{\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"div\", {\n className: \"notification row\",\n id: \"mixed-sequence-notification\",\n style: {\n display: 'none'\n },\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"div\", {\n className: \"alert-danger col-md-10 col-md-offset-1\",\n children: \"Error: mixed nucleotide and amino-acid sequences detected.\"\n })\n });\n }\n }]);\n\n return MixedNotification;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\n//# sourceURL=webpack://SequenceServer/./public/js/form.js?");
/***/ }),
@@ -115,7 +115,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Options\": () => (/* binding */ Options)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n // Component for the advanced params input field.\n\n\n\nvar Options = /*#__PURE__*/function (_Component) {\n _inherits(Options, _Component);\n\n var _super = _createSuper(Options);\n\n function Options(props) {\n var _this;\n\n _classCallCheck(this, Options);\n\n _this = _super.call(this, props);\n _this.state = {\n preOpts: {},\n value: ''\n };\n _this.updateBox = _this.updateBox.bind(_assertThisInitialized(_this));\n _this.optionsJSX = _this.optionsJSX.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Options, [{\n key: \"updateBox\",\n value: function updateBox(value) {\n this.setState({\n value: value\n });\n }\n }, {\n key: \"optionsJSX\",\n value: function optionsJSX() {\n var _this2 = this;\n\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(\"span\", {\n className: \"input-group-btn dropdown\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\"button\", {\n className: \"btn bnt-sm btn-default dropdown-toggle\",\n \"data-toggle\": \"dropdown\",\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\"i\", {\n className: \"fa fa-caret-down\"\n })\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\"ul\", {\n id: \"advanced-params-dropdown\",\n className: \"dropdown-menu dropdown-menu-right\",\n children: Object.entries(this.state.preOpts).map(function (_ref, index) {\n var _ref2 = _slicedToArray(_ref, 2),\n key = _ref2[0],\n value = _ref2[1];\n\n value = value.join(' ');\n if (value.trim() === _this2.state.value.trim()) var className = 'yellow-background';\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(\"li\", {\n className: className,\n onClick: function onClick() {\n return _this2.updateBox(value);\n },\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(\"strong\", {\n children: [key, \":\"]\n }), \"\\xA0\", value]\n }, index);\n })\n })]\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n\n var classNames = 'form-control';\n\n if (this.state.value.trim()) {\n classNames += ' yellow-background';\n }\n\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\"div\", {\n className: \"col-md-7\",\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\"div\", {\n className: \"form-group\",\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\"div\", {\n className: \"col-md-12\",\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(\"div\", {\n className: \"input-group\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(\"label\", {\n className: \"control-label\",\n htmlFor: \"advanced\",\n children: [\"Advanced parameters:\", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\"sup\", {\n style: {\n marginLeft: '2px'\n },\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\"a\", {\n href: \"\",\n \"data-toggle\": \"modal\",\n \"data-target\": \"#help\",\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\"i\", {\n className: \"fa fa-question-circle\"\n })\n })\n })]\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\"input\", {\n type: \"text\",\n className: classNames,\n onChange: function onChange(e) {\n return _this3.updateBox(e.target.value);\n },\n id: \"advanced\",\n name: \"advanced\",\n value: this.state.value,\n placeholder: \"eg: -evalue 1.0e-5 -num_alignments 100\",\n title: \"View, and enter advanced parameters.\"\n }), Object.keys(this.state.preOpts).length > 1 && this.optionsJSX()]\n })\n })\n })\n });\n }\n }]);\n\n return Options;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\n//# sourceURL=webpack://SequenceServer/./public/js/options.js?");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Options\": () => (/* binding */ Options)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* provided dependency */ var $ = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n // Component for the advanced params input field.\n\n\n\nvar Options = /*#__PURE__*/function (_Component) {\n _inherits(Options, _Component);\n\n var _super = _createSuper(Options);\n\n function Options(props) {\n var _this;\n\n _classCallCheck(this, Options);\n\n _this = _super.call(this, props);\n _this.state = {\n preOpts: {},\n value: '',\n method: ''\n };\n _this.updateBox = _this.updateBox.bind(_assertThisInitialized(_this));\n _this.optionsJSX = _this.optionsJSX.bind(_assertThisInitialized(_this));\n _this.showAdvancedOptions = _this.showAdvancedOptions.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Options, [{\n key: \"updateBox\",\n value: function updateBox(value) {\n this.setState({\n value: value\n });\n }\n }, {\n key: \"optionsJSX\",\n value: function optionsJSX() {\n var _this2 = this;\n\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(\"span\", {\n className: \"input-group-btn dropdown\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\"button\", {\n className: \"btn bnt-sm btn-default dropdown-toggle\",\n \"data-toggle\": \"dropdown\",\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\"i\", {\n className: \"fa fa-caret-down\"\n })\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\"ul\", {\n id: \"advanced-params-dropdown\",\n className: \"dropdown-menu dropdown-menu-right\",\n children: Object.entries(this.state.preOpts).map(function (_ref, index) {\n var _ref2 = _slicedToArray(_ref, 2),\n key = _ref2[0],\n value = _ref2[1];\n\n value = value.join(' ');\n if (value.trim() === _this2.state.value.trim()) var className = 'yellow-background';\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(\"li\", {\n className: className,\n onClick: function onClick() {\n return _this2.updateBox(value);\n },\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(\"strong\", {\n children: [key, \":\"]\n }), \"\\xA0\", value]\n }, index);\n })\n })]\n });\n }\n }, {\n key: \"showAdvancedOptions\",\n value: function showAdvancedOptions(e) {\n var ids = ['blastn', 'tblastn', 'blastp', 'blastx', 'tblastx'];\n var method = this.state.method.toLowerCase(); // hide options for other algorithms and only show for selected algorithm\n\n for (var _i2 = 0, _ids = ids; _i2 < _ids.length; _i2++) {\n var id = _ids[_i2];\n $(\"#\".concat(id))[id === method ? 'show' : 'hide']();\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n\n var classNames = 'form-control';\n\n if (this.state.value.trim()) {\n classNames += ' yellow-background';\n }\n\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\"div\", {\n className: \"col-md-7\",\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\"div\", {\n className: \"form-group\",\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\"div\", {\n className: \"col-md-12\",\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(\"div\", {\n className: \"input-group\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(\"label\", {\n className: \"control-label\",\n htmlFor: \"advanced\",\n children: [\"Advanced parameters:\", this.state.method && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\"sup\", {\n style: {\n marginLeft: '2px'\n },\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\"a\", {\n href: \"\",\n onClick: this.showAdvancedOptions,\n \"data-toggle\": \"modal\",\n \"data-target\": \"#help\",\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\"i\", {\n className: \"fa fa-question-circle\"\n })\n })\n })]\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\"input\", {\n type: \"text\",\n className: classNames,\n onChange: function onChange(e) {\n return _this3.updateBox(e.target.value);\n },\n id: \"advanced\",\n name: \"advanced\",\n value: this.state.value,\n placeholder: \"eg: -evalue 1.0e-5 -num_alignments 100\",\n title: \"View, and enter advanced parameters.\"\n }), Object.keys(this.state.preOpts).length > 1 && this.optionsJSX()]\n })\n })\n })\n });\n }\n }]);\n\n return Options;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\n//# sourceURL=webpack://SequenceServer/./public/js/options.js?");
/***/ }),
diff --git a/views/_options.erb b/views/_options.erb
deleted file mode 100644
index 06357df0c..000000000
--- a/views/_options.erb
+++ /dev/null
@@ -1,156 +0,0 @@
-<%#
-
- NOTE: The markup below is displayed in a modal window. Use less than 70
- characters per line to preserve formatting.
-%>
-
-
General Search Options
-
-
-
<%= ERB::Util.h %q|-task
- Task to execute for the selected BLAST algorithm
- Options for BLASTN:
- 'blastn' Traditional BLASTN requiring an exact match of 11 (default)
- 'blastn-short' Optimized BLASTN for query sequences shorter than 50 nucleotides.
- 'megablast' Traditional megablast used to find very similar sequences (e.g., intraspecies or closely related species).
- 'dc-megablast' Discontiguous megablast used to find somewhat distant sequences (e.g., interspecies).
- 'rmblastn'
- Options for BLASTP:
- 'blastp' Standard protein-protein comparisons (default)
- 'blastp-fast' Faster BLASTP searches using longer words for protein seeding
- 'blastp-short' Optimized BLASTP comparisons for query sequences shorter than 30 residues
- Options for BLASTX:
- 'blastx' Standard nucleotide-protein comparisons (default)
- 'blastx-fast' Optimized nucleotide-protein comparisons
- Options for TBLASTN:
- 'tblastn' Standard protein-nucleotide comparisons (default)
- 'tblastn-fast' Optimized protein-nucleotide comparisons
- Not applicable for TBLASTX| %>
-
-
-
<%= ERB::Util.h %q|-evalue
- Expectation value (E) threshold for saving hits
- Default = '10'| %>
-
-
-
<%= ERB::Util.h %q|-word_size =2>
- Word size for wordfinder algorithm| %>
-
-
-
<%= ERB::Util.h %q|-gapopen
- Cost to open a gap| %>
-
-
-
<%= ERB::Util.h %q|-gapextend
- Cost to extend a gap| %>
-
-
-
<%= ERB::Util.h %q|-matrix
- Scoring matrix name (normally BLOSUM62)| %>
-
-
-
<%= ERB::Util.h %q|-threshold =0>
- Minimum word score such that the word is added to the BLAST lookup
- table| %>
-
-
-
<%= ERB::Util.h %q|-comp_based_stats
- Use composition-based statistics for blastp / tblastn:
- D or d: default (equivalent to 2)
- 0 or F or f: no composition-based statistics
- 1: Composition-based statistics as in NAR 29:2994-3005, 2001
- 2 or T or t : Composition-based score adjustment as in
- Bioinformatics 21:902-911, 2005, conditioned on sequence
- properties
- 3: Composition-based score adjustment as in Bioinformatics
- 21:902-911, 2005, unconditionally
- For programs other than tblastn, must either be absent or be D, F
- or 0
- Default = `2'| %>
-
-
-
<%= ERB::Util.h %q|-num_descriptions =0>
- Number of database sequences to show one-line descriptions for
- Default = `500'| %>
-
-
-
<%= ERB::Util.h %q| -num_alignments =0>
- Number of database sequences to show alignments for
- Default = `250'| %>
-
-
-
-
-
-
Query filtering options
-
-
-
<%= ERB::Util.h %q|-seg
- Filter query sequence with SEG (Format: 'yes', 'window locut hicut',
- or 'no' to disable)
- Default = `no'| %>
<%= ERB::Util.h %q|-lcase_masking
- Use lower case filtering in query and subject sequence(s)?| %>
-
-
-
-
-
-
Restrict search or results
-
-
-
<%= ERB::Util.h %q|-gilist
- Restrict search of database to list of GI's
- * Incompatible with: negative_gilist, seqidlist, remote, subject,
- subject_loc| %>
-
-
-
<%= ERB::Util.h %q|-seqidlist
- Restrict search of database to list of SeqId's
- * Incompatible with: gilist, negative_gilist, remote, subject,
- subject_loc| %>
-
-
-
<%= ERB::Util.h %q|-negative_gilist
- Restrict search of database to everything except the listed GIs
- * Incompatible with: gilist, seqidlist, remote, subject,
- subject_loc| %>
-
-
-
<%= ERB::Util.h %q|-entrez_query
- Restrict search with the given Entrez query
- * Requires: remote| %>
-
-
-
<%= ERB::Util.h %q|-db_soft_mask
- Filtering algorithm ID to apply to the BLAST database as soft masking
- * Incompatible with: subject, subject_loc| %>
-
-
-
<%= ERB::Util.h %q|-culling_limit =0>
- If the query range of a hit is enveloped by that of at least this
- many higher-scoring hits, delete the hit
- * Incompatible with: best_hit_overhang, best_hit_score_edge| %>
-
-
-
<%= ERB::Util.h %q|-best_hit_overhang 0 and <0.5)>
- Best Hit algorithm overhang value (recommended value: 0.1)
- * Incompatible with: culling_limit| %>
-
-
-
<%= ERB::Util.h %q|-best_hit_score_edge 0 and <0.5)>
- Best Hit algorithm score edge value (recommended value: 0.1)
- * Incompatible with: culling_limit| %>
-
-
-
<%= ERB::Util.h %q|-max_target_seqs =1>
- Maximum number of aligned sequences to keep| %>
-
-
diff --git a/views/blastn_options.erb b/views/blastn_options.erb
new file mode 100644
index 000000000..0e4fdd62b
--- /dev/null
+++ b/views/blastn_options.erb
@@ -0,0 +1,291 @@
+<%#
+ BLASTN ALGORITHM ADVANCED PARAMETERS
+ NOTE: The markup below is displayed in a modal window. Use less than 70
+ characters per line to preserve formatting.
+%>
+
+
<%= ERB::Util.h %q|-evalue
+ Expectation value (E) threshold for saving hits
+ Default = '10' (1000 for blastn-short)| %>
+
+
+
<%= ERB::Util.h %q|-word_size =2>
+ Word size for wordfinder algorithm (length of best perfect match)| %>
+
+
+
<%= ERB::Util.h %q|-gapopen
+ Cost to open a gap| %>
+
+
+
<%= ERB::Util.h %q|-gapextend
+ Cost to extend a gap| %>
+
+
+
<%= ERB::Util.h %q|-penalty
+ Penalty for a nucleotide mismatch| %>
+
+
+
<%= ERB::Util.h %q|-reward =0>
+ Reward for a nucleotide match| %>
+
+
+
<%= ERB::Util.h %q|-use_index
+ Use MegaBLAST database index
+ Default = 'false'| %>
+
+
+
+
+
Formatting Options
+
+
+
<%= ERB::Util.h %q|-show_gis
+ Show NCBI GIs in deflines?| %>
+
+
+
<%= ERB::Util.h %q|-num_descriptions =0>
+ Number of database sequences to show one-line descriptions for
+ Not applicable for outfmt > 4
+ Default = '500'
+ * Incompatible with: max_target_seqs| %>
+
+
+
<%= ERB::Util.h %q| -num_alignments =0>
+ Number of database sequences to show alignments for
+ Default = '250'
+ * Incompatible with: max_target_seqs| %>
+
+
+
<%= ERB::Util.h %q| -line_length =1>
+ Line length for formatting alignments
+ Not applicable for outfmt > 4
+ Default = '60'| %>
+
+
+
+
+
+
Query filtering options
+
+
+
<%= ERB::Util.h %q|-dust
+ Filter query sequence with DUST (Format: 'yes', 'level window linker', or
+ 'no' to disable)
+ Default = '20 64 1' ('no' for blastn-short)| %>
<%= ERB::Util.h %q|-entrez_query
+ Restrict search with the given Entrez query
+ * Requires: remote| %>
+
+
+
<%= ERB::Util.h %q|-db_soft_mask
+ Filtering algorithm ID to apply to the BLAST database as soft masking
+ * Incompatible with: db_hard_mask, subject, subject_loc| %>
+
+
+
<%= ERB::Util.h %q|-db_hard_mask
+ Filtering algorithm ID to apply to the BLAST database as hard masking
+ * Incompatible with: db_soft_mask, subject, subject_loc| %>
<%= ERB::Util.h %q|-qcov_hsp_perc
+ Percent query coverage per hsp| %>
+
+
+
<%= ERB::Util.h %q|-max_hsps =1>
+ Set maximum number of HSPs per subject sequence to save for each query| %>
+
+
+
<%= ERB::Util.h %q|-culling_limit =0>
+ If the query range of a hit is enveloped by that of at least this
+ many higher-scoring hits, delete the hit
+ * Incompatible with: best_hit_overhang, best_hit_score_edge| %>
+
+
+
<%= ERB::Util.h %q|-best_hit_overhang 0 and <0.5)>
+ Best Hit algorithm overhang value (recommended value: 0.1)
+ * Incompatible with: culling_limit| %>
+
+
+
<%= ERB::Util.h %q|-best_hit_score_edge 0 and <0.5)>
+ Best Hit algorithm score edge value (recommended value: 0.1)
+ * Incompatible with: culling_limit| %>
+
+
+
<%= ERB::Util.h %q|-subject_besthit
+ Turn on best hit per subject sequence| %>
+
+
+
<%= ERB::Util.h %q|-max_target_seqs =1>
+ Maximum number of aligned sequences to keep (value of 5 or more is recommended)
+ Default = '500'
+ * Incompatible with: num_descriptions, num_alignments| %>
<%= ERB::Util.h %q|-window_size =0>
+ Multiple hits window size, use 0 to specify 1-hit algorithm| %>
+
+
+
<%= ERB::Util.h %q|-off_diagonal_range =0>
+ Number of off-diagonals to search for the 2nd hit, use 0 to turn off
+ Default = `0'| %>
+
+
+
+
+
+
Miscellaneous options
+
+
+
<%= ERB::Util.h %q|-parse_deflines
+ Should the query and subject defline(s) be parsed?| %>
+
+
+
diff --git a/views/blastp_options.erb b/views/blastp_options.erb
new file mode 100644
index 000000000..5b629bf11
--- /dev/null
+++ b/views/blastp_options.erb
@@ -0,0 +1,288 @@
+<%#
+ BLASTP ALGORITHM ADVANCED PARAMETERS
+ NOTE: The markup below is displayed in a modal window. Use less than 70
+ characters per line to preserve formatting.
+%>
+
+
<%= ERB::Util.h %q|-evalue
+ Expectation value (E) threshold for saving hits
+ Default = '10'| %>
+
+
+
<%= ERB::Util.h %q|-word_size =2>
+ Word size for wordfinder algorithm| %>
+
+
+
<%= ERB::Util.h %q|-gapopen
+ Cost to open a gap| %>
+
+
+
<%= ERB::Util.h %q|-gapextend
+ Cost to extend a gap| %>
+
+
+
<%= ERB::Util.h %q|-matrix
+ Scoring matrix name (normally BLOSUM62)| %>
+
+
+
<%= ERB::Util.h %q|-threshold =0>
+ Minimum word score such that the word is added to the BLAST lookup table| %>
+
+
+
<%= ERB::Util.h %q|-comp_based_stats
+ Use composition-based statistics:
+ D or d: default (equivalent to 2)
+ 0 or F or f: no composition-based statistics
+ 1: Composition-based statistics as in NAR 29:2994-3005, 2001
+ 2 or T or t : Composition-based score adjustment as in
+ Bioinformatics 21:902-911, 2005, conditioned on sequence
+ properties
+ 3: Composition-based score adjustment as in Bioinformatics
+ 21:902-911, 2005, unconditionally
+ Default = '2'| %>
+
+
+
+
+
Formatting Options
+
+
+
<%= ERB::Util.h %q|-num_descriptions =0>
+ Number of database sequences to show one-line descriptions for
+ Not applicable for outfmt > 4
+ Default = '500'
+ * Incompatible with: max_target_seqs| %>
+
+
+
<%= ERB::Util.h %q| -num_alignments =0>
+ Number of database sequences to show alignments for
+ Default = '250'
+ * Incompatible with: max_target_seqs| %>
+
+
+
<%= ERB::Util.h %q| -sorthits =0 and =<4)>
+ Sorting option for hits:
+ alignment view options:
+ 0 = Sort by evalue,
+ 1 = Sort by bit score,
+ 2 = Sort by total score,
+ 3 = Sort by percent identity,
+ 4 = Sort by query coverage
+ Not applicable for outfmt > 4| %>
+
+
+
<%= ERB::Util.h %q| -sorthsps =0 and =<4)>
+ Sorting option for hps:
+ 0 = Sort by hsp evalue,
+ 1 = Sort by hsp score,
+ 2 = Sort by hsp query start,
+ 3 = Sort by hsp percent identity,
+ 4 = Sort by hsp subject start
+ Not applicable for outfmt != 0| %>
+
+
+
+
+
+
Query filtering options
+
+
+
<%= ERB::Util.h %q|-seg
+ Filter query sequence with SEG (Format: 'yes', 'window locut hicut',
+ or 'no' to disable)
+ Default = 'no'| %>
<%= ERB::Util.h %q| -ipglist
+ Restrict search of database to list of IPGs
+ * Incompatible with: subject, subject_loc| %>
+
+
+
<%= ERB::Util.h %q| -negative_ipglist
+ Restrict search of database to everything except the specified IPGs
+ * Incompatible with: subject, subject_loc| %>
+
+
+
<%= ERB::Util.h %q|-entrez_query
+ Restrict search with the given Entrez query
+ * Requires: remote| %>
+
+
+
<%= ERB::Util.h %q|-db_soft_mask
+ Filtering algorithm ID to apply to the BLAST database as soft masking
+ * Incompatible with: db_hard_mask, subject, subject_loc| %>
+
+
+
<%= ERB::Util.h %q|-db_hard_mask
+ Filtering algorithm ID to apply to the BLAST database as hard masking
+ * Incompatible with: db_soft_mask, subject, subject_loc| %>
+
+
+
<%= ERB::Util.h %q|-qcov_hsp_perc
+ Percent query coverage per hsp| %>
+
+
+
<%= ERB::Util.h %q|-max_hsps =1>
+ Set maximum number of HSPs per subject sequence to save for each query| %>
+
+
+
<%= ERB::Util.h %q|-culling_limit =0>
+ If the query range of a hit is enveloped by that of at least this
+ many higher-scoring hits, delete the hit
+ * Incompatible with: best_hit_overhang, best_hit_score_edge| %>
+
+
+
<%= ERB::Util.h %q|-best_hit_overhang 0 and <0.5)>
+ Best Hit algorithm overhang value (recommended value: 0.1)
+ * Incompatible with: culling_limit| %>
+
+
+
<%= ERB::Util.h %q|-best_hit_score_edge 0 and <0.5)>
+ Best Hit algorithm score edge value (recommended value: 0.1)
+ * Incompatible with: culling_limit| %>
+
+
+
<%= ERB::Util.h %q|-subject_besthit
+ Turn on best hit per subject sequence| %>
+
+
+
<%= ERB::Util.h %q|-max_target_seqs =1>
+ Maximum number of aligned sequences to keep (value of 5 or more is recommended)
+ Default = '500'
+ * Incompatible with: num_descriptions, num_alignments| %>
+
+
+
+
+
+
Statistical options
+
+
+
<%= ERB::Util.h %q|-dbsize
+ Effective length of the database| %>
+
+
+
<%= ERB::Util.h %q|-searchsp =0>
+ Effective length of the search space| %>
+
+
+
+
+
+
Extension options
+
+
+
<%= ERB::Util.h %q|-xdrop_ungap
+ X-dropoff value (in bits) for ungapped extensions| %>
+
+
+
<%= ERB::Util.h %q|-xdrop_gap
+ X-dropoff value (in bits) for preliminary gapped extensions| %>
+
+
+
<%= ERB::Util.h %q|-xdrop_gap_final
+ X-dropoff value (in bits) for final gapped alignment| %>
+
+
+
<%= ERB::Util.h %q|-window_size =0>
+ Multiple hits window size, use 0 to specify 1-hit algorithm| %>
diff --git a/views/blastx_options.erb b/views/blastx_options.erb
new file mode 100644
index 000000000..db34f0bb8
--- /dev/null
+++ b/views/blastx_options.erb
@@ -0,0 +1,318 @@
+<%#
+ BLASTX ALGORITHM ADVANCED PARAMETERS
+ NOTE: The markup below is displayed in a modal window. Use less than 70
+ characters per line to preserve formatting.
+%>
+
+
Input Query Options
+
+
+
<%= ERB::Util.h %q|-strand
+ Query strand(s) to search against database/subject
+ Default = 'both'|%>
+
+
+
<%= ERB::Util.h %q|-query_gencode
+ Genetic code to use to translate query (see https://www.ncbi.nlm.nih.gov/Taxonomy/
+ taxonomyhome.html/index.cgi?chapter=cgencodes for details)
+ Default = '1'|%>
<%= ERB::Util.h %q|-evalue
+ Expectation value (E) threshold for saving hits
+ Default = '10'| %>
+
+
+
<%= ERB::Util.h %q|-word_size =2>
+ Word size for wordfinder algorithm| %>
+
+
+
<%= ERB::Util.h %q|-gapopen
+ Cost to open a gap| %>
+
+
+
<%= ERB::Util.h %q|-gapextend
+ Cost to extend a gap| %>
+
+
+
<%= ERB::Util.h %q|-max_intron_length =0>
+ Length of the largest intron allowed in a translated nucleotide sequence when
+ linking multiple distinct alignments
+ Default = '0'| %>
+
+
+
<%= ERB::Util.h %q|-matrix
+ Scoring matrix name (normally BLOSUM62)| %>
+
+
+
<%= ERB::Util.h %q|-threshold =0>
+ Minimum word score such that the word is added to the BLAST lookup table| %>
+
+
+
<%= ERB::Util.h %q|-comp_based_stats
+ Use composition-based statistics:
+ D or d: default (equivalent to 2)
+ 0 or F or f: no composition-based statistics
+ 1: Composition-based statistics as in NAR 29:2994-3005, 2001
+ 2 or T or t : Composition-based score adjustment as in
+ Bioinformatics 21:902-911, 2005, conditioned on sequence
+ properties
+ 3: Composition-based score adjustment as in Bioinformatics
+ 21:902-911, 2005, unconditionally
+ Default = '2'| %>
+
+
+
+
+
Formatting Options
+
+
+
<%= ERB::Util.h %q|-show_gis
+ Show NCBI GIs in deflines?| %>
+
+
+
<%= ERB::Util.h %q|-num_descriptions =0>
+ Number of database sequences to show one-line descriptions for
+ Not applicable for outfmt > 4
+ Default = '500'
+ * Incompatible with: max_target_seqs| %>
+
+
+
<%= ERB::Util.h %q| -num_alignments =0>
+ Number of database sequences to show alignments for
+ Default = '250'
+ * Incompatible with: max_target_seqs| %>
+
+
+
<%= ERB::Util.h %q| -sorthits =0 and =<4)>
+ Sorting option for hits:
+ alignment view options:
+ 0 = Sort by evalue,
+ 1 = Sort by bit score,
+ 2 = Sort by total score,
+ 3 = Sort by percent identity,
+ 4 = Sort by query coverage
+ Not applicable for outfmt > 4| %>
+
+
+
<%= ERB::Util.h %q| -sorthsps =0 and =<4)>
+ Sorting option for hps:
+ 0 = Sort by hsp evalue,
+ 1 = Sort by hsp score,
+ 2 = Sort by hsp query start,
+ 3 = Sort by hsp percent identity,
+ 4 = Sort by hsp subject start
+ Not applicable for outfmt != 0| %>
+
+
+
+
+
+
Query filtering options
+
+
+
<%= ERB::Util.h %q|-seg
+ Filter query sequence with SEG (Format: 'yes', 'window locut hicut',
+ or 'no' to disable)
+ Default = '12 2.2 2.5'| %>
<%= ERB::Util.h %q| -ipglist
+ Restrict search of database to list of IPGs
+ * Incompatible with: subject, subject_loc| %>
+
+
+
<%= ERB::Util.h %q| -negative_ipglist
+ Restrict search of database to everything except the specified IPGs
+ * Incompatible with: subject, subject_loc| %>
+
+
+
<%= ERB::Util.h %q|-entrez_query
+ Restrict search with the given Entrez query
+ * Requires: remote| %>
+
+
+
<%= ERB::Util.h %q|-db_soft_mask
+ Filtering algorithm ID to apply to the BLAST database as soft masking
+ * Incompatible with: db_hard_mask, subject, subject_loc| %>
+
+
+
<%= ERB::Util.h %q|-db_hard_mask
+ Filtering algorithm ID to apply to the BLAST database as hard masking
+ * Incompatible with: db_soft_mask, subject, subject_loc| %>
+
+
+
<%= ERB::Util.h %q|-qcov_hsp_perc
+ Percent query coverage per hsp| %>
+
+
+
<%= ERB::Util.h %q|-max_hsps =1>
+ Set maximum number of HSPs per subject sequence to save for each query| %>
+
+
+
<%= ERB::Util.h %q|-culling_limit =0>
+ If the query range of a hit is enveloped by that of at least this
+ many higher-scoring hits, delete the hit
+ * Incompatible with: best_hit_overhang, best_hit_score_edge| %>
+
+
+
<%= ERB::Util.h %q|-best_hit_overhang 0 and <0.5)>
+ Best Hit algorithm overhang value (recommended value: 0.1)
+ * Incompatible with: culling_limit| %>
+
+
+
<%= ERB::Util.h %q|-best_hit_score_edge 0 and <0.5)>
+ Best Hit algorithm score edge value (recommended value: 0.1)
+ * Incompatible with: culling_limit| %>
+
+
+
<%= ERB::Util.h %q|-subject_besthit
+ Turn on best hit per subject sequence| %>
+
+
+
<%= ERB::Util.h %q|-max_target_seqs =1>
+ Maximum number of aligned sequences to keep (value of 5 or more is recommended)
+ Default = '500'
+ * Incompatible with: num_descriptions, num_alignments| %>
+
+
+
+
+
+
Statistical options
+
+
+
<%= ERB::Util.h %q|-dbsize
+ Effective length of the database| %>
+
+
+
<%= ERB::Util.h %q|-searchsp =0>
+ Effective length of the search space| %>
+
+
+
<%= ERB::Util.h %q|-sum_stats
+ Use sum statistics| %>
+
+
+
+
+
+
Extension options
+
+
+
<%= ERB::Util.h %q|-xdrop_ungap
+ X-dropoff value (in bits) for ungapped extensions| %>
+
+
+
<%= ERB::Util.h %q|-xdrop_gap
+ X-dropoff value (in bits) for preliminary gapped extensions| %>
+
+
+
<%= ERB::Util.h %q|-xdrop_gap_final
+ X-dropoff value (in bits) for final gapped alignment| %>
+
+
+
<%= ERB::Util.h %q|-window_size =0>
+ Multiple hits window size, use 0 to specify 1-hit algorithm| %>