diff --git a/client/galaxy/scripts/mvc/tool/tool-form-composite.js b/client/galaxy/scripts/mvc/tool/tool-form-composite.js index 9a6cd1ab24e..1beea452ce9 100644 --- a/client/galaxy/scripts/mvc/tool/tool-form-composite.js +++ b/client/galaxy/scripts/mvc/tool/tool-form-composite.js @@ -119,7 +119,7 @@ var View = Backbone.View.extend({ input.help = input.step_linked ? `${input.help}, ` : ""; input.help += `Output dataset '${connection.output_name}' from step ${parseInt(i) + 1}`; input.step_linked = input.step_linked || []; - input.step_linked.push(step); + input.step_linked.push({ index: step.index, step_type: step.step_type }); } }); }); @@ -314,31 +314,34 @@ var View = Backbone.View.extend({ /** Render job caching option */ _renderUseCachedJob: function() { - var extra_user_preferences = {}; - if (Galaxy.user.attributes.preferences && 'extra_user_preferences' in Galaxy.user.attributes.preferences){ - extra_user_preferences = JSON.parse(Galaxy.user.attributes.preferences.extra_user_preferences); - } - var display_use_cached_job_checkbox = 'use_cached_job|use_cached_job_checkbox' in extra_user_preferences ? extra_user_preferences['use_cached_job|use_cached_job_checkbox'] : false ; - this.display_use_cached_job_checkbox = display_use_cached_job_checkbox === 'true'; - if (this.display_use_cached_job_checkbox){ + var extra_user_preferences = {}; + if (Galaxy.user.attributes.preferences && "extra_user_preferences" in Galaxy.user.attributes.preferences) { + extra_user_preferences = JSON.parse(Galaxy.user.attributes.preferences.extra_user_preferences); + } + var display_use_cached_job_checkbox = + "use_cached_job|use_cached_job_checkbox" in extra_user_preferences + ? extra_user_preferences["use_cached_job|use_cached_job_checkbox"] + : false; + this.display_use_cached_job_checkbox = display_use_cached_job_checkbox === "true"; + if (this.display_use_cached_job_checkbox) { this.job_options_form = new Form({ cls: "ui-portlet-narrow", title: "Job re-use Options", inputs: [ - { - type: "conditional", - name: "use_cached_job", - test_param: { - name: "check", - label: "BETA: Attempt to reuse jobs with identical parameters?", - type: "boolean", - value: "false", - help: "This may skip executing jobs that you have already run." - }, - } - ] - }); - this._append(this.$steps, this.job_options_form.$el); + { + type: "conditional", + name: "use_cached_job", + test_param: { + name: "check", + label: "BETA: Attempt to reuse jobs with identical parameters?", + type: "boolean", + value: "false", + help: "This may skip executing jobs that you have already run." + } + } + ] + }); + this._append(this.$steps, this.job_options_form.$el); } }, @@ -542,8 +545,8 @@ var View = Backbone.View.extend({ batch: true }; if (this.display_use_cached_job_checkbox) { - job_def['use_cached_job'] = this.job_options_form.data.create()["use_cached_job|check"] === 'true'; - } + job_def["use_cached_job"] = this.job_options_form.data.create()["use_cached_job|check"] === "true"; + } var validated = true; for (var i in this.forms) { var form = this.forms[i]; diff --git a/client/galaxy/scripts/mvc/tool/tool-form.js b/client/galaxy/scripts/mvc/tool/tool-form.js index e0038c3c97c..3c027a0cbb3 100644 --- a/client/galaxy/scripts/mvc/tool/tool-form.js +++ b/client/galaxy/scripts/mvc/tool/tool-form.js @@ -149,23 +149,26 @@ var View = Backbone.View.extend({ }); } - // Job Re-use Options - var extra_user_preferences = {}; - if (Galaxy.user.attributes.preferences && 'extra_user_preferences' in Galaxy.user.attributes.preferences) { - extra_user_preferences = JSON.parse(Galaxy.user.attributes.preferences.extra_user_preferences); - } - var use_cached_job = 'use_cached_job|use_cached_job_checkbox' in extra_user_preferences ? extra_user_preferences['use_cached_job|use_cached_job_checkbox'] : false ; - if (use_cached_job === 'true'){ - options.inputs.push({ - label: "BETA: Attempt to re-use jobs with identical parameters ?", - help: "This may skip executing jobs that you have already run", - name: "use_cached_job", - type: "select", - display: "radio", - ignore: "__ignore__", - value: "__ignore__", - options: [["No", false], ["Yes", true]], - }); + // Job Re-use Options + var extra_user_preferences = {}; + if (Galaxy.user.attributes.preferences && "extra_user_preferences" in Galaxy.user.attributes.preferences) { + extra_user_preferences = JSON.parse(Galaxy.user.attributes.preferences.extra_user_preferences); + } + var use_cached_job = + "use_cached_job|use_cached_job_checkbox" in extra_user_preferences + ? extra_user_preferences["use_cached_job|use_cached_job_checkbox"] + : false; + if (use_cached_job === "true") { + options.inputs.push({ + label: "BETA: Attempt to re-use jobs with identical parameters ?", + help: "This may skip executing jobs that you have already run", + name: "use_cached_job", + type: "select", + display: "radio", + ignore: "__ignore__", + value: "__ignore__", + options: [["No", false], ["Yes", true]] + }); } }, diff --git a/client/galaxy/scripts/mvc/workflow/workflow-node.js b/client/galaxy/scripts/mvc/workflow/workflow-node.js index e32591b7373..67a10df10a3 100644 --- a/client/galaxy/scripts/mvc/workflow/workflow-node.js +++ b/client/galaxy/scripts/mvc/workflow/workflow-node.js @@ -179,13 +179,19 @@ var Node = Backbone.Model.extend({ // Remove active class $(element).removeClass("toolForm-active"); }, + set_tool_version: function() { + if (this.config_form) { + this.tool_version = this.config_form.version; + this.content_id = this.config_form.id; + } + }, init_field_data: function(data) { if (data.type) { this.type = data.type; } this.name = data.name; this.config_form = data.config_form; - this.tool_version = this.config_form && this.config_form.version; + this.set_tool_version(); this.tool_state = data.tool_state; this.errors = data.errors; this.tooltip = data.tooltip ? data.tooltip : ""; @@ -263,7 +269,7 @@ var Node = Backbone.Model.extend({ }); this.tool_state = data.tool_state; this.config_form = data.config_form; - this.tool_version = this.config_form && this.config_form.version; + this.set_tool_version(); this.errors = data.errors; this.annotation = data.annotation; this.label = data.label; diff --git a/lib/galaxy/datatypes/binary.py b/lib/galaxy/datatypes/binary.py index daefe7a7e97..2b7325a2ed6 100644 --- a/lib/galaxy/datatypes/binary.py +++ b/lib/galaxy/datatypes/binary.py @@ -327,27 +327,35 @@ class Bam(Binary): def get_chunk(self, trans, dataset, offset=0, ck_size=None): index_file = dataset.metadata.bam_index - with pysam.AlignmentFile(dataset.file_name, "rb", index_filename=index_file.file_name) as bamfile: - ck_size = 300 # 300 lines - ck_data = "" - header_line_count = 0 - if offset == 0: - ck_data = bamfile.text.replace('\t', ' ') - header_line_count = bamfile.text.count('\n') - else: - bamfile.seek(offset) - for line_number, alignment in enumerate(bamfile) : - # return only Header lines if 'header_line_count' exceeds 'ck_size' - # FIXME: Can be problematic if bam has million lines of header - offset = bamfile.tell() - if (line_number + header_line_count) > ck_size: - break - else: - bamline = alignment.tostring(bamfile) - # Galaxy display each tag as separate column because 'tostring()' funcition put tabs in between each tag of tags column. - # Below code will remove spaces between each tag. - bamline_modified = ('\t').join(bamline.split()[:11] + [(' ').join(bamline.split()[11:])]) - ck_data = "%s\n%s" % (ck_data, bamline_modified) + if not offset == -1: + try: + with pysam.AlignmentFile(dataset.file_name, "rb", index_filename=index_file.file_name) as bamfile: + ck_size = 300 # 300 lines + ck_data = "" + header_line_count = 0 + if offset == 0: + ck_data = bamfile.text.replace('\t', ' ') + header_line_count = bamfile.text.count('\n') + else: + bamfile.seek(offset) + for line_number, alignment in enumerate(bamfile) : + # return only Header lines if 'header_line_count' exceeds 'ck_size' + # FIXME: Can be problematic if bam has million lines of header + offset = bamfile.tell() + if (line_number + header_line_count) > ck_size: + break + else: + bamline = alignment.tostring(bamfile) + # Galaxy display each tag as separate column because 'tostring()' funcition put tabs in between each tag of tags column. + # Below code will remove spaces between each tag. + bamline_modified = ('\t').join(bamline.split()[:11] + [(' ').join(bamline.split()[11:])]) + ck_data = "%s\n%s" % (ck_data, bamline_modified) + except Exception as e: + offset = -1 + ck_data = "Could not display BAM file, error was:\n%s" % e.message + else: + ck_data = '' + offset = -1 return dumps({'ck_data': util.unicodify(ck_data), 'offset': offset}) diff --git a/static/scripts/bundled/analysis.bundled.js b/static/scripts/bundled/analysis.bundled.js index 310f3be5be7..2fb2a8e699c 100644 --- a/static/scripts/bundled/analysis.bundled.js +++ b/static/scripts/bundled/analysis.bundled.js @@ -1,3 +1,3 @@ webpackJsonp([1],[,,,,,,,,function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={UPLOAD:"upload",QUEUED:"queued",RUNNING:"running",SETTING_METADATA:"setting_metadata",NEW:"new",EMPTY:"empty",OK:"ok",PAUSED:"paused",FAILED_METADATA:"failed_metadata",NOT_VIEWABLE:"noPermission",DISCARDED:"discarded",ERROR:"error"};n.READY_STATES=[n.OK,n.EMPTY,n.PAUSED,n.FAILED_METADATA,n.NOT_VIEWABLE,n.DISCARDED,n.ERROR],n.NOT_READY_STATES=[n.UPLOAD,n.QUEUED,n.RUNNING,n.SETTING_METADATA,n.NEW],t.default=n},,function(e,t,i){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),s=function(e){return e&&e.__esModule?e:{default:e}}(n),a=s.default,o=function(t){t=t||{},t.tooltipConfig=t.tooltipConfig||{placement:"bottom"},t.classes=["icon-btn"].concat(t.classes||[]),t.disabled&&t.classes.push("disabled");var i=['','',""].join(""),n=a(i).tooltip(t.tooltipConfig);return e.isFunction(t.onclick)&&n.click(t.onclick),n};t.default=o}).call(t,i(1))},,function(e,t,i){"use strict";(function(e,n){Object.defineProperty(t,"__esModule",{value:!0});var s=i(5),a=function(e){return e&&e.__esModule?e:{default:e}}(s),o=e.View.extend({optionsDefault:{css:"",placeholder:"No data available",data:[],value:null,multiple:!1,minimumInputLength:0,initialData:""},initialize:function(e){if(this.options=a.default.merge(e,this.optionsDefault),this.setElement(this._template(this.options)),!this.options.container)return void console.log("ui-select::initialize() : container not specified.");if(this.options.container.append(this.$el),this.select_data=this.options.data,this._refresh(),!this.options.multiple){this.options.value&&this._setValue(this.options.value);var t=this;this.options.onchange&&this.$el.on("change",function(){t.options.onchange(t.value())})}},value:function(e){var t=this._getValue();void 0!==e&&this._setValue(e);var i=this._getValue();return i!=t&&this.options.onchange&&this.options.onchange(i),i},text:function(){return this.$el.select2("data").text},disabled:function(){return!this.$el.select2("enable")},enable:function(){this.$el.select2("enable",!0)},disable:function(){this.$el.select2("enable",!1)},add:function(e){this.select_data.push({id:e.id,text:e.text}),this._refresh()},del:function(e){var t=this._getIndex(e);-1!=t&&(this.select_data.splice(t,1),this._refresh())},remove:function(){this.$el.select2("destroy")},update:function(e){this.select_data=[];for(var t in e.data)this.select_data.push(e.data[t]);this._refresh()},_refresh:function(){if(this.options.multiple){var e={multiple:this.options.multiple,containerCssClass:this.options.css,placeholder:this.options.placeholder,minimumInputLength:this.options.minimumInputLength,ajax:this.options.ajax,dropdownCssClass:this.options.dropdownCssClass,escapeMarkup:this.options.escapeMarkup,formatResult:this.options.formatResult,formatSelection:this.options.formatSelection,initSelection:this.options.initSelection,initialData:this.options.initialData};this.$el.select2(e)}else{var t=this._getValue(),e={data:this.select_data,containerCssClass:this.options.css,placeholder:this.options.placeholder,dropdownAutoWidth:!0};this.$el.select2(e),this._setValue(t)}},_getIndex:function(e){n.findIndex(this.select_data,{id:e})},_getValue:function(){return this.$el.select2("val")},_setValue:function(e){-1==this._getIndex(e)&&this.select_data.length>0&&(e=this.select_data[0].id),this.$el.select2("val",e)},_template:function(e){return''}});t.default={View:o}}).call(t,i(2),i(1))},,,,function(e,t,i){"use strict";(function(e,n,s){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=i(56),l=a(o),r=i(37),d=a(r),c=i(20),u=a(c),h=i(31),f=a(h),p=i(70),m=a(p),g=i(4),_=a(g),v=i(32),w=a(v),y=500;try{y=localStorage.getItem("historyContentsLimitPerPageDefault")||y}catch(e){}var b=l.default.PaginatedCollection,x=b.extend(_.default.LoggableMixin).extend({_logNamespace:"history",limitPerPage:y,limitPerProgressiveFetch:y,order:"hid",urlRoot:Galaxy.root+"api/histories",url:function(){return this.urlRoot+"/"+this.historyId+"/contents"},initialize:function(e,t){this.on({"sync add":this.trackJobStates}),t=t||{},b.prototype.initialize.call(this,e,t),this.history=t.history||null,this.setHistoryId(t.historyId||null),this.includeDeleted=t.includeDeleted||this.includeDeleted,this.includeHidden=t.includeHidden||this.includeHidden,this.model.prototype.idAttribute="type_id"},trackJobStates:function(){var e=this;this.each(function(t){if(!t.has("job_states_summary")&&"dataset_collection"===t.attributes.history_content_type){var i=t.attributes.job_source_type,n=t.attributes.job_source_id;if(i){e.jobStateSummariesCollection.add({id:n,model:i,history_id:e.history_id,collection_id:t.attributes.id});var s=e.jobStateSummariesCollection.get(n);t.jobStatesSummary=s}}})},model:function(e,t){return"dataset"===e.history_content_type?new d.default.HistoryDatasetAssociation(e,t):"dataset_collection"===e.history_content_type?new u.default.HistoryDatasetCollection(e,t):{validationError:"Unknown history_content_type: "+e.history_content_type}},stopPolling:function(){this.jobStateSummariesCollection&&(this.jobStateSummariesCollection.active=!1,this.jobStateSummariesCollection.clearUpdateTimeout())},setHistoryId:function(e){this.stopPolling(),this.historyId=e,e&&(this._setUpWebStorage(),this.jobStateSummariesCollection=new m.default.JobStatesSummaryCollection,this.jobStateSummariesCollection.historyId=e,this.jobStateSummariesCollection.monitor())},_setUpWebStorage:function(e){return this.storage=new f.default.HistoryPrefs({id:f.default.HistoryPrefs.historyStorageKey(this.historyId)}),this.trigger("new-storage",this.storage,this),this.on({"include-deleted":function(e){this.storage.includeDeleted(e)},"include-hidden":function(e){this.storage.includeHidden(e)}}),this.includeDeleted=this.storage.includeDeleted()||!1,this.includeHidden=this.storage.includeHidden()||!1,this},comparators:e.extend(e.clone(b.prototype.comparators),{name:_.default.buildComparator("name",{ascending:!0}),"name-dsc":_.default.buildComparator("name",{ascending:!1}),hid:_.default.buildComparator("hid",{ascending:!1}),"hid-asc":_.default.buildComparator("hid",{ascending:!0})}),running:function(){return this.filter(function(e){return!e.inReadyState()})},runningAndActive:function(){return this.filter(function(e){return!e.inReadyState()&&e.get("visible")&&!e.get("deleted")})},getByHid:function(e){return this.findWhere({hid:e})},haveDetails:function(){return this.all(function(e){return e.hasDetails()})},hidden:function(){return this.filter(function(e){return e.hidden()})},deleted:function(){return this.filter(function(e){return e.get("deleted")})},visibleAndUndeleted:function(){return this.filter(function(e){return e.get("visible")&&!e.get("deleted")})},setIncludeDeleted:function(t,i){if(e.isBoolean(t)&&t!==this.includeDeleted){if(this.includeDeleted=t,e.result(i,"silent"))return;this.trigger("include-deleted",t,this)}},setIncludeHidden:function(t,i){if(e.isBoolean(t)&&t!==this.includeHidden){if(this.includeHidden=t,i=i||{},e.result(i,"silent"))return;this.trigger("include-hidden",t,this)}},fetch:function(t){if(t=t||{},this.historyId&&!t.details){var i=f.default.HistoryPrefs.get(this.historyId).toJSON();e.isEmpty(i.expandedIds)||(t.details=e.values(i.expandedIds).join(","))}return b.prototype.fetch.call(this,t)},_buildFetchData:function(t){return e.extend(b.prototype._buildFetchData.call(this,t),{v:"dev"})},_fetchParams:b.prototype._fetchParams.concat(["v","details"]),_buildFetchFilters:function(t){var i=b.prototype._buildFetchFilters.call(this,t)||{},n={};return this.includeDeleted||(n.deleted=!1,n.purged=!1),this.includeHidden||(n.visible=!0),e.defaults(i,n)},getTotalItemCount:function(){return this.history.contentsShown()},fetchUpdated:function(e,t){return e&&(t=t||{filters:{}},t.remove=!1,t.filters={"update_time-ge":e.toISOString(),visible:""}),this.fetch(t)},fetchDeleted:function(t){var i=this;return t=t||{},t.filters=e.extend(t.filters,{deleted:!0,purged:void 0}),t.remove=!1,this.trigger("fetching-deleted",this),this.fetch(t).always(function(){i.trigger("fetching-deleted-done",i)})},fetchHidden:function(t){t=t||{};var i=this;return t.filters=e.extend(t.filters,{visible:!1}),t.remove=!1,i.trigger("fetching-hidden",i),i.fetch(t).always(function(){i.trigger("fetching-hidden-done",i)})},fetchAllDetails:function(t){t=t||{};var i={details:"all"};return t.data=e.extend(t.data||{},i),this.fetch(t)},_filterAndUpdate:function(e,t){var i=this,n=i.model.prototype.idAttribute,s=[t];return i.fetch({filters:e,remove:!1}).then(function(e){return e=e.reduce(function(e,t,s){var a=i.get(t[n]);return a?e.concat(a):e},[]),i.ajaxQueue("save",s,e)})},ajaxQueue:function(t,i,n){return n=n||this.models,new w.default.AjaxQueue(n.slice().reverse().map(function(n,s){var a=e.isString(t)?n[t]:t;return function(){return a.apply(n,i)}})).deferred},progressivelyFetchDetails:function(t){function i(n){n=n||0;var l=e.extend(e.clone(t),{view:"summary",keys:r,limit:o,offset:n,reset:0===n,remove:!1});e.defer(function(){a.fetch.call(a,l).fail(s.reject).done(function(e){s.notify(e,o,n),e.length!==o?(a.allFetched=!0,s.resolve(e,o,n)):i(n+o)})})}t=t||{};var s=n.Deferred(),a=this,o=t.limitPerCall||a.limitPerProgressiveFetch,l=d.default.HistoryDatasetAssociation.prototype.searchAttributes,r=l.join(",");return i(),s},isCopyable:function(t){var i=["HistoryDatasetAssociation","HistoryDatasetCollectionAssociation"];return e.isObject(t)&&t.id&&e.contains(i,t.model_class)},copy:function(t){var i,s,a;e.isString(t)?(i=t,a="hda",s="dataset"):(i=t.id,a={HistoryDatasetAssociation:"hda",LibraryDatasetDatasetAssociation:"ldda",HistoryDatasetCollectionAssociation:"hdca"}[t.model_class]||"hda",s="hdca"===a?"dataset_collection":"dataset");var o=this,l=n.ajax(this.url(),{method:"POST",contentType:"application/json",data:JSON.stringify({content:i,source:a,type:s})}).done(function(e){o.add([e],{parse:!0})}).fail(function(e,t,n){o.trigger("error",o,l,{},"Error copying contents",{type:s,id:i,source:a})});return l},createHDCA:function(e,t,i,n,s){return this.model({history_content_type:"dataset_collection",collection_type:t,history_id:this.historyId,name:i,hide_source_items:n||!1,element_identifiers:e}).save(s)},haveSearchDetails:function(){return this.allFetched&&this.all(function(t){return e.has(t.attributes,"annotation")})},matches:function(e){return this.filter(function(t){return t.matches(e)})},clone:function(){var e=s.Collection.prototype.clone.call(this);return e.historyId=this.historyId,e},toString:function(){return["HistoryContents(",[this.historyId,this.length].join(),")"].join("")}});t.default={HistoryContents:x}}).call(t,i(1),i(0),i(2))},function(e,t,i){"use strict";(function(e,n,s,a){function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=i(21),r=o(l),d=i(8),c=o(d),u=i(10),h=o(u),f=i(4),p=o(f),m=i(3),g=o(m),_=r.default.ListItemView,v=_.extend({_logNamespace:"dataset",className:_.prototype.className+" dataset",id:function(){return["dataset",this.model.get("id")].join("-")},initialize:function(e){e.logger&&(this.logger=this.model.logger=e.logger),this.log(this+".initialize:",e),_.prototype.initialize.call(this,e),this.linkTarget=e.linkTarget||"_blank"},_setUpListeners:function(){_.prototype._setUpListeners.call(this);var t=this;return t.listenTo(t.model,{change:function(i){t.model.changedAttributes().state&&t.model.inReadyState()&&t.expanded&&!t.model.hasDetails()?t.model.fetch({silent:!0}).done(function(){t.render()}):e.has(i.changed,"tags")&&1===e.keys(i.changed).length?t.$(".nametags").html(t._renderNametags()):t.render()}})},_fetchModelDetails:function(){var e=this;return e.model.inReadyState()&&!e.model.hasDetails()?e.model.fetch({silent:!0}):n.when()},remove:function(e,t){var i=this;e=e||this.fxSpeed,this.$el.fadeOut(e,function(){s.View.prototype.remove.call(i),t&&t.call(i)})},_swapNewRender:function(e){return _.prototype._swapNewRender.call(this,e),this.model.has("state")&&this.$el.addClass("state-"+this.model.get("state")),this.$el},_renderPrimaryActions:function(){return[this._renderDisplayButton()]},_renderDisplayButton:function(){var e=this.model.get("state");if(e===c.default.NOT_VIEWABLE||e===c.default.DISCARDED||!this.model.get("accessible"))return null;var t={target:this.linkTarget,classes:"display-btn"};if(this.model.get("purged"))t.disabled=!0,t.title=(0,g.default)("Cannot display datasets removed from disk");else if(e===c.default.UPLOAD)t.disabled=!0,t.title=(0,g.default)("This dataset must finish uploading before it can be viewed");else if(e===c.default.NEW)t.disabled=!0,t.title=(0,g.default)("This dataset is not yet viewable");else{t.title=(0,g.default)("View data"),t.href=this.model.urls.display;var i=this;t.onclick=function(e){Galaxy.frame&&Galaxy.frame.active&&(Galaxy.frame.addDataset(i.model.get("id")),e.preventDefault())}}return t.faIcon="fa-eye",(0,h.default)(t)},_renderDetails:function(){if(this.model.get("state")===c.default.NOT_VIEWABLE)return a(this.templates.noAccess(this.model.toJSON(),this));var e=_.prototype._renderDetails.call(this);return e.find(".actions .left").empty().append(this._renderSecondaryActions()),e.find(".summary").html(this._renderSummary()).prepend(this._renderDetailMessages()),e.find(".display-applications").html(this._renderDisplayApplications()),this._setUpBehaviors(e),e},_renderSummary:function(){var e=this.model.toJSON(),t=this.templates.summaries[e.state];return(t=t||this.templates.summaries.unknown)(e,this)},_renderDetailMessages:function(){var t=this,i=a('
'),n=t.model.toJSON();return e.each(t.templates.detailMessages,function(e){i.append(a(e(n,t)))}),i},_renderDisplayApplications:function(){return this.model.isDeletedOrPurged()?"":[this.templates.displayApplications(this.model.get("display_apps"),this),this.templates.displayApplications(this.model.get("display_types"),this)].join("")},_renderSecondaryActions:function(){switch(this.debug("_renderSecondaryActions"),this.model.get("state")){case c.default.NOT_VIEWABLE:return[];case c.default.OK:case c.default.FAILED_METADATA:case c.default.ERROR:return[this._renderDownloadButton(),this._renderShowParamsButton()]}return[this._renderShowParamsButton()]},_renderShowParamsButton:function(){return(0,h.default)({title:(0,g.default)("View details"),classes:"params-btn",href:this.model.urls.show_params,target:this.linkTarget,faIcon:"fa-info-circle",onclick:function(e){Galaxy.frame&&Galaxy.frame.active&&(Galaxy.frame.add({title:(0,g.default)("Dataset details"),url:this.href}),e.preventDefault(),e.stopPropagation())}})},_renderDownloadButton:function(){return this.model.get("purged")||!this.model.hasData()?null:e.isEmpty(this.model.get("meta_files"))?a('\n \n \n '):this._renderMetaFileDownloadButton()},_renderMetaFileDownloadButton:function(){var t=this.model.urls;return a('\n ")},_renderNametags:function(){return e.template(["<% _.each(_.sortBy(_.uniq(tags), function(x) { return x }), function(tag){ %>",'<% if (tag.indexOf("name:") == 0){ %>','<%- tag.slice(5) %>',"<% } %>","<% }); %>"].join(""))({tags:this.model.get("tags")})},events:e.extend(e.clone(_.prototype.events),{"click .display-btn":function(e){this.trigger("display",this,e)},"click .params-btn":function(e){this.trigger("params",this,e)},"click .download-btn":function(e){this.trigger("download",this,e)}}),toString:function(){return"DatasetListItemView("+(this.model?""+this.model:"(no model)")+")"}});v.prototype.templates=function(){var t=e.extend({},_.prototype.templates.warnings,{failed_metadata:p.default.wrapTemplate(['<% if( model.state === "failed_metadata" ){ %>','","<% } %>"]),error:p.default.wrapTemplate(["<% if( model.error ){ %>",'","<% } %>"]),purged:p.default.wrapTemplate(["<% if( model.purged ){ %>",'","<% } %>"]),deleted:p.default.wrapTemplate(["<% if( model.deleted && !model.purged ){ %>",'","<% } %>"])}),i=p.default.wrapTemplate(['<%= dataset.peek %>',"<% } %>","<% } %>","
"+JSON.stringify(n.responseJSON)+"":i+=": "+s}t._showAlert(i,"alert-danger")},events:{"click .more-help":"_clickMoreHelp","click .less-help":"_clickLessHelp","click .main-help":"_toggleHelp","click .header .alert button":"_hideAlert","click .reset":"reset","click .clear-selected":"clearSelectedElements","click .collection-elements":"clearSelectedElements","dragover .collection-elements":"_dragoverElements","drop .collection-elements":"_dropElements","collection-element.dragstart .collection-elements":"_elementDragstart","collection-element.dragend .collection-elements":"_elementDragend","change .collection-name":"_changeName","keydown .collection-name":"_nameCheckForEnter","change .hide-originals":"_changeHideOriginals","click .cancel-create":"_cancelCreate","click .create-collection":"_clickCreate"},reset:function(){this._instanceSetUp(),this._elementsSetUp(),this.render()},clearSelectedElements:function(e){this.$(".collection-elements .collection-element").removeClass("selected"),this.$(".collection-elements-controls > .clear-selected").hide()},_dragoverElements:function(e){e.preventDefault();var t=this.$list();this._checkForAutoscroll(t,e.originalEvent.clientY);var i=this._getNearestElement(e.originalEvent.clientY);this.$(".element-drop-placeholder").remove();var n=s('');i.length?i.before(n):t.append(n)},_checkForAutoscroll:function(e,t){var i=e.offset(),n=e.scrollTop(),s=t-i.top,a=i.top+e.outerHeight()-t;s>=0&&s
",(0,y.default)(["Collections of datasets are permanent, ordered lists of datasets that can be passed to tools and ","workflows in order to have analyses done on each member of the entire group. This interface allows ","you to create a collection and re-order the final collection."].join("")),"
","",(0,y.default)(['Once your collection is complete, enter a name and ','click "Create list".'].join("")),"
"].join("")),invalidElements:n.template([(0,y.default)("The following selections could not be included due to problems:"),"'+this.progressive+"...
";this.modal.$(".modal-body").empty().append(e).css({"margin-top":"8px"})},dialog:function(t,i,a){function o(){var e=t.$("#copy-modal-title").val();if(!e)return void t.$(".invalid-title").show();var n="copy-all"===t.$('input[name="copy-what"]:checked').val();t.$("button").prop("disabled",!0),l._showAjaxIndicator(),i.copy(!0,e,n).done(function(e){r.resolve(e)}).fail(function(t,s,a){var o={name:e,copyAllDatasets:n};d.default.ajaxErrorModal(i,t,o,l.errorMessage),r.rejectWith(r,arguments)}).done(function(){m&&t.hide()})}a=a||{};var l=this,r=n.Deferred(),c=a.nameFn||this.defaultName,h=c({name:i.get("name")}),f=a.allDatasets?"copy-all":"copy-non-deleted",p=!!e.isUndefined(a.allowAll)||a.allowAll,m=!!e.isUndefined(a.autoClose)||a.autoClose;this.modal=t;var g=a.closing_callback;return t.show(e.extend(a,{title:this.title({name:i.get("name")}),body:s(l._template({name:h,isAnon:Galaxy.user.isAnonymous(),allowAll:p,copyWhat:f,activeLabel:this.activeLabel,allLabel:this.allLabel,anonWarning:this.anonWarning})),buttons:e.object([[(0,u.default)("Cancel"),function(){t.hide()}],[this.submitLabel,o]]),height:"auto",closing_events:!0,closing_callback:function(e){e&&r.reject({cancelled:!0}),g&&g(e)}})),t.$("#copy-modal-title").focus().select(),t.$("#copy-modal-title").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),o())}),r}},f=e.extend({},h,{defaultName:e.template("imported: <%- name %>"),title:e.template((0,u.default)("Importing history")+' "<%- name %>"'),submitLabel:(0,u.default)("Import"),errorMessage:(0,u.default)("History could not be imported."),progressive:(0,u.default)("Importing history"),activeLabel:(0,u.default)("Import only the active, non-deleted datasets"),allLabel:(0,u.default)("Import all datasets including deleted ones"),anonWarning:(0,u.default)("As an anonymous user, unless you login or register, you will lose your current history ")+(0,u.default)("after importing this history. ")}),p=function(e,t){t=t||{};var i=window.parent.Galaxy.modal||new l.default.View({});return t.useImport?f.dialog(i,e,t):h.dialog(i,e,t)};t.default=p}).call(t,i(1),i(0),i(0))},function(e,t,i){"use strict";(function(e){function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0});var s=i(1),a=n(s),o=i(2),l=n(o),r=i(4),d=function(e){return e&&e.__esModule?e:{default:e}}(r),c=l.Collection.extend({initialize:function(e,t){l.Collection.prototype.initialize.call(this,e,t),this.setOrder(t.order||this.order,{silent:!0})},_setUpListeners:function(){return this.on({"changed-order":this.sort})},fetch:function(e){return e=this._buildFetchOptions(e),Galaxy.debug("fetch options:",e),l.Collection.prototype.fetch.call(this,e)},_buildFetchOptions:function(e){e=a.clone(e)||{};var t=this;e.traditional=!0,e.data=e.data||t._buildFetchData(e),Galaxy.debug("data:",e.data);var i=this._buildFetchFilters(e);return Galaxy.debug("filters:",i),a.isEmpty(i)||a.extend(e.data,this._fetchFiltersToAjaxData(i)),Galaxy.debug("data:",e.data),e},_buildFetchData:function(e){var t={};return this.order&&(t.order=this.order),a.defaults(a.pick(e,this._fetchParams),t)},_fetchParams:["order","limit","offset","view","keys"],_buildFetchFilters:function(e){return a.clone(e.filters||{})},_fetchFiltersToAjaxData:function(e){var t={q:[],qv:[]};return a.each(e,function(e,i){void 0!==e&&""!==e&&(!0===e&&(e="True"),!1===e&&(e="False"),null===e&&(e="None"),t.q.push(i),t.qv.push(e))}),t},reset:function(e,t){return this.allFetched=!1,l.Collection.prototype.reset.call(this,e,t)},order:null,comparators:{update_time:d.default.buildComparator("update_time",{ascending:!1}),"update_time-asc":d.default.buildComparator("update_time",{ascending:!0}),create_time:d.default.buildComparator("create_time",{ascending:!1}),"create_time-asc":d.default.buildComparator("create_time",{ascending:!0})},setOrder:function(e,t){t=t||{};var i=this,n=i.comparators[e];if(a.isUndefined(n))throw new Error("unknown order: "+e);if(n!==i.comparator)return i.order=e,i.comparator=n,t.silent||i.trigger("changed-order",t),i}}),u=c.extend({limitPerPage:500,initialize:function(e,t){c.prototype.initialize.call(this,e,t),this.currentPage=t.currentPage||0},getTotalItemCount:function(){return this.length},shouldPaginate:function(){return this.getTotalItemCount()>=this.limitPerPage},getLastPage:function(){return Math.floor(this.getTotalItemCount()/this.limitPerPage)},getPageCount:function(){return this.getLastPage()+1},getPageLimitOffset:function(e){return e=this.constrainPageNum(e),{limit:this.limitPerPage,offset:e*this.limitPerPage}},constrainPageNum:function(e){return Math.max(0,Math.min(e,this.getLastPage()))},fetchPage:function(e,t){var i=this;return e=i.constrainPageNum(e),i.currentPage=e,t=a.defaults(t||{},i.getPageLimitOffset(e)),i.trigger("fetching-more"),i.fetch(t).always(function(){i.trigger("fetching-more-done")})},fetchCurrentPage:function(e){return this.fetchPage(this.currentPage,e)},fetchPrevPage:function(e){return this.fetchPage(this.currentPage-1,e)},fetchNextPage:function(e){return this.fetchPage(this.currentPage+1,e)}}),h=c.extend({limitOnFirstFetch:null,limitPerFetch:100,initialize:function(e,t){c.prototype.initialize.call(this,e,t),this.limitOnFirstFetch=t.limitOnFirstFetch||this.limitOnFirstFetch,this.limitPerFetch=t.limitPerFetch||this.limitPerFetch,this.allFetched=!1,this.lastFetched=t.lastFetched||0},_buildFetchOptions:function(e){return e.remove=e.remove||!1,c.prototype._buildFetchOptions.call(this,e)},fetchFirst:function(e){return Galaxy.debug("ControlledFetchCollection.fetchFirst:",e),e=e?a.clone(e):{},this.allFetched=!1,this.lastFetched=0,this.fetchMore(a.defaults(e,{reset:!0,limit:this.limitOnFirstFetch}))},fetchMore:function(t){Galaxy.debug("ControlledFetchCollection.fetchMore:",t),t=a.clone(t||{});var i=this;if(Galaxy.debug("fetchMore, options.reset:",t.reset),!t.reset&&i.allFetched)return e.when();t.reset?t.offset=0:void 0===t.offset&&(t.offset=i.lastFetched);var n=t.limit=t.limit||i.limitPerFetch||null;return Galaxy.debug("fetchMore, limit:",n,"offset:",t.offset),i.trigger("fetching-more"),i.fetch(t).always(function(){i.trigger("fetching-more-done")}).done(function(e){var t=a.isArray(e)?e.length:0;i.lastFetched+=t,Galaxy.debug("fetchMore, lastFetched:",i.lastFetched),(!n||t",(0,p.default)(["Pair collections are permanent collections containing two datasets: one forward and one reverse. ","Often these are forward and reverse reads. The pair collections can be passed to tools and ","workflows in order to have analyses done on both datasets. This interface allows ","you to create a pair, name it, and swap which is forward and which reverse."].join("")),"
","",(0,p.default)(['Once your collection is complete, enter a name and ','click "Create list".'].join("")),"
"].join("")),invalidInitial:n.template(['"+JSON.stringify(e.responseJSON)+"":s+=": "+i),n._showAlert(s,"alert-danger")},render:function(e,t){return this.$el.empty().html(this.templates.main()),this._renderHeader(e),this._renderMiddle(e),this._renderFooter(e),this._addPluginComponents(),this.trigger("rendered",this),this},_renderHeader:function(e,t){var i=this.$(".header").empty().html(this.templates.header()).find(".help-content").prepend(a(this.templates.helpContent()));return this._renderFilters(),i},_renderFilters:function(){return this.$(".forward-column .column-header input").val(this.filters[0]).add(this.$(".reverse-column .column-header input").val(this.filters[1]))},_renderMiddle:function(e,t){var i=this.$(".middle").empty().html(this.templates.middle());return this.unpairedPanelHidden?this.$(".unpaired-columns").hide():this.pairedPanelHidden&&this.$(".paired-columns").hide(),this._renderUnpaired(),this._renderPaired(),i},_renderUnpaired:function(e,t){var i,n,s=this,a=[],o=this._splitByFilters();return this.$(".forward-column .title").text([o[0].length,(0,v.default)("unpaired forward")].join(" ")),this.$(".forward-column .unpaired-info").text(this._renderUnpairedDisplayStr(this.unpaired.length-o[0].length)),this.$(".reverse-column .title").text([o[1].length,(0,v.default)("unpaired reverse")].join(" ")),this.$(".reverse-column .unpaired-info").text(this._renderUnpairedDisplayStr(this.unpaired.length-o[1].length)),this.$(".unpaired-columns .column-datasets").empty(),this.$(".autopair-link").toggle(0!==this.unpaired.length),0===this.unpaired.length?void this._renderUnpairedEmpty():(n=o[1].map(function(e,t){return void 0!==o[0][t]&&o[0][t]!==e&&a.push(s._renderPairButton()),s._renderUnpairedDataset(e)}),i=o[0].map(function(e){return s._renderUnpairedDataset(e)}),i.length||n.length?(this.$(".unpaired-columns .forward-column .column-datasets").append(i).add(this.$(".unpaired-columns .paired-column .column-datasets").append(a)).add(this.$(".unpaired-columns .reverse-column .column-datasets").append(n)),void this._adjUnpairedOnScrollbar()):void this._renderUnpairedNotShown())},_renderUnpairedDisplayStr:function(e){return["(",e," ",(0,v.default)("filtered out"),")"].join("")},_renderUnpairedDataset:function(e){return a("").attr("id","dataset-"+e.id).addClass("dataset unpaired").attr("draggable",!0).addClass(e.selected?"selected":"").append(a("").addClass("dataset-name").text(e.name)).data("dataset",e)},_renderPairButton:function(){return a("").addClass("dataset unpaired").append(a("").addClass("dataset-name").text((0,v.default)("Pair these datasets")))},_renderUnpairedEmpty:function(){var e=a('').text("("+(0,v.default)("no remaining unpaired datasets")+")");return this.$(".unpaired-columns .paired-column .column-datasets").empty().prepend(e),e},_renderUnpairedNotShown:function(){var e=a('').text("("+(0,v.default)("no datasets were found matching the current filters")+")");return this.$(".unpaired-columns .paired-column .column-datasets").empty().prepend(e),e},_adjUnpairedOnScrollbar:function(){var e=this.$(".unpaired-columns").last(),t=this.$(".unpaired-columns .reverse-column .dataset").first();if(t.length){var i=e.offset().left+e.outerWidth(),n=t.offset().left+t.outerWidth(),s=Math.floor(i)-Math.floor(n);this.$(".unpaired-columns .forward-column").css("margin-left",s>0?s:0)}},_renderPaired:function(e,t){if(this.$(".paired-column-title .title").text([this.paired.length,(0,v.default)("paired")].join(" ")),this.$(".unpair-all-link").toggle(0!==this.paired.length),0===this.paired.length)return void this._renderPairedEmpty();this.$(".remove-extensions-link").show(),this.$(".paired-columns .column-datasets").empty();var i=this;this.paired.forEach(function(e,t){var n=new w({pair:e});i.$(".paired-columns .column-datasets").append(n.render().$el).append(['"].join(""))})},_renderPairedEmpty:function(){var e=a('').text("("+(0,v.default)("no paired datasets yet")+")");return this.$(".paired-columns .column-datasets").empty().prepend(e),e},footerSettings:{".hide-originals":"hideOriginals",".remove-extensions":"removeExtensions"},_addPluginComponents:function(){this._chooseFiltersPopover(".choose-filters-link"),this.$(".help-content i").hoverhighlight(".collection-creator","rgba( 64, 255, 255, 1.0 )")},_chooseFiltersPopover:function(e){function t(e,t){return['"].join("")}var i=a(n.template(['
",(0,v.default)(["Collections of paired datasets are ordered lists of dataset pairs (often forward and reverse reads). ","These collections can be passed to tools and workflows in order to have analyses done on each member of ","the entire group. This interface allows you to create a collection, choose which datasets are paired, ","and re-order the final collection."].join("")),"
","",(0,v.default)(['Unpaired datasets are shown in the unpaired section ',"(hover over the underlined words to highlight below). ",'Paired datasets are shown in the paired section.',"
",(0,v.default)(["
",(0,v.default)(["To unpair individual dataset pairs, click the ",'unpair buttons ( ). ','Click the "Unpair all" link to unpair all pairs.'].join("")),"
","",(0,v.default)(['You can include or remove the file extensions (e.g. ".fastq") from your pair names by toggling the ','"Remove file extensions from pair names?" control.'].join("")),"
","",(0,v.default)(['Once your collection is complete, enter a name and ','click "Create list". ',"(Note: you do not have to pair all unpaired datasets to finish.)"].join("")),"
"].join(""))})}),b=function(e,t){var i,a=s.Deferred();if(t=n.defaults(t||{},{datasets:e,oncancel:function(){Galaxy.modal.hide(),a.reject("cancelled")},oncreate:function(e,t){Galaxy.modal.hide(),a.resolve(t)},title:(0,v.default)("Create a collection of paired datasets")}),!window.Galaxy||!Galaxy.modal)throw new Error("Galaxy or Galaxy.modal not found");return i=new y(t),Galaxy.modal.show({title:t.title,body:i.$el,width:"80%",height:"800px",closing_events:!0}),i.render(),window.creator=i,a};t.default={PairedCollectionCreator:y,pairedCollectionCreatorModal:b,createListOfPairsCollection:r}}).call(t,i(2),i(1),i(0),i(0))},,,,,,,,,,,,,,,function(e,t,i){"use strict";(function(e){function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var s=i(0),a=n(s),o=i(26),l=n(o),r=i(6),d=n(r),c=a.default,u=e.Router.extend({initialize:function(e,t){this.page=e,this.options=t},push:function(e,t){t=t||{},t.__identifer=Math.random().toString(36).substr(2),e+=-1==e.indexOf("?")?"?":"&",e+=c.param(t,!0),Galaxy.params=t,this.navigate(e,{trigger:!0})},execute:function(e,t,i){Galaxy.debug("router execute:",e,t,i);var n=l.default.parse(t.pop());t.push(n),e&&(this.authenticate(t,i)?e.apply(this,t):this.access_denied())},authenticate:function(e,t){return!0},access_denied:function(){this.page.display(new d.default.Message({status:"danger",message:"You must be logged in with proper credentials to make this request.",persistent:!0}))}});t.default=u}).call(t,i(2))},function(e,t,i){"use strict";(function(e,n,s){Object.defineProperty(t,"__esModule",{value:!0});var a=i(5);!function(e){e&&e.__esModule}(a);t.default=e.View.extend({options:{class_check:"fa-check-square-o",class_uncheck:"fa-square-o",parameters:[{id:"space_to_tab",title:"Convert spaces to tabs"},{id:"to_posix_lines",title:"Use POSIX standard"}]},initialize:function(e){this.model=e.model,this.setElement(n("").addClass("upload-settings")),this.$el.append(n("").addClass("upload-settings-cover")),this.$el.append(n("| Name | Size | Created |
|---|
The length format is two-column, separated by whitespace, of the form:
chrom/contig length of chrom/contig
For example, the first few entries of mm9.len are as follows:
chr1 197195432\nchr2 181748087\nchr3 159599783\nchr4 155630120\nchr5 152537259
Trackster uses this information to populate the select box for chrom/contig, andto set the maximum basepair of the track browser. You may either upload a .len fileof this format (Len File option), or directly enter the information into the box (Len Entry option).
"},_templateFasta:function(){return"This is a multi-fasta file from your current history that provides the genomesequences for each chromosome/contig in your build.
Here is a snippet from an example multi-fasta file:
>chr1\nATTATATATAAGACCACAGAGAGAATATTTTGCCCGG...\n\n>chr2\nGGCGGCCGCGGCGATATAGAACTACTCATTATATATA...\n\n..."}});t.default={View:m}}).call(t,i(2),i(0))},function(e,t,i){"use strict";(function(e,n){Object.defineProperty(t,"__esModule",{value:!0});var s=i(5),a=function(e){return e&&e.__esModule?e:{default:e}}(s),o=e.View.extend({initialize:function(e){this.options=a.default.merge(e,{content:"No content available.",onchange:null,ondblclick:null,onconfirm:null,cls:"ui-table",selectable:!0,cls_tr:""}),this.setElement(this._template()),this.$thead=this.$("thead"),this.$tbody=this.$("tbody"),this.$tmessage=this.$("tmessage"),this.row=this._row(),this.row_count=0},events:{click:"_onclick",dblclick:"_ondblclick"},addHeader:function(e){this.row.append(n("
| Title | Owner |
|---|
| Name | Tags | Owner | # of Steps | Published | Show in tools panel |
|---|
An error occured while running the tool "+i.tool_id+".
"),e.$el.append("Tool execution generated the following messages:
"),e.$el.append(''+i.stderr+""),e.$el.append("
Usually the local Galaxy administrators regularly review errors that occur on the server. However, if you would like to provide additional information (such as what you were trying to do when the error occurred) and a contact e-mail address, we will be better able to investigate your problem and get back to you.
"),e.$el.append(e._getBugFormTemplate(t,i))},display_message:function(e,t,i,n){n?i?t.append(new c.default.UnescapedMessage(e).$el):t.empty().html(new c.default.UnescapedMessage(e).$el):i?t.append(new c.default.Message(e).$el):t.empty().html(new c.default.Message(e).$el)},_templateHeader:function(){return''+this.progressive+"...
";this.modal.$(".modal-body").empty().append(e).css({"margin-top":"8px"})},dialog:function(t,i,a){function o(){var e=t.$("#copy-modal-title").val();if(!e)return void t.$(".invalid-title").show();var n="copy-all"===t.$('input[name="copy-what"]:checked').val();t.$("button").prop("disabled",!0),l._showAjaxIndicator(),i.copy(!0,e,n).done(function(e){r.resolve(e)}).fail(function(t,s,a){var o={name:e,copyAllDatasets:n};d.default.ajaxErrorModal(i,t,o,l.errorMessage),r.rejectWith(r,arguments)}).done(function(){m&&t.hide()})}a=a||{};var l=this,r=n.Deferred(),c=a.nameFn||this.defaultName,h=c({name:i.get("name")}),f=a.allDatasets?"copy-all":"copy-non-deleted",p=!!e.isUndefined(a.allowAll)||a.allowAll,m=!!e.isUndefined(a.autoClose)||a.autoClose;this.modal=t;var g=a.closing_callback;return t.show(e.extend(a,{title:this.title({name:i.get("name")}),body:s(l._template({name:h,isAnon:Galaxy.user.isAnonymous(),allowAll:p,copyWhat:f,activeLabel:this.activeLabel,allLabel:this.allLabel,anonWarning:this.anonWarning})),buttons:e.object([[(0,u.default)("Cancel"),function(){t.hide()}],[this.submitLabel,o]]),height:"auto",closing_events:!0,closing_callback:function(e){e&&r.reject({cancelled:!0}),g&&g(e)}})),t.$("#copy-modal-title").focus().select(),t.$("#copy-modal-title").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),o())}),r}},f=e.extend({},h,{defaultName:e.template("imported: <%- name %>"),title:e.template((0,u.default)("Importing history")+' "<%- name %>"'),submitLabel:(0,u.default)("Import"),errorMessage:(0,u.default)("History could not be imported."),progressive:(0,u.default)("Importing history"),activeLabel:(0,u.default)("Import only the active, non-deleted datasets"),allLabel:(0,u.default)("Import all datasets including deleted ones"),anonWarning:(0,u.default)("As an anonymous user, unless you login or register, you will lose your current history ")+(0,u.default)("after importing this history. ")}),p=function(e,t){t=t||{};var i=window.parent.Galaxy.modal||new l.default.View({});return t.useImport?f.dialog(i,e,t):h.dialog(i,e,t)};t.default=p}).call(t,i(1),i(0),i(0))},function(e,t,i){"use strict";(function(e){function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0});var s=i(1),a=n(s),o=i(2),l=n(o),r=i(4),d=function(e){return e&&e.__esModule?e:{default:e}}(r),c=l.Collection.extend({initialize:function(e,t){l.Collection.prototype.initialize.call(this,e,t),this.setOrder(t.order||this.order,{silent:!0})},_setUpListeners:function(){return this.on({"changed-order":this.sort})},fetch:function(e){return e=this._buildFetchOptions(e),Galaxy.debug("fetch options:",e),l.Collection.prototype.fetch.call(this,e)},_buildFetchOptions:function(e){e=a.clone(e)||{};var t=this;e.traditional=!0,e.data=e.data||t._buildFetchData(e),Galaxy.debug("data:",e.data);var i=this._buildFetchFilters(e);return Galaxy.debug("filters:",i),a.isEmpty(i)||a.extend(e.data,this._fetchFiltersToAjaxData(i)),Galaxy.debug("data:",e.data),e},_buildFetchData:function(e){var t={};return this.order&&(t.order=this.order),a.defaults(a.pick(e,this._fetchParams),t)},_fetchParams:["order","limit","offset","view","keys"],_buildFetchFilters:function(e){return a.clone(e.filters||{})},_fetchFiltersToAjaxData:function(e){var t={q:[],qv:[]};return a.each(e,function(e,i){void 0!==e&&""!==e&&(!0===e&&(e="True"),!1===e&&(e="False"),null===e&&(e="None"),t.q.push(i),t.qv.push(e))}),t},reset:function(e,t){return this.allFetched=!1,l.Collection.prototype.reset.call(this,e,t)},order:null,comparators:{update_time:d.default.buildComparator("update_time",{ascending:!1}),"update_time-asc":d.default.buildComparator("update_time",{ascending:!0}),create_time:d.default.buildComparator("create_time",{ascending:!1}),"create_time-asc":d.default.buildComparator("create_time",{ascending:!0})},setOrder:function(e,t){t=t||{};var i=this,n=i.comparators[e];if(a.isUndefined(n))throw new Error("unknown order: "+e);if(n!==i.comparator)return i.order=e,i.comparator=n,t.silent||i.trigger("changed-order",t),i}}),u=c.extend({limitPerPage:500,initialize:function(e,t){c.prototype.initialize.call(this,e,t),this.currentPage=t.currentPage||0},getTotalItemCount:function(){return this.length},shouldPaginate:function(){return this.getTotalItemCount()>=this.limitPerPage},getLastPage:function(){return Math.floor(this.getTotalItemCount()/this.limitPerPage)},getPageCount:function(){return this.getLastPage()+1},getPageLimitOffset:function(e){return e=this.constrainPageNum(e),{limit:this.limitPerPage,offset:e*this.limitPerPage}},constrainPageNum:function(e){return Math.max(0,Math.min(e,this.getLastPage()))},fetchPage:function(e,t){var i=this;return e=i.constrainPageNum(e),i.currentPage=e,t=a.defaults(t||{},i.getPageLimitOffset(e)),i.trigger("fetching-more"),i.fetch(t).always(function(){i.trigger("fetching-more-done")})},fetchCurrentPage:function(e){return this.fetchPage(this.currentPage,e)},fetchPrevPage:function(e){return this.fetchPage(this.currentPage-1,e)},fetchNextPage:function(e){return this.fetchPage(this.currentPage+1,e)}}),h=c.extend({limitOnFirstFetch:null,limitPerFetch:100,initialize:function(e,t){c.prototype.initialize.call(this,e,t),this.limitOnFirstFetch=t.limitOnFirstFetch||this.limitOnFirstFetch,this.limitPerFetch=t.limitPerFetch||this.limitPerFetch,this.allFetched=!1,this.lastFetched=t.lastFetched||0},_buildFetchOptions:function(e){return e.remove=e.remove||!1,c.prototype._buildFetchOptions.call(this,e)},fetchFirst:function(e){return Galaxy.debug("ControlledFetchCollection.fetchFirst:",e),e=e?a.clone(e):{},this.allFetched=!1,this.lastFetched=0,this.fetchMore(a.defaults(e,{reset:!0,limit:this.limitOnFirstFetch}))},fetchMore:function(t){Galaxy.debug("ControlledFetchCollection.fetchMore:",t),t=a.clone(t||{});var i=this;if(Galaxy.debug("fetchMore, options.reset:",t.reset),!t.reset&&i.allFetched)return e.when();t.reset?t.offset=0:void 0===t.offset&&(t.offset=i.lastFetched);var n=t.limit=t.limit||i.limitPerFetch||null;return Galaxy.debug("fetchMore, limit:",n,"offset:",t.offset),i.trigger("fetching-more"),i.fetch(t).always(function(){i.trigger("fetching-more-done")}).done(function(e){var t=a.isArray(e)?e.length:0;i.lastFetched+=t,Galaxy.debug("fetchMore, lastFetched:",i.lastFetched),(!n||t",(0,p.default)(["Pair collections are permanent collections containing two datasets: one forward and one reverse. ","Often these are forward and reverse reads. The pair collections can be passed to tools and ","workflows in order to have analyses done on both datasets. This interface allows ","you to create a pair, name it, and swap which is forward and which reverse."].join("")),"
","",(0,p.default)(['Once your collection is complete, enter a name and ','click "Create list".'].join("")),"
"].join("")),invalidInitial:n.template(['"+JSON.stringify(e.responseJSON)+"":s+=": "+i),n._showAlert(s,"alert-danger")},render:function(e,t){return this.$el.empty().html(this.templates.main()),this._renderHeader(e),this._renderMiddle(e),this._renderFooter(e),this._addPluginComponents(),this.trigger("rendered",this),this},_renderHeader:function(e,t){var i=this.$(".header").empty().html(this.templates.header()).find(".help-content").prepend(a(this.templates.helpContent()));return this._renderFilters(),i},_renderFilters:function(){return this.$(".forward-column .column-header input").val(this.filters[0]).add(this.$(".reverse-column .column-header input").val(this.filters[1]))},_renderMiddle:function(e,t){var i=this.$(".middle").empty().html(this.templates.middle());return this.unpairedPanelHidden?this.$(".unpaired-columns").hide():this.pairedPanelHidden&&this.$(".paired-columns").hide(),this._renderUnpaired(),this._renderPaired(),i},_renderUnpaired:function(e,t){var i,n,s=this,a=[],o=this._splitByFilters();return this.$(".forward-column .title").text([o[0].length,(0,v.default)("unpaired forward")].join(" ")),this.$(".forward-column .unpaired-info").text(this._renderUnpairedDisplayStr(this.unpaired.length-o[0].length)),this.$(".reverse-column .title").text([o[1].length,(0,v.default)("unpaired reverse")].join(" ")),this.$(".reverse-column .unpaired-info").text(this._renderUnpairedDisplayStr(this.unpaired.length-o[1].length)),this.$(".unpaired-columns .column-datasets").empty(),this.$(".autopair-link").toggle(0!==this.unpaired.length),0===this.unpaired.length?void this._renderUnpairedEmpty():(n=o[1].map(function(e,t){return void 0!==o[0][t]&&o[0][t]!==e&&a.push(s._renderPairButton()),s._renderUnpairedDataset(e)}),i=o[0].map(function(e){return s._renderUnpairedDataset(e)}),i.length||n.length?(this.$(".unpaired-columns .forward-column .column-datasets").append(i).add(this.$(".unpaired-columns .paired-column .column-datasets").append(a)).add(this.$(".unpaired-columns .reverse-column .column-datasets").append(n)),void this._adjUnpairedOnScrollbar()):void this._renderUnpairedNotShown())},_renderUnpairedDisplayStr:function(e){return["(",e," ",(0,v.default)("filtered out"),")"].join("")},_renderUnpairedDataset:function(e){return a("").attr("id","dataset-"+e.id).addClass("dataset unpaired").attr("draggable",!0).addClass(e.selected?"selected":"").append(a("").addClass("dataset-name").text(e.name)).data("dataset",e)},_renderPairButton:function(){return a("").addClass("dataset unpaired").append(a("").addClass("dataset-name").text((0,v.default)("Pair these datasets")))},_renderUnpairedEmpty:function(){var e=a('').text("("+(0,v.default)("no remaining unpaired datasets")+")");return this.$(".unpaired-columns .paired-column .column-datasets").empty().prepend(e),e},_renderUnpairedNotShown:function(){var e=a('').text("("+(0,v.default)("no datasets were found matching the current filters")+")");return this.$(".unpaired-columns .paired-column .column-datasets").empty().prepend(e),e},_adjUnpairedOnScrollbar:function(){var e=this.$(".unpaired-columns").last(),t=this.$(".unpaired-columns .reverse-column .dataset").first();if(t.length){var i=e.offset().left+e.outerWidth(),n=t.offset().left+t.outerWidth(),s=Math.floor(i)-Math.floor(n);this.$(".unpaired-columns .forward-column").css("margin-left",s>0?s:0)}},_renderPaired:function(e,t){if(this.$(".paired-column-title .title").text([this.paired.length,(0,v.default)("paired")].join(" ")),this.$(".unpair-all-link").toggle(0!==this.paired.length),0===this.paired.length)return void this._renderPairedEmpty();this.$(".remove-extensions-link").show(),this.$(".paired-columns .column-datasets").empty();var i=this;this.paired.forEach(function(e,t){var n=new w({pair:e});i.$(".paired-columns .column-datasets").append(n.render().$el).append(['"].join(""))})},_renderPairedEmpty:function(){var e=a('').text("("+(0,v.default)("no paired datasets yet")+")");return this.$(".paired-columns .column-datasets").empty().prepend(e),e},footerSettings:{".hide-originals":"hideOriginals",".remove-extensions":"removeExtensions"},_addPluginComponents:function(){this._chooseFiltersPopover(".choose-filters-link"),this.$(".help-content i").hoverhighlight(".collection-creator","rgba( 64, 255, 255, 1.0 )")},_chooseFiltersPopover:function(e){function t(e,t){return['"].join("")}var i=a(n.template(['
",(0,v.default)(["Collections of paired datasets are ordered lists of dataset pairs (often forward and reverse reads). ","These collections can be passed to tools and workflows in order to have analyses done on each member of ","the entire group. This interface allows you to create a collection, choose which datasets are paired, ","and re-order the final collection."].join("")),"
","",(0,v.default)(['Unpaired datasets are shown in the unpaired section ',"(hover over the underlined words to highlight below). ",'Paired datasets are shown in the paired section.',"
",(0,v.default)(["
",(0,v.default)(["To unpair individual dataset pairs, click the ",'unpair buttons ( ). ','Click the "Unpair all" link to unpair all pairs.'].join("")),"
","",(0,v.default)(['You can include or remove the file extensions (e.g. ".fastq") from your pair names by toggling the ','"Remove file extensions from pair names?" control.'].join("")),"
","",(0,v.default)(['Once your collection is complete, enter a name and ','click "Create list". ',"(Note: you do not have to pair all unpaired datasets to finish.)"].join("")),"
"].join(""))})}),b=function(e,t){var i,a=s.Deferred();if(t=n.defaults(t||{},{datasets:e,oncancel:function(){Galaxy.modal.hide(),a.reject("cancelled")},oncreate:function(e,t){Galaxy.modal.hide(),a.resolve(t)},title:(0,v.default)("Create a collection of paired datasets")}),!window.Galaxy||!Galaxy.modal)throw new Error("Galaxy or Galaxy.modal not found");return i=new y(t),Galaxy.modal.show({title:t.title,body:i.$el,width:"80%",height:"800px",closing_events:!0}),i.render(),window.creator=i,a};t.default={PairedCollectionCreator:y,pairedCollectionCreatorModal:b,createListOfPairsCollection:r}}).call(t,i(2),i(1),i(0),i(0))},,,,,,,,,,,,,,,function(e,t,i){"use strict";(function(e){function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var s=i(0),a=n(s),o=i(26),l=n(o),r=i(6),d=n(r),c=a.default,u=e.Router.extend({initialize:function(e,t){this.page=e,this.options=t},push:function(e,t){t=t||{},t.__identifer=Math.random().toString(36).substr(2),e+=-1==e.indexOf("?")?"?":"&",e+=c.param(t,!0),Galaxy.params=t,this.navigate(e,{trigger:!0})},execute:function(e,t,i){Galaxy.debug("router execute:",e,t,i);var n=l.default.parse(t.pop());t.push(n),e&&(this.authenticate(t,i)?e.apply(this,t):this.access_denied())},authenticate:function(e,t){return!0},access_denied:function(){this.page.display(new d.default.Message({status:"danger",message:"You must be logged in with proper credentials to make this request.",persistent:!0}))}});t.default=u}).call(t,i(2))},function(e,t,i){"use strict";(function(e,n,s){Object.defineProperty(t,"__esModule",{value:!0});var a=i(5);!function(e){e&&e.__esModule}(a);t.default=e.View.extend({options:{class_check:"fa-check-square-o",class_uncheck:"fa-square-o",parameters:[{id:"space_to_tab",title:"Convert spaces to tabs"},{id:"to_posix_lines",title:"Use POSIX standard"}]},initialize:function(e){this.model=e.model,this.setElement(n("").addClass("upload-settings")),this.$el.append(n("").addClass("upload-settings-cover")),this.$el.append(n("| Name | Size | Created |
|---|
The length format is two-column, separated by whitespace, of the form:
chrom/contig length of chrom/contig
For example, the first few entries of mm9.len are as follows:
chr1 197195432\nchr2 181748087\nchr3 159599783\nchr4 155630120\nchr5 152537259
Trackster uses this information to populate the select box for chrom/contig, andto set the maximum basepair of the track browser. You may either upload a .len fileof this format (Len File option), or directly enter the information into the box (Len Entry option).
"},_templateFasta:function(){return"This is a multi-fasta file from your current history that provides the genomesequences for each chromosome/contig in your build.
Here is a snippet from an example multi-fasta file:
>chr1\nATTATATATAAGACCACAGAGAGAATATTTTGCCCGG...\n\n>chr2\nGGCGGCCGCGGCGATATAGAACTACTCATTATATATA...\n\n..."}});t.default={View:m}}).call(t,i(2),i(0))},function(e,t,i){"use strict";(function(e,n){Object.defineProperty(t,"__esModule",{value:!0});var s=i(5),a=function(e){return e&&e.__esModule?e:{default:e}}(s),o=e.View.extend({initialize:function(e){this.options=a.default.merge(e,{content:"No content available.",onchange:null,ondblclick:null,onconfirm:null,cls:"ui-table",selectable:!0,cls_tr:""}),this.setElement(this._template()),this.$thead=this.$("thead"),this.$tbody=this.$("tbody"),this.$tmessage=this.$("tmessage"),this.row=this._row(),this.row_count=0},events:{click:"_onclick",dblclick:"_ondblclick"},addHeader:function(e){this.row.append(n("
| Title | Owner |
|---|
| Name | Tags | Owner | # of Steps | Published | Show in tools panel |
|---|
An error occured while running the tool "+i.tool_id+".
"),e.$el.append("Tool execution generated the following messages:
"),e.$el.append(''+i.stderr+""),e.$el.append("
Usually the local Galaxy administrators regularly review errors that occur on the server. However, if you would like to provide additional information (such as what you were trying to do when the error occurred) and a contact e-mail address, we will be better able to investigate your problem and get back to you.
"),e.$el.append(e._getBugFormTemplate(t,i))},display_message:function(e,t,i,n){n?i?t.append(new c.default.UnescapedMessage(e).$el):t.empty().html(new c.default.UnescapedMessage(e).$el):i?t.append(new c.default.Message(e).$el):t.empty().html(new c.default.Message(e).$el)},_templateHeader:function(){return'm?s.left>v&&(k=Math.min(23,s.left-v),o.css("left",s.left-k),x=!0):a-5 s(d,h)&&(h=t):s(t,h)>s(d,h)&&(d=t):h>=d?(t _&&(_=d.x),d.y>v&&(v=d.y),u.push(d.x),h.push(d.y);else for(f=0;f _&&(_=w),x>v&&(v=x),u.push(w),h.push(x)}var k=_-g,M=v-m;k>M?v=m+k:_=g+M;var C=_i();if(C.add=function(e){a(C,e,+y(e,++f),+b(e,f),g,m,_,v)},C.visit=function(e){vi(e,C,g,m,_,v)},C.find=function(e){return yi(C,e[0],e[1],g,m,_,v)},f=-1,null==t){for(;++f =0?e.slice(0,t):e,i=t>=0?e.slice(t+1):"in";return n=ml.get(n)||gl,i=_l.get(i)||k,Si(i(n.apply(null,po.call(arguments,1))))},fo.interpolateHcl=$i,fo.interpolateHsl=zi,fo.interpolateLab=Hi,fo.interpolateRound=Vi,fo.transform=function(e){var t=mo.createElementNS(fo.ns.prefix.svg,"g");return(fo.transform=function(e){if(null!=e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate()}return new Yi(n?n.matrix:vl)})(e)},Yi.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var vl={a:1,b:0,c:0,d:1,e:0,f:0};fo.interpolateTransform=Ki,fo.layout={},fo.layout.bundle=function(){return function(e){for(var t=[],n=-1,i=e.length;++n0?r=e:(n.c=null,n.t=NaN,n=null,c.end({type:"end",alpha:r=0})):e>0&&(c.start({type:"start",alpha:r=e}),n=Pe(l.tick)),l):r},l.start=function(){function e(e,i){if(!n){for(n=new Array(r),l=0;l You can set extension type and genome for all imported datasets at once: You can set extension type and genome for all imported datasets at once: 2. Choose the datasets to import:").attr("src",Galaxy.root+"static/images/fugue/asterisk-small-outline.png").click(function(){var e=t.output.name;i.isWorkflowOutput(e)?(i.removeWorkflowOutput(e),t.$("img").attr("src",Galaxy.root+"static/images/fugue/asterisk-small-outline.png")):(i.addWorkflowOutput(e),t.$("img").attr("src",Galaxy.root+"static/images/fugue/asterisk-small.png")),window.workflow_globals.workflow.has_changes=!0,window.workflow_globals.canvas_manager.draw_overview()}))).tooltip({delay:500,title:"Mark dataset as a workflow output. All unmarked datasets will be hidden."}),this.$el.css({top:"50%",margin:"-8px 0px 0px 0px",right:8}),this.$el.show(),this.resetImage()},resetImage:function(){this.node.isWorkflowOutput(this.output.name)?this.$("img").attr("src",Galaxy.root+"static/images/fugue/asterisk-small.png"):this.$("img").attr("src",Galaxy.root+"static/images/fugue/asterisk-small-outline.png")},hoverImage:function(){this.$("img").attr("src",Galaxy.root+"static/images/fugue/asterisk-small-yellow.png")}});t.default={DataInputView:i,DataOutputView:r}}).call(t,n(2),n(0))},function(e,t,n){"use strict";(function(e,i){function r(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.model.attributes,n=t.workflow,i=t.node;t.inputs.unshift({type:"text",name:"__annotation",label:"Annotation",fixed:!0,value:i.annotation,area:!0,help:"Add an annotation or notes to this step. Annotations are available when a workflow is viewed."}),t.inputs.unshift({type:"text",name:"__label",label:"Label",value:i.label,help:(0,d.default)("Add a step label."),fixed:!0,onchange:function(t){var r=!1;for(var a in n.nodes){var o=n.nodes[a];if(o.label&&o.label==t&&o.id!=i.id){r=!0;break}}var s=e.data.match("__label");e.element_list[s].model.set("error_text",r&&"Duplicate label. Please fix this before saving the workflow."),e.trigger("change")}})}function o(e,t,n,i){var r=i.node.post_job_actions;t=t||[],t.push(e);for(var a in e.inputs){var s=e.inputs[a];if(s.action){if(s.name="pja__"+n+"__"+s.action,s.pja_arg&&(s.name+="__"+s.pja_arg),s.payload)for(var l in s.payload)s.payload[s.name+"__"+l]=s.payload[l],delete s.payload[l];var c=r[s.action+n];if(c){for(var d in t)t[d].expanded=!0;s.pja_arg?s.value=c.action_arguments&&c.action_arguments[s.pja_arg]||s.value:s.value="true"}}s.inputs&&o(s,t.slice(0),n,i)}}function s(e,t){var n=[],i=[],r=t.datatypes,a=t.node,s=t.workflow;for(var l in r)n.push({0:r[l],1:r[l]});for(l in a.input_terminals)i.push(a.input_terminals[l].name);n.sort(function(e,t){return e.label>t.label?1:e.label
=1?1:e(t)}}function Ti(e){return function(t){return 1-e(1-t)}}function Ei(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function ji(e){return e*e}function Ai(e){return e*e*e}function Ni(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}function Li(e){return function(t){return Math.pow(t,e)}}function Ii(e){return 1-Math.cos(e*Go)}function Di(e){return Math.pow(2,10*(e-1))}function Oi(e){return 1-Math.sqrt(1-e*e)}function Pi(e,t){var n;return arguments.length<2&&(t=.45),arguments.length?n=t/Yo*Math.asin(1/e):(e=1,n=t/4),function(i){return 1+e*Math.pow(2,-10*i)*Math.sin((i-n)*Yo/t)}}function Wi(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}}function Ri(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function $i(e,t){e=fo.hcl(e),t=fo.hcl(t);var n=e.h,i=e.c,r=e.l,a=t.h-n,o=t.c-i,s=t.l-r;return isNaN(o)&&(o=0,i=isNaN(i)?t.c:i),isNaN(a)?(a=0,n=isNaN(n)?t.h:n):a>180?a-=360:a<-180&&(a+=360),function(e){return ge(n+a*e,i+o*e,r+s*e)+""}}function zi(e,t){e=fo.hsl(e),t=fo.hsl(t);var n=e.h,i=e.s,r=e.l,a=t.h-n,o=t.s-i,s=t.l-r;return isNaN(o)&&(o=0,i=isNaN(i)?t.s:i),isNaN(a)?(a=0,n=isNaN(n)?t.h:n):a>180?a-=360:a<-180&&(a+=360),function(e){return fe(n+a*e,i+o*e,r+s*e)+""}}function Hi(e,t){e=fo.lab(e),t=fo.lab(t);var n=e.l,i=e.a,r=e.b,a=t.l-n,o=t.a-i,s=t.b-r;return function(e){return _e(n+a*e,i+o*e,r+s*e)+""}}function Vi(e,t){return t-=e,function(n){return Math.round(e+t*n)}}function Yi(e){var t=[e.a,e.b],n=[e.c,e.d],i=Gi(t),r=Fi(t,n),a=Gi(Ui(n,t,-r))||0;t[0]*n[1]l;d--);o=o.slice(c,d)}return o},o.tickFormat=function(e,n){if(!arguments.length)return Tl;arguments.length<2?n=Tl:"function"!=typeof n&&(n=fo.format(n));var i=Math.max(1,t*e/o.ticks().length);return function(e){var o=e/a(Math.round(r(e)));return o*t=0&&"xmlns"!==(n=e.slice(0,t))&&(e=e.slice(t+1)),Do.hasOwnProperty(n)?{space:Do[n],local:e}:e}},Lo.attr=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node();return e=fo.ns.qualify(e),e.local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(O(t,e[t]));return this}return this.each(O(e,t))},Lo.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node(),i=(e=R(e)).length,r=-1;if(t=n.classList){for(;++r=0;)(n=i[r])&&(a&&a!==n.nextSibling&&a.parentNode.insertBefore(n,a),a=n);return this},Lo.sort=function(e){e=q.apply(this,arguments);for(var t=-1,n=this.length;++t0&&($r(Hr(o,e,n),e,i),c+=i,d+=i),u+=o.m,c+=r.m,h+=l.m,d+=a.m;o&&!Rr(a)&&(a.t=o,a.m+=u-d),r&&!Wr(l)&&(l.t=r,l.m+=c-h,n=e)}return n}function a(e){e.x*=l[0],e.y=e.depth*l[1]}var o=fo.layout.hierarchy().sort(null).value(null),s=Pr,l=[1,1],c=null;return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(c=null==(l=t)?a:null,e):c?null:l},e.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:a,e):c?l:null},cr(e,o)},fo.layout.cluster=function(){function e(e,a){var o,s=t.call(this,e,a),l=s[0],c=0;ur(l,function(e){var t=e.children;t&&t.length?(e.x=Yr(t),e.y=Vr(t)):(e.x=o?c+=n(e,o):0,e.y=0,o=e)});var d=Fr(l),u=Gr(l),h=d.x-n(d,u)/2,f=u.x+n(u,d)/2;return ur(l,r?function(e){e.x=(e.x-l.x)*i[0],e.y=(l.y-e.y)*i[1]}:function(e){e.x=(e.x-h)/(f-h)*i[0],e.y=(1-(l.y?e.y/l.y:1))*i[1]}),s}var t=fo.layout.hierarchy().sort(null).value(null),n=Pr,i=[1,1],r=!1;return e.separation=function(t){return arguments.length?(n=t,e):n},e.size=function(t){return arguments.length?(r=null==(i=t),e):r?null:i},e.nodeSize=function(t){return arguments.length?(r=null!=(i=t),e):r?i:null},cr(e,t)},fo.layout.treemap=function(){function e(e,t){for(var n,i,r=-1,a=e.length;++r0;)d.push(o=h[l-1]),d.area+=o.area,"squarify"!==f||(s=i(d,g))<=p?(h.pop(),p=s):(d.area-=d.pop().area,r(d,g,c,!1),g=Math.min(c.dx,c.dy),d.length=d.area=0,p=1/0);d.length&&(r(d,g,c,!0),d.length=d.area=0),a.forEach(t)}}function n(t){var i=t.children;if(i&&i.length){var a,o=u(t),s=i.slice(),l=[];for(e(s,o.dx*o.dy/t.value),l.area=0;a=s.pop();)l.push(a),l.area+=a.area,null!=a.z&&(r(l,a.z?o.dx:o.dy,o,!s.length),l.length=l.area=0);i.forEach(n)}}function i(e,t){for(var n,i=e.area,r=0,a=1/0,o=-1,s=e.length;++or&&(r=n));return i*=i,t*=t,i?Math.max(t*r*p/i,i/(t*a*p)):1/0}function r(e,t,n,i){var r,a=-1,o=e.length,s=n.x,c=n.y,d=t?l(e.area/t):0;if(t==n.dx){for((i||d>n.dy)&&(d=n.dy);++a
Annotation1: "+t+(e.bootstrap?"
Confidence level: "+Math.round(100*e.bootstrap):""):""}).tooltip({placement:"top",trigger:"hover"})}}),b=y.extend({initialize:function(e){var t=this;t.margins=e.margins,t.layoutMode="Linear",t.stdInit(e),t.layout(),t.updateAndRender(t.model.root)},layout:function(){var e=this;e.tree=(new o).layoutMode("Linear"),e.diagonal=d.svg.diagonal().projection(function(e){return[e.y,e.x]})},renderNodes:function(e){var t=this,n=t.model.get("fontSize")+"px";t.tree.separation(t.model.get("separation")).leafHeight(t.model.get("leafHeight"));var i=t.tree.separation(t.model.get("separation")).nodes(t.model.root),r=t.vis.selectAll("g.node").data(i,function(e){return e.name+e.id||(e.id=++t.i)});t.nodes=i,t.duration=500;var a=r.enter().append("svg:g").attr("class","node").on("dblclick",function(){d.event.stopPropagation()}).on("click",function(e){if(d.event.altKey)t.selectNode(e);else{if(e.children&&0===e.children.length)return;t.model.toggle(e),t.updateAndRender(e)}});"[object Array]"===toString.call(e)&&(e=e[0]),a.attr("transform",function(t){return"translate("+e.y0+","+e.x0+")"}),a.append("svg:circle").attr("r",1e-6).style("fill",function(e){return e._children?"lightsteelblue":"#fff"}),a.append("svg:text").attr("class","nodeLabel").attr("x",function(e){return e.children||e._children?-10:10}).attr("dy",".35em").attr("text-anchor",function(e){return e.children||e._children?"end":"start"}).style("fill-opacity",1e-6);var o=r.transition().duration(500);o.attr("transform",function(e){return"translate("+e.y+","+e.x+")"}),o.select("circle").attr("r",t.defaults.nodeRadius).style("fill",function(e){return e._children?"lightsteelblue":"#fff"}),o.select("text").style("fill-opacity",1).style("font-size",n).text(function(e){return e.name&&""!==e.name?e.name:e.bootstrap?Math.round(100*e.bootstrap):""});var s=r.exit().transition().duration(500).remove();s.select("circle").attr("r",1e-6),s.select("text").style("fill-opacity",1e-6),i.forEach(function(e){e.x0=e.x,e.y0=e.y})}}),w=e.View.extend({className:"phyloviz",initialize:function(e){var t=this;t.MIN_SCALE=.05,t.MAX_SCALE=5,t.MAX_DISPLACEMENT=500,t.margins=[10,60,10,80],t.width=r("#PhyloViz").width(),t.height=r("#PhyloViz").height(),t.radius=t.width,t.data=e.data,r(window).resize(function(){t.width=r("#PhyloViz").width(),t.height=r("#PhyloViz").height(),t.render()}),t.phyloTree=new v(e.config),t.phyloTree.root=t.data,t.zoomFunc=d.behavior.zoom().scaleExtent([t.MIN_SCALE,t.MAX_SCALE]),t.zoomFunc.translate(t.phyloTree.get("translate")),t.zoomFunc.scale(t.phyloTree.get("scaleFactor")),t.navMenu=new x(t),t.settingsMenu=new k({phyloTree:t.phyloTree}),t.nodeSelectionView=new M({phyloTree:t.phyloTree}),t.search=new C,setTimeout(function(){t.zoomAndPan()},1e3)},render:function(){var e=this;r("#PhyloViz").empty(),e.mainSVG=d.select("#PhyloViz").append("svg:svg").attr("width",e.width).attr("height",e.height).attr("pointer-events","all").call(e.zoomFunc.on("zoom",function(){e.zoomAndPan()})),e.boundingRect=e.mainSVG.append("svg:rect").attr("class","boundingRect").attr("width",e.width).attr("height",e.height).attr("stroke","black").attr("fill","white"),e.vis=e.mainSVG.append("svg:g").attr("class","vis"),e.layoutOptions={model:e.phyloTree,width:e.width,height:e.height,vis:e.vis,margins:e.margins},r("#title").text("Phylogenetic Tree from "+e.phyloTree.get("title")+":");new b(e.layoutOptions)},zoomAndPan:function(e){var t,n;void 0!==e&&(t=e.zoom,n=e.translate);var i=this,r=i.zoomFunc.scale(),a=i.zoomFunc.translate(),o="",s="";switch(t){case"reset":r=1,a=[0,0];break;case"+":r*=1.1;break;case"-":r*=.9;break;default:"number"==typeof t?r=t:null!==d.event&&(r=d.event.scale)}if(!(r").addClass("settings").appendTo(this.$el),r=i("").addClass("track-info").hide().appendTo(n);r.append(i("").css("font-weight","bold").text("Track Settings")),e.get("inputs").each(function(e){r.append(e.get("label")+": "+t[e.get("name")]+"
")});var a=this,o=(i("").appendTo(r).text("Run on complete dataset").click(function(){r.toggle(),a.trigger("run_on_dataset",e)}),M.default.create_icon_buttons_menu([{title:(0,s.default)("Settings"),icon_class:"gear track-settings",on_click:function(){r.toggle()}},{title:(0,s.default)("Remove"),icon_class:"cross-circle",on_click:function(){a.$el.remove(),i(".tooltip").remove()}}]));n.prepend(o.$el),this.model.get("regions").each(function(){a.$el.append(i("").addClass("tile").html(i(" ").attr("src",Galaxy.root+"images/loading_large_white_bg.gif")))}),this.model.get("track")&&this.draw_tiles()},draw_tiles:function(){var e=this,t=this.model.get("track"),n=this.model.get("regions"),r=this.$el.find("td.tile");t&&i.when(t.data_manager.data_is_ready()).then(function(a){n.each(function(n,a){var o=n.length()/e.TILE_LEN,s=1/o,l=e.model.get("mode");i.when(t.data_manager.get_data(n,l,o,{})).then(function(o){var c=e.canvas_manager.new_canvas();c.width=e.TILE_LEN,c.height=t.get_canvas_height(o,l,s,c.width),t.draw_tile(o,c.getContext("2d"),l,n,s),i(r[a]).empty().append(c)})})})}}),N=e.View.extend({number_input_template:'
Getting Started
").addClass("tracks"),this.model.get("parameter_tree").on("change:tree_data",this.handle_node_clicks,this);var t=this;this.model.get("tracks").each(function(e){e.get("track").view=t}),this.config=x.default.ConfigSettingCollection.from_models_and_saved_values([{key:"name",label:"Name",type:"text",default_value:""},{key:"a_color",label:"A Color",type:"color",default_value:"#FF0000"},{key:"c_color",label:"C Color",type:"color",default_value:"#00FF00"},{key:"g_color",label:"G Color",type:"color",default_value:"#0000FF"},{key:"t_color",label:"T Color",type:"color",default_value:"#FF00FF"},{key:"n_color",label:"N Color",type:"color",default_value:"#AAAAAA"},{key:"block_color",label:"Block color",type:"color"},{key:"reverse_strand_color",label:"Antisense strand color",type:"color"}],{})},render:function(){var e=new L({model:this.model.get("parameter_tree")});i("#left").append(e.$el);var t=this,n=t.model.get("regions"),r=i("
").appendTo(this.track_collection_container);n.each(function(e){r.append(i(" ").text(e.toString()))}),r.children().first().attr("colspan",2);var a=i(" ',"",'
",'"].join(""))}});t.default={FolderListView:h}}).call(t,n(2),n(1),n(0))},function(e,t,n){"use strict";(function(e,i,r){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),s=a(o),l=n(18),c=a(l),d=n(138),u=a(d),h=e.View.extend({events:{"click .undelete_dataset_btn":"undeleteDataset","click .undelete_folder_btn":"undeleteFolder","click .edit_folder_btn":"startModifications","click .cancel_folder_btn":"cancelModifications","click .save_folder_btn":"saveModifications"},defaults:{type:null,visibility_config:{edit_folder_btn:!1,save_folder_btn:!1,cancel_folder_btn:!1,permission_folder_btn:!1},edit_mode:!1},initialize:function(e){this.options=i.defaults(e||{},this.defaults),this.render(this.options)},render:function(e){this.options=i.extend(this.options,e);var t=this.options.model,n=null;return"folder"===t.get("type")||"LibraryFolder"===t.get("model_class")?(this.options.type="folder",this.prepareButtons(t),n=t.get("deleted")?this.templateRowDeletedFolder():this.templateRowFolder()):"file"===t.get("type")||"LibraryDatasetDatasetAssociation"===t.get("model_class")||"LibraryDataset"===t.get("model_class")?(this.options.type="file",n=t.get("deleted")?this.templateRowDeletedFile():this.templateRowFile()):(Galaxy.emit.error("Unknown library item type found."),Galaxy.emit.error(t.get("type")||t.get("model_class"))),this.setElement(n({content_item:t,edit_mode:this.options.edit_mode,button_config:this.options.visibility_config})),this.$el.show(),this},prepareButtons:function(e){var t=this.options.visibility_config;!1===this.options.edit_mode?(t.save_folder_btn=!1,t.cancel_folder_btn=!1,!0===e.get("deleted")?(t.edit_folder_btn=!1,t.permission_folder_btn=!1):!1===e.get("deleted")&&(t.save_folder_btn=!1,t.cancel_folder_btn=!1,!0===e.get("can_modify")&&(t.edit_folder_btn=!0),!0===e.get("can_manage")&&(t.permission_folder_btn=!0))):!0===this.options.edit_mode&&(t.edit_folder_btn=!1,t.permission_folder_btn=!1,t.save_folder_btn=!0,t.cancel_folder_btn=!0),this.options.visibility_config=t},showDatasetDetails:function(){Galaxy.libraries.datasetView=new u.default.LibraryDatasetView({id:this.id})},undeleteDataset:function(e){r(".tooltip").hide();var t=this,n=r(e.target).closest("tr").data("id"),i=Galaxy.libraries.folderListView.collection.get(n);i.url=i.urlRoot+i.id+"?undelete=true",i.destroy({success:function(e,i){Galaxy.libraries.folderListView.collection.remove(n);var r=new c.default.Item(i);Galaxy.libraries.folderListView.collection.add(r),Galaxy.libraries.folderListView.collection.sortFolder("name","asc"),s.default.success("Dataset undeleted. Click this to see it.","",{onclick:function(){var e=t.model.get("folder_id");window.location=Galaxy.root+"library/list#folders/"+e+"/datasets/"+t.id}})},error:function(e,t){void 0!==t.responseJSON?s.default.error("Dataset was not undeleted. "+t.responseJSON.err_msg):s.default.error("An error occured! Dataset was not undeleted. Please try again.")}})},undeleteFolder:function(e){r(".tooltip").hide();var t=r(e.target).closest("tr").data("id"),n=Galaxy.libraries.folderListView.collection.get(t);n.url=n.urlRoot+n.id+"?undelete=true",n.destroy({success:function(e,n){Galaxy.libraries.folderListView.collection.remove(t);var i=new c.default.FolderAsModel(n);Galaxy.libraries.folderListView.collection.add(i),Galaxy.libraries.folderListView.collection.sortFolder("name","asc"),s.default.success("Folder undeleted.")},error:function(e,t){void 0!==t.responseJSON?s.default.error("Folder was not undeleted. "+t.responseJSON.err_msg):s.default.error("An error occured! Folder was not undeleted. Please try again.")}})},startModifications:function(){this.options.edit_mode=!0,this.repaint()},cancelModifications:function(){this.options.edit_mode=!1,this.repaint()},saveModifications:function(){var e=Galaxy.libraries.folderListView.collection.get(this.$el.data("id")),t=!1,n=this.$el.find(".input_folder_name").val();if(void 0!==n&&n!==e.get("name")){if(!(n.length>2))return void s.default.warning("Folder name has to be at least 3 characters long.");e.set("name",n),t=!0}var i=this.$el.find(".input_folder_description").val();if(void 0!==i&&i!==e.get("description")&&(e.set("description",i),t=!0),t){var r=this;e.save(null,{patch:!0,success:function(e){r.options.edit_mode=!1,r.repaint(e),s.default.success("Changes to folder saved.")},error:function(e,t){void 0!==t.responseJSON?s.default.error(t.responseJSON.err_msg):s.default.error("An error occured while attempting to update the folder.")}})}else this.options.edit_mode=!1,this.repaint(e),s.default.info("Nothing has changed.")},repaint:function(){r(".tooltip").hide();var e=this.$el;this.render(),e.replaceWith(this.$el),this.$el.find("[data-toggle]").tooltip()},templateRowFolder:function(){return i.template(['',' ',' name ','description ','data type ','size ','time updated (UTC) ','state ',' ',"",'',' '," ","","",'" title="Go to parent folder" class="btn_open_folder btn btn-default btn-xs">..'," ",""," "," "," "," "," "," "," "," '," "].join(""))},templateRowFile:function(){return i.template(['",''," ",'',"<% if(!edit_mode) { %>"," ",'<%- content_item.get("name") %>'," ","",'<%- content_item.get("description") %>'," ","<% } else if(edit_mode){ %>",'',' ',"<% } %>"," folder ",""," ",'<%= _.escape(content_item.get("update_time")) %>'," ",""," ","<% if(edit_mode) { %>",'",'","<% } else if (!edit_mode){%>",'",'','","","<% } %>"," ","'," "].join(""))},templateRowDeletedFile:function(){return i.template(['",''," ",'',''," ","",'/datasets/<%- content_item.id %>" class="library-dataset">','<%- content_item.get("name") %>',""," ",'<%- content_item.get("message") %> ','<%= _.escape(content_item.get("file_ext")) %> ','<%= _.escape(content_item.get("file_size")) %> ','<%= _.escape(content_item.get("update_time")) %> ',"",'<% if ( content_item.get("state") !== "ok" ) { %>','<%= _.escape(content_item.get("state")) %>',"<% } %>"," ","",'<% if (content_item.get("is_unrestricted")) { %>','',"<% } %>",'<% if (content_item.get("is_private")) { %>','',"<% } %>",'<% if ((content_item.get("is_unrestricted") === false) && (content_item.get("is_private") === false)) { %>','',"<% } %>",'<% if (content_item.get("can_manage")) { %>','/datasets/<%- content_item.id %>/permissions">','","","<% } %>"," ","'," "].join(""))},templateRowDeletedFolder:function(){return i.template(['",''," ","",' ','<%- content_item.get("name") %>'," ","",'<%- content_item.get("message") %>'," ","",'<%= _.escape(content_item.get("file_ext")) %>'," ","",'<%= _.escape(content_item.get("file_size")) %>'," ","",'<%= _.escape(content_item.get("update_time")) %>'," ","",'<% if ( content_item.get("state") !== "ok" ) { %>','<%= _.escape(content_item.get("state")) %>',"<% } %>"," ","",'','"," ","'," "].join(""))}});t.default={FolderRowView:h}}).call(t,n(2),n(1),n(0))},function(e,t,n){"use strict";(function(e,i){function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(7),o=r(a),s=n(18),l=r(s),c=n(320),d=r(c),u=n(1),h=r(u),f=e.View.extend({el:"#libraries_element",events:{"click .sort-libraries-link":"sort_clicked"},defaults:{page_count:null,show_page:null,all_fetched:!1},initialize:function(e){this.options=h.default.defaults(this.options||{},e,this.defaults);var t=this;this.modal=null,this.collection=new l.default.Libraries,this.collection.url=this.collection.urlRoot+"?deleted=false",this.collection.fetch({success:function(){t.render()},error:function(e,t){void 0!==t.responseJSON?o.default.error(t.responseJSON.err_msg):o.default.error("An error occurred.")}})},render:function(e){this.options=h.default.extend(this.options,e),this.setElement("#libraries_element");var t=this.templateLibraryList(),n=null,r=null,a=function(e){return!0===e.get("public")};if(i(".tooltip").hide(),void 0!==e&&(r=void 0!==e.models?e.models:null),null!==this.collection&&null===r)this.sortLibraries(),n=Galaxy.libraries.preferences.get("with_deleted")?this.collection.models:this.collection.where({deleted:!1}),Galaxy.libraries.preferences.get("without_restricted")&&(n=h.default.filter(n,a));else if(null!==r){if(Galaxy.libraries.preferences.get("with_deleted"))n=r;else{var o=function(e){return!1===e.get("deleted")};n=h.default.filter(r,o)}Galaxy.libraries.preferences.get("without_restricted")&&(n=h.default.filter(n,a))}else n=[];(null===this.options.show_page||this.options.show_page<1)&&(this.options.show_page=1),this.options.total_libraries_count=n.length;var s=Galaxy.libraries.preferences.get("library_page_size")*(this.options.show_page-1);this.options.page_count=Math.ceil(this.options.total_libraries_count/Galaxy.libraries.preferences.get("library_page_size")),this.options.total_libraries_count>0&&s",''," ","",' ','<%- content_item.get("name") %>'," ","",'<%- content_item.get("description") %>'," ","","folder"," ",""," ",'<%= _.escape(content_item.get("update_time")) %>'," ",""," ",'','"," ","',"",'
","<% }%>","','',"name","",''," ",'description ','synopsis ','',"",'',""," " style="display:none;" data-id="<%- library.get("id") %>">',"<% if(!edit_mode) { %>",'<% if(library.get("deleted")) { %>',' "].join(""))}});t.default={LibraryRowView:s}}).call(t,n(2),n(0),n(1))},function(e,t,n){"use strict";(function(e,i,r){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),s=a(o),l=n(7),c=a(l),d=n(18),u=a(d),h=e.View.extend({el:"#center",defaults:{search_term:""},events:{"click #create_new_library_btn":"createLibraryFromModal","click #include_deleted_chk":"includeDeletedChecked","click #exclude_restricted_chk":"excludeRestrictedChecked","click .page_size_prompt":"showPageSizePrompt","keyup .library-search-input":"searchLibraries"},initialize:function(e){this.options=i.defaults(this.options||{},e,this.defaults),this.render()},render:function(){var e=this.templateToolBar(),t=!1,n=!0;Galaxy.user&&(t=Galaxy.user.isAdmin(),n=Galaxy.user.isAnonymous()),this.$el.html(e({admin_user:t,anon_user:n})),t&&(this.$el.find("#include_deleted_chk")[0].checked=Galaxy.libraries.preferences.get("with_deleted"),this.$el.find("#exclude_restricted_chk")[0].checked=Galaxy.libraries.preferences.get("without_restricted"))},renderPaginator:function(e){this.options=i.extend(this.options,e);var t=this.templatePaginator();this.$el.find("#library_paginator").html(t({show_page:parseInt(this.options.show_page),page_count:parseInt(this.options.page_count),total_libraries_count:this.options.total_libraries_count,libraries_shown:this.options.libraries_shown,library_page_size:Galaxy.libraries.preferences.get("library_page_size")}))},createLibraryFromModal:function(e){e.preventDefault(),e.stopPropagation();var t=this;this.modal=Galaxy.modal,this.modal.show({closing_events:!0,title:(0,s.default)("Create New Library"),body:this.templateNewLibraryInModal(),buttons:{Create:function(){t.createNewLibrary()},Close:function(){t.modal.hide()}}})},createNewLibrary:function(){var e=this.serializeNewLibrary();if(this.validateNewLibrary(e)){var t=new u.default.Library,n=this;t.save(e,{success:function(e){Galaxy.libraries.libraryListView.collection.add(e),n.modal.hide(),n.clearLibraryModal(),Galaxy.libraries.libraryListView.render(),c.default.success("Library created.")},error:function(e,t){void 0!==t.responseJSON?c.default.error(t.responseJSON.err_msg):c.default.error("An error occured.")}})}else c.default.error("Library's name is missing.");return!1},showPageSizePrompt:function(e){e.preventDefault();var t=prompt("How many libraries per page do you want to see?",Galaxy.libraries.preferences.get("library_page_size"));null!=t&&t==parseInt(t)&&(Galaxy.libraries.preferences.set({library_page_size:parseInt(t)}),Galaxy.libraries.libraryListView.render({show_page:1}))},clearLibraryModal:function(){r("input[name='Name']").val(""),r("input[name='Description']").val(""),r("input[name='Synopsis']").val("")},serializeNewLibrary:function(){return{name:r("input[name='Name']").val(),description:r("input[name='Description']").val(),synopsis:r("input[name='Synopsis']").val()}},validateNewLibrary:function(e){return""!==e.name},includeDeletedChecked:function(e){e.target.checked?(Galaxy.libraries.preferences.set({with_deleted:!0}),Galaxy.libraries.libraryListView.fetchDeleted()):(Galaxy.libraries.preferences.set({with_deleted:!1}),Galaxy.libraries.libraryListView.render())},excludeRestrictedChecked:function(e){e.target.checked?Galaxy.libraries.preferences.set({without_restricted:!0}):Galaxy.libraries.preferences.set({without_restricted:!1}),Galaxy.libraries.libraryListView.render()},searchLibraries:function(e){var t=r(".library-search-input").val();this.options.search_term=t,Galaxy.libraries.libraryListView.searchLibraries(t)},templateToolBar:function(){return i.template(['<%- library.get("name") %> ',"<% } else { %>",'"><%- library.get("name") %> ',"<% } %>",'<% if(library.get("description")) { %>','<% if( (library.get("description")).length> 80 ) { %>','"><%= _.escape(library.get("description")).substring(0, 80) + "..." %> ',"<% } else { %>",'<%= _.escape(library.get("description"))%> ',"<% } %>","<% } else { %>","","<% } %>",'<% if(library.get("synopsis")) { %>','<% if( (library.get("synopsis")).length> 120 ) { %>',' "><%= _.escape(library.get("synopsis")).substring(0, 120) + "..." %> ',"<% } else { %>",'<%= _.escape(library.get("synopsis"))%> ',"<% } %>","<% } else { %>","","<% } %>","<% } else if(edit_mode){ %>",' ',' ',' ',"<% } %>",' ','<% if( (library.get("public")) && (library.get("deleted") === false) ) { %>',' ',"<% }%>",'','/permissions">','','','','" class="fa fa-ban fa-lg">',''," ","',"<% if ( ( show_page - 1 ) > 0 ) { %>","<% if ( ( show_page - 1 ) > page_count ) { %>",'
","",' <%- libraries_shown %> libraries shown (change)',"",""," <%- total_libraries_count %> total",""].join(""))},templateNewLibraryInModal:function(){return i.template(['',"",'
",'library ',"","",""," "," ",'<% if(library.get("description") !== "") { %>',"name ",'<%- library.get("name") %> ',""," ","<% } %>",'<% if(library.get("synopsis") !== "") { %>',"description ",'<%- library.get("description") %> ',""," ","<% } %>",'<% if(library.get("create_time_pretty") !== "") { %>',"synopsis ",'<%- library.get("synopsis") %> ',""," ","<% } %>","created ",'"><%- library.get("create_time_pretty") %> ',""," ","","id ",'<%- library.get("id") %> ',"',"",'
","folder ',"","",""," "," ",'<% if(options.folder_description !== "") { %>',"name ","<%- options.folder_name %> ",""," ","<% } %>","description ","<%- options.folder_description %> ",""," ","","id ","<%- options.id %> ","
",'
","
","
",'",'","
","
",'
","","<% _.each(history_contents, function(history_item) { %>",'<% if (history_item.get("deleted") != true ) { %>','<% var item_name = history_item.get("name") %>','<% if (history_item.get("type") === "collection") { %>','<% var collection_type = history_item.get("collection_type") %>','<% if (collection_type === "list") { %>','
"].join(""))},templatePaginator:function(){return i.template(['',"<% if ( ( show_page - 1 ) > 0 ) { %>","<% if ( ( show_page - 1 ) > page_count ) { %>",'
","",' <%- items_shown %> items shown (change)',"",""," <%- total_items_count %> total",""].join(""))},templateCollectionSelectModal:function(){return i.template(["Which datasets?
",'","Collection type
",'',"Which type to choose?
","","
","Select history
",''," or create new: ",'',"",'Library: <%= _.escape(library.get("name")) %>',"
",'Library permissions
","Roles that can access the library
",'','Roles that can manage permissions on this library
",'','Roles that can add items to this library
",'','Roles that can modify this library
",'','",'Folder: <%= _.escape(folder.get("name")) %>',"
",'Folder permissions
","","Roles that can manage permissions on this folder","
",'','","Roles that can add items to this folder","
",'','","Roles that can modify this folder","
",'','',"<% _.each(tool_sheds, function(shed) { %>",'
","'," ","<% }); %>","",'"," ","','',"
",""," ","","<% _.each(categories, function(category) { %>","Name ","Description ","Repositories ",""," ","<% }); %>","",'"><%= category.get("name") %>'," ",'<%= category.get("description") %> ','<%= category.get("repositories") %> ',"','',"
","",' ","",'<% _.each(category.get("repositories"), function(repository) { %>',"Owner ','Name ',"Synopsis ",'Type ',""," ","<% }); %>","<%= repository.owner %> ","",'"," ","<%= repository.description %> ","<%= repository.type %> ","","
","',"<% _.each(repository_dependencies, function(dependency) { %>","<% dependency.repository_dependency_template = repository_dependency_template; %>","<%= repository_dependency_template(dependency) %>","<% }); %>","
","<% } %>","','',"
",'',"",' ","","","<% _.each(repositories, function(repository) { %>",'Name ','Owner ','Revision ','ToolShed ','Install ',''," ">',' ","<% }); %>","","<%= repository.get("repository").name %> ','<%= repository.get("repository").owner %> ','<%= repository.get("changeset_revision") %> ','<%= repository.get("tool_shed_url") %> ','','" type="submit" id="install_repository_<%= repository.get("id") %>" name="install_repository" value="Install now" />'," ",'','" type="submit" id="unqueue_repository_<%= repository.get("id") %>" name="unqueue_repository" value="Remove from queue" />'," ","','',"
"].join(""))});t.default={RepoStatus:h}}).call(t,n(2),n(1),n(0))},function(e,t,n){"use strict";(function(e,i,r){function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),s=a(o),l=n(34),c=a(l),d=n(35),u=a(d),h=e.View.extend({el:"#center",defaults:[{}],initialize:function(e){var t=this;this.model=new c.default.WorkflowTools,this.listenTo(this.model,"sync",this.render),this.model.fetch(),t.render()},render:function(e){var t=this,n=t.templateWorkflows,r=t.model.models;t.$el.html(n({title:(0,s.default)("Workflows Missing Tools"),workflows:r,queue:u.default.queueLength()})),i("#center").css("overflow","auto"),t.bindEvents()},bindEvents:function(){var t,n=this;i(".show_wf_repo").on("click",function(){var n=i(this).attr("data-toolids"),r=i(this).attr("data-shed"),a=Galaxy.root+"api/tool_shed/repository",o={tool_ids:n};i.get(a,o,function(n){t=n.repository.id;var i="repository/s/"+r.replace(/:/g,"%3a").replace(/\//g,"%2f")+"/r/"+n.repository.id;e.history.navigate(i,{trigger:!0,replace:!0})})}),i(".queue_wf_repo").on("click",function(){var e=i(this),n=e.attr("data-toolids"),r=e.attr("data-shed"),a=Galaxy.root+"api/tool_shed/repository",o={tool_ids:n};i.get(a,o,function(n){t=n.repository.id,o={tool_shed_url:r,repository_id:t},i.get(a,o,function(t){var n=Object.keys(t.repository.metadata),i=n[0],a=t.repository.metadata[i];a.tool_shed_url=r,u.default.addToQueue(a),e.remove()})})}),i("#from_workflow").on("click",n.loadWorkflows)},reDraw:function(e){this.$el.empty(),this.initialize(e)},templateWorkflows:r.template(['",' ","",'',"<% _.each(repositories, function(repository) { %>","Name ','Description ','Owner ','Revision ','Installation Status ',""," ","<% }); %>","",'',"",' ","",' ","",' ","",' ","",' ","','',"
",' ","","","<% _.each(workflows, function(workflow) { %>","Workflows ','Tool IDs ','Shed ','Name ','Owner ','Actions ',"",' ","<% }); %>","",""].join(""))});t.default={Workflows:h}}).call(t,n(2),n(0),n(1))},function(e,t,n){"use strict";(function(e){function i(e){return e&&e.__esModule?e:{default:e}}function r(e){var t,n,i,r;switch(e){case h.ITEM_HISTORY:t="History",n="Histories",i="history",r="History";break;case h.ITEM_DATASET:t="Dataset",n="Datasets",i="dataset",r="HistoryDatasetAssociation";break;case h.ITEM_WORKFLOW:t="Workflow",n="Workflows",i="workflow",r="StoredWorkflow";break;case h.ITEM_PAGE:t="Page",n="Pages",i="page",r="Page";break;case h.ITEM_VISUALIZATION:t="Visualization",n="Visualizations",i="visualization",r="Visualization"}var a="list_"+n.toLowerCase()+"_for_selection";return{singular:t,plural:n,controller:i,iclass:r,list_ajax_url:list_objects_url.replace("LIST_ACTION",a)}}function a(t,n,i){var r=set_accessible_url.replace("ITEM_CONTROLLER",t);e.ajax({type:"POST",url:r,data:{id:n,accessible:"True"},error:function(){alert("Making "+i+" accessible failed")}})}function o(){e(document).ajaxError(function(e,t){var n=t.responseText||t.statusText||"Could not connect to server";return show_modal("Server error",n,{"Ignore error":hide_modal}),!1}),e("[name=page_content]").wymeditor({skin:"galaxy",basePath:editor_base_path,iframeBasePath:iframe_base_path,boxHtml:"',' ",'','<% _.each(workflow.get("workflows"), function(name) { %>','
","',' ",'','<% _.each(workflow.get("tools"), function(tool) { %>','
","<%= workflow.get("shed") %> ','<%= workflow.get("repository") %> ','<%= workflow.get("owner") %> ','',' ","','
","
",toolsItems:[{name:"Bold",title:"Strong",css:"wym_tools_strong"},{name:"Italic",title:"Emphasis",css:"wym_tools_emphasis"},{name:"Superscript",title:(0,l.default)("Superscript"),css:"wym_tools_superscript"},{name:"Subscript",title:(0,l.default)("Subscript"),css:"wym_tools_subscript"},{name:"InsertOrderedList",title:"Ordered_List",css:"wym_tools_ordered_list"},{name:"InsertUnorderedList",title:"Unordered_List",css:"wym_tools_unordered_list"},{name:"Indent",title:"Indent",css:"wym_tools_indent"},{name:"Outdent",title:"Outdent",css:"wym_tools_outdent"},{name:"Undo",title:"Undo",css:"wym_tools_undo"},{name:"Redo",title:"Redo",css:"wym_tools_redo"},{name:"CreateLink",title:"Link",css:"wym_tools_link"},{name:"Unlink",title:"Unlink",css:"wym_tools_unlink"},{name:"InsertImage",title:"Image",css:"wym_tools_image"},{name:"InsertTable",title:"Table",css:"wym_tools_table"}]});var t=e.wymeditors(0),n=function(n){show_modal("Saving page","progress"),e.ajax({url:save_url,type:"POST",data:{id:page_id,content:t.xhtml(),annotations:JSON.stringify(new Object),_:"true"},success:function(){n()}})};e("#save-button").click(function(){n(function(){hide_modal()})}),e("#close-button").click(function(){window.document.location=page_list_url});var i=e("");e(".wym_area_top").append(i);var r={};e.each(t._options.containersItems,function(e,n){var i=n.name;r[n.title.replace("_"," ")]=function(){t.container(i)}}),make_popupmenu(i,r);var a=e("").addClass("galaxy-page-editor-button");e(".wym_area_top").append(a),make_popupmenu(a,{"Insert History Link":function(){t.dialog(h.DIALOG_HISTORY_LINK)},"Insert Dataset Link":function(){t.dialog(h.DIALOG_DATASET_LINK)},"Insert Workflow Link":function(){t.dialog(h.DIALOG_WORKFLOW_LINK)},"Insert Page Link":function(){t.dialog(h.DIALOG_PAGE_LINK)},"Insert Visualization Link":function(){t.dialog(h.DIALOG_VISUALIZATION_LINK)}});var o=e("").addClass("galaxy-page-editor-button");e(".wym_area_top").append(o),make_popupmenu(o,{"Embed History":function(){t.dialog(h.DIALOG_EMBED_HISTORY)},"Embed Dataset":function(){t.dialog(h.DIALOG_EMBED_DATASET)},"Embed Workflow":function(){t.dialog(h.DIALOG_EMBED_WORKFLOW)},"Embed Visualization":function(){t.dialog(h.DIALOG_EMBED_VISUALIZATION)}})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var s=n(3),l=i(s);n(76),n(107),n(334),n(101);var c=n(25),d=i(c),u=window.WYMeditor,h={ITEM_HISTORY:"item_history",ITEM_DATASET:"item_dataset",ITEM_WORKFLOW:"item_workflow",ITEM_PAGE:"item_page",ITEM_VISUALIZATION:"item_visualization",DIALOG_HISTORY_LINK:"link_history",DIALOG_DATASET_LINK:"link_dataset",DIALOG_WORKFLOW_LINK:"link_workflow",DIALOG_PAGE_LINK:"link_page",DIALOG_VISUALIZATION_LINK:"link_visualization",DIALOG_EMBED_HISTORY:"embed_history",DIALOG_EMBED_DATASET:"embed_dataset",DIALOG_EMBED_WORKFLOW:"embed_workflow",DIALOG_EMBED_PAGE:"embed_page",DIALOG_EMBED_VISUALIZATION:"embed_visualization"};u.editor.prototype.dialog=function(t,n,i){function o(){e("#set_link_id").click(function(){e("#link_attribute_label").text("ID/Name");var t=e(".wym_href");t.addClass("wym_id").removeClass("wym_href"),c&&t.val(e(c).attr("id")),e(this).remove()})}var s=this,l=s.uniqueStamp(),c=s.selected();if(t==u.DIALOG_LINK){c&&(e(s._options.hrefSelector).val(e(c).attr(u.HREF)),e(s._options.srcSelector).val(e(c).attr(u.SRC)),e(s._options.titleSelector).val(e(c).attr(u.TITLE)),e(s._options.altSelector).val(e(c).attr(u.ALT)));var f,p;c&&(f=e(c).attr("href"),void 0==f&&(f=""),void 0==(p=e(c).attr("title"))&&(p="")),show_modal("Create Link","{Tools}
"+WYMeditor.TOOLS_ITEMS+"
{Containers}
"+WYMeditor.CONTAINERS_ITEMS+"
{Classes}
"+WYMeditor.CLASSES_ITEMS+"
{Status}
{Source_Code}