galaxy-commits
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
July 2012
- 1 participants
- 99 discussions
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/a2d161919806/
changeset: a2d161919806
user: jgoecks
date: 2012-07-11 19:19:23
summary: Small viz tweaks.
affected #: 3 files
diff -r 33676ce91213156e434e9c9c2f2def8d9fbbecc2 -r a2d1619198063084b99a1e6e8c75e1658593c448 static/scripts/packed/viz/paramamonster.js
--- a/static/scripts/packed/viz/paramamonster.js
+++ b/static/scripts/packed/viz/paramamonster.js
@@ -1,1 +1,1 @@
-var ToolInputsSettings=Backbone.Model.extend({defaults:{inputs:null,values:null}});var ToolParameterTree=Backbone.RelationalModel.extend({defaults:{tool:null,tree_data:null},initialize:function(b){var a=this;this.get("tool").get("inputs").each(function(c){if(!c.get_samples()){return}c.on("change:min change:max change:num_samples",function(d){if(d.get("in_ptree")){a.set_tree_data()}},a);c.on("change:in_ptree",function(d){if(d.get("in_ptree")){a.add_param(d)}else{a.remove_param(d)}a.set_tree_data()},a)});if(b.config){_.each(b.config,function(d){var c=a.get("tool").get("inputs").find(function(e){return e.get("name")===d.name});a.add_param(c);c.set(d)})}},add_param:function(a){if(a.get("ptree_index")){return}a.set("in_ptree",true);a.set("ptree_index",this.get_tree_params().length)},remove_param:function(a){a.set("in_ptree",false);a.set("ptree_index",null);_(this.get_tree_params()).each(function(b,c){b.set("ptree_index",c+1)})},set_tree_data:function(){var b=_.map(this.get_tree_params(),function(d){return{param:d,samples:d.get_samples()}});var a=0,c=function(g,d){var i=g[d],h=i.param,f=h.get("label"),e=i.samples;if(g.length-1===d){return _.map(e,function(j){return{id:a++,name:j,param:h,value:j}})}return _.map(e,function(j){return{id:a++,name:j,param:h,value:j,children:c(g,d+1)}})};this.set("tree_data",{name:"Root",id:a++,children:(b.length!==0?c(b,0):null)})},get_tree_params:function(){return _(this.get("tool").get("inputs").where({in_ptree:true})).sortBy(function(a){return a.get("ptree_index")})},get_num_leaves:function(){return this.get_tree_params().reduce(function(a,b){return a*b.get_samples().length},1)},get_node_settings:function(e){var c=this.get("tool").get_inputs_dict();var f=e.parent;if(f){while(f.depth!==0){c[f.param.get("name")]=f.value;f=f.parent}}var a=this,b=function(h,g){if(h.param){g[h.param.get("name")]=h.value}if(!h.children){return new ToolInputsSettings({inputs:a.get("tool").get("inputs"),values:g})}else{return _.flatten(_.map(h.children,function(i){return b(i,_.clone(g))}))}},d=b(e,c);if(!_.isArray(d)){d=[d]}return d},get_connected_nodes:function(c){var d=function(e){if(!e.children){return e}else{return _.flatten([e,_.map(e.children,function(f){return d(f)})])}};var b=[],a=c.parent;while(a){b.push(a);a=a.parent}return _.flatten([b,d(c)])},get_leaf:function(b){var c=this.get("tree_data"),a=function(d){return _.find(d,function(e){return b[e.param.get("name")]===e.value})};while(c.children){c=a(c.children)}return c},toJSON:function(){return this.get_tree_params().map(function(a){return{name:a.get("name"),min:a.get("min"),max:a.get("max"),num_samples:a.get("num_samples")}})}});var ParamaMonsterTrack=Backbone.RelationalModel.extend({defaults:{track:null,mode:"Pack",settings:null,regions:null},relations:[{type:Backbone.HasMany,key:"regions",relatedModel:"GenomeRegion"}],initialize:function(a){if(a.track){var b=_.extend({data_url:galaxy_paths.get("raw_data_url"),converted_datasets_state_url:galaxy_paths.get("dataset_state_url")},a.track);this.set("track",object_from_template(b,{},null))}},same_settings:function(a){var b=this.get("settings"),c=a.get("settings");for(var d in b){if(!c[d]||b[d]!==c[d]){return false}}return true},toJSON:function(){return{track:this.get("track").to_dict(),settings:this.get("settings"),regions:this.get("regions")}}});var TrackCollection=Backbone.Collection.extend({model:ParamaMonsterTrack});var ParamaMonsterVisualization=Visualization.extend({defaults:_.extend({},Visualization.prototype.defaults,{dataset:null,tool:null,parameter_tree:null,regions:null,tracks:null,default_mode:"Pack"}),relations:[{type:Backbone.HasOne,key:"dataset",relatedModel:"Dataset"},{type:Backbone.HasOne,key:"tool",relatedModel:"Tool"},{type:Backbone.HasMany,key:"regions",relatedModel:"GenomeRegion"},{type:Backbone.HasMany,key:"tracks",relatedModel:"ParamaMonsterTrack"}],initialize:function(a){var b=this.get("tool").copy(true);this.set("tool_with_samplable_inputs",b);this.set("parameter_tree",new ToolParameterTree({tool:b,config:a.tree_config}))},add_track:function(a){this.get("tracks").add(a)},toJSON:function(){return{id:this.get("id"),title:"Parameter exploration for dataset '"+this.get("dataset").get("name")+"'",type:"paramamonster",dataset_id:this.get("dataset").id,tool_id:this.get("tool").id,regions:this.get("regions").toJSON(),tree_config:this.get("parameter_tree").toJSON(),tracks:this.get("tracks").toJSON()}}});var ParamaMonsterTrackView=Backbone.View.extend({tagName:"tr",TILE_LEN:250,initialize:function(a){this.canvas_manager=a.canvas_manager;this.render();this.model.on("change:track change:mode",this.draw_tiles,this)},render:function(){var f=this.model.get("settings"),b=f.get("values"),d=$("<td/>").addClass("settings").appendTo(this.$el),c=$("<div/>").addClass("track-info").hide().appendTo(d);c.append($("<div/>").css("font-weight","bold").text("Track Settings"));f.get("inputs").each(function(h){c.append(h.get("label")+": "+b[h.get("name")]+"<br/>")});var a=this,g=$("<button/>").appendTo(c).text("Run on complete dataset").click(function(){c.toggle();a.trigger("run_on_dataset",f)});var e=create_icon_buttons_menu([{title:"Settings",icon_class:"gear track-settings",on_click:function(){c.toggle()},tipsy_config:{gravity:"s"}},{title:"Remove",icon_class:"cross-circle",on_click:function(){a.$el.remove();$(".tipsy").remove()}}]);d.prepend(e.$el);this.model.get("regions").each(function(){a.$el.append($("<td/>").addClass("tile").html($("<img/>").attr("src",galaxy_paths.get("image_path")+"/loading_large_white_bg.gif")))});if(this.model.get("track")){this.draw_tiles()}},draw_tiles:function(){var b=this,a=this.model.get("track"),d=this.model.get("regions"),c=this.$el.find("td.tile");if(!a){return}$.when(a.data_manager.data_is_ready()).then(function(e){d.each(function(h,g){var f=h.length()/b.TILE_LEN,j=1/f,i=b.model.get("mode");$.when(a.data_manager.get_data(h,i,f,{})).then(function(l){var k=b.canvas_manager.new_canvas();k.width=b.TILE_LEN;k.height=a.get_canvas_height(l,i,j,k.width);a.draw_tile(l,k.getContext("2d"),i,f,h,j);$(c[g]).empty().append(k)})})})}});var ToolInputValOrSweepView=Backbone.View.extend({number_input_template:'<div class="form-row-input sweep"><input class="min" type="text" size="6" value="<%= min %>"> - <input class="max" type="text" size="6" value="<%= max %>"> samples: <input class="num_samples" type="text" size="1" value="<%= num_samples %>"></div>',select_input_template:'<div class="form-row-input sweep"><%= options %></div>',initialize:function(a){this.$el=a.tool_row;this.render()},render:function(){var b=this.model,f=b.get("type"),h=this.$el.find(".form-row-input"),d=null;h.find(":input").change(function(){b.set("value",$(this).val())});if(f==="number"){d=$(_.template(this.number_input_template,this.model.toJSON()))}else{if(f==="select"){var c=_.map(this.$el.find("select option"),function(i){return $(i).val()}),e=c.join(", ");d=$(_.template(this.select_input_template,{options:e}))}}d.insertAfter(h);var a=this,g=create_icon_buttons_menu([{title:"Add parameter to tree",icon_class:"plus-button",on_click:function(){b.set("in_ptree",true);h.hide();d.show();$(this).hide();a.$el.find(".icon-button.toggle").show()}},{title:"Remove parameter from tree",icon_class:"toggle",on_click:function(){b.set("in_ptree",false);d.hide();h.show();$(this).hide();a.$el.find(".icon-button.plus-button").show()}}],{tipsy_config:{gravity:"s"}});this.$el.prepend(g.$el);if(b.get("in_ptree")){h.hide();a.$el.find(".icon-button.plus-button").hide()}else{a.$el.find(".icon-button.toggle").hide();d.hide()}_.each(["min","max","num_samples"],function(i){d.find("."+i).change(function(){b.set(i,parseFloat($(this).val()))})})}});var ToolParameterTreeDesignView=Backbone.View.extend({className:"tree-design",initialize:function(a){this.render()},render:function(){var c=new ToolFormView({model:this.model.get("tool")});c.render();this.$el.append(c.$el);var b=this,a=b.model.get("tool").get("inputs");this.$el.find(".form-row").not(".form-actions").each(function(d){var e=new ToolInputValOrSweepView({model:a.at(d),tool_row:$(this)})})}});var ToolParameterTreeView=Backbone.View.extend({className:"tool-parameter-tree",initialize:function(a){this.model.on("change:tree_data",this.render,this)},render:function(){this.$el.children().remove();var i=this.model.get_tree_params();if(!i.length){return}this.width=100*(2+i.length);this.height=15*this.model.get_num_leaves();var h=this;var g=d3.layout.cluster().size([this.height,this.width-160]);var c=d3.svg.diagonal().projection(function(j){return[j.y,j.x]});var a=g.nodes(this.model.get("tree_data"));var d=_.uniq(_.pluck(a,"y"));_.each(i,function(l,k){var j=d[k+1],m=$("#center").position().left;h.$el.append($("<div>").addClass("label").text(l.get("label")).css("left",j+m))});var b=d3.select(this.$el[0]).append("svg").attr("width",this.width).attr("height",this.height+20).append("g").attr("transform","translate(40, 10)");var f=b.selectAll("path.link").data(g.links(a)).enter().append("path").attr("class","link").attr("d",c);var e=b.selectAll("g.node").data(a).enter().append("g").attr("class","node").attr("transform",function(j){return"translate("+j.y+","+j.x+")"}).on("mouseover",function(k){var j=_.pluck(h.model.get_connected_nodes(k),"id");e.filter(function(l){return _.find(j,function(m){return m===l.id})!==undefined}).style("fill","#f00")}).on("mouseout",function(){e.style("fill","#000")});e.append("circle").attr("r",9);e.append("text").attr("dx",function(j){return j.children?-12:12}).attr("dy",3).attr("text-anchor",function(j){return j.children?"end":"start"}).text(function(j){return j.name})}});var ParamaMonsterVisualizationView=Backbone.View.extend({className:"paramamonster",helpText:"<div><h4>Getting Started</h4><ol><li>Create a parameter tree by using the icons next to the tool's parameter names to add or remove parameters.<li>Adjust the tree by using parameter inputs to select min, max, and number of samples<li>Run the tool with different settings by clicking on tree nodes</ol></div>",initialize:function(b){this.canvas_manager=new CanvasManager(this.$el.parents("body"));this.tool_param_tree_view=new ToolParameterTreeView({model:this.model.get("parameter_tree")});this.track_collection_container=$("<table/>").addClass("tracks");this.model.get("parameter_tree").on("change:tree_data",this.handle_node_clicks,this);var a=this;this.model.get("tracks").each(function(c){c.get("track").view=a})},render:function(){var g=new ToolParameterTreeDesignView({model:this.model.get("parameter_tree")});$("#left").append(g.$el);var j=this,d=j.model.get("regions"),h=$("<tr/>").appendTo(this.track_collection_container);d.each(function(k){h.append($("<th>").text(k.toString()))});h.children().first().attr("colspan",2);var e=$("<div>").addClass("tiles");$("#right").append(e.append(this.track_collection_container));j.model.get("tracks").each(function(k){j.add_track(k)});var i=$(this.helpText).addClass("help"),f=create_icon_buttons_menu([{title:"Close",icon_class:"cross-circle",on_click:function(){$(".tipsy").remove();i.remove()},tipsy_config:{gravity:"s"}}]);i.prepend(f.$el.css("float","right"));$("#center").append(i);this.tool_param_tree_view.render();$("#center").append(this.tool_param_tree_view.$el);this.handle_node_clicks();var c=create_icon_buttons_menu([{icon_class:"chevron-expand",title:"Set display mode"},{icon_class:"cross-circle",title:"Close",on_click:function(){window.location="${h.url_for( controller='visualization', action='list' )}"}}],{tipsy_config:{gravity:"n"}});var b=["Squish","Pack"],a={};_.each(b,function(k){a[k]=function(){j.model.set("default_mode",k);j.model.get("tracks").each(function(l){l.set("mode",k)})}});make_popupmenu(c.$el.find(".chevron-expand"),a);c.$el.attr("style","float: right");$("#right .unified-panel-header-inner").append(c.$el)},run_tool_on_dataset:function(b){var a=this.model.get("tool"),d=a.get("name"),c=this.model.get("dataset");a.set_input_values(b.get("values"));$.when(a.rerun(c)).then(function(e){});show_modal("Running "+d+" on complete dataset",d+" is running on dataset '"+c.get("name")+"'. Outputs are in the dataset's history.",{Ok:function(){hide_modal()}})},add_track:function(d){var b=this,c=this.model.get("parameter_tree");b.model.add_track(d);var a=new ParamaMonsterTrackView({model:d,canvas_manager:b.canvas_manager});a.on("run_on_dataset",b.run_tool_on_dataset,b);b.track_collection_container.append(a.$el);a.$el.hover(function(){var f=c.get_leaf(d.get("settings").get("values"));var e=_.pluck(c.get_connected_nodes(f),"id");d3.select(b.tool_param_tree_view.$el[0]).selectAll("g.node").filter(function(g){return _.find(e,function(h){return h===g.id})!==undefined}).style("fill","#f00")},function(){d3.select(b.tool_param_tree_view.$el[0]).selectAll("g.node").style("fill","#000")});return d},handle_node_clicks:function(){var a=this,b=this.model.get("parameter_tree"),d=this.model.get("regions"),c=d3.select(this.tool_param_tree_view.$el[0]).selectAll("g.node");c.on("click",function(k,g){var f=a.model.get("tool"),j=a.model.get("dataset"),h=b.get_node_settings(k),e=$.Deferred();if(h.length>=10){show_modal("Whoa there cowboy!","You clicked on a node to try "+a.model.get("tool").get("name")+" with "+h.length+" different combinations of settings. You can only run 10 jobs at a time.",{Ok:function(){hide_modal();e.resolve(false)}})}else{e.resolve(true)}$.when(e).then(function(i){if(!i){return}var l=_.map(h,function(m){var n=new ParamaMonsterTrack({settings:m,regions:d,mode:a.model.get("default_mode")});a.add_track(n);return n});_.each(l,function(n,m){setTimeout(function(){f.set_input_values(n.get("settings").get("values"));$.when(f.rerun(j,d)).then(function(p){var q=_.extend({data_url:galaxy_paths.get("raw_data_url"),converted_datasets_state_url:galaxy_paths.get("dataset_state_url")},p.first().get("track_config")),o=object_from_template(q,a,null);n.set("track",o)})},m*10000)})})})}});
\ No newline at end of file
+var ToolInputsSettings=Backbone.Model.extend({defaults:{inputs:null,values:null}});var ToolParameterTree=Backbone.RelationalModel.extend({defaults:{tool:null,tree_data:null},initialize:function(b){var a=this;this.get("tool").get("inputs").each(function(c){if(!c.get_samples()){return}c.on("change:min change:max change:num_samples",function(d){if(d.get("in_ptree")){a.set_tree_data()}},a);c.on("change:in_ptree",function(d){if(d.get("in_ptree")){a.add_param(d)}else{a.remove_param(d)}a.set_tree_data()},a)});if(b.config){_.each(b.config,function(d){var c=a.get("tool").get("inputs").find(function(e){return e.get("name")===d.name});a.add_param(c);c.set(d)})}},add_param:function(a){if(a.get("ptree_index")){return}a.set("in_ptree",true);a.set("ptree_index",this.get_tree_params().length)},remove_param:function(a){a.set("in_ptree",false);a.set("ptree_index",null);_(this.get_tree_params()).each(function(b,c){b.set("ptree_index",c+1)})},set_tree_data:function(){var b=_.map(this.get_tree_params(),function(d){return{param:d,samples:d.get_samples()}});var a=0,c=function(g,d){var i=g[d],h=i.param,f=h.get("label"),e=i.samples;if(g.length-1===d){return _.map(e,function(j){return{id:a++,name:j,param:h,value:j}})}return _.map(e,function(j){return{id:a++,name:j,param:h,value:j,children:c(g,d+1)}})};this.set("tree_data",{name:"Root",id:a++,children:(b.length!==0?c(b,0):null)})},get_tree_params:function(){return _(this.get("tool").get("inputs").where({in_ptree:true})).sortBy(function(a){return a.get("ptree_index")})},get_num_leaves:function(){return this.get_tree_params().reduce(function(a,b){return a*b.get_samples().length},1)},get_node_settings:function(e){var c=this.get("tool").get_inputs_dict();var f=e.parent;if(f){while(f.depth!==0){c[f.param.get("name")]=f.value;f=f.parent}}var a=this,b=function(h,g){if(h.param){g[h.param.get("name")]=h.value}if(!h.children){return new ToolInputsSettings({inputs:a.get("tool").get("inputs"),values:g})}else{return _.flatten(_.map(h.children,function(i){return b(i,_.clone(g))}))}},d=b(e,c);if(!_.isArray(d)){d=[d]}return d},get_connected_nodes:function(c){var d=function(e){if(!e.children){return e}else{return _.flatten([e,_.map(e.children,function(f){return d(f)})])}};var b=[],a=c.parent;while(a){b.push(a);a=a.parent}return _.flatten([b,d(c)])},get_leaf:function(b){var c=this.get("tree_data"),a=function(d){return _.find(d,function(e){return b[e.param.get("name")]===e.value})};while(c.children){c=a(c.children)}return c},toJSON:function(){return this.get_tree_params().map(function(a){return{name:a.get("name"),min:a.get("min"),max:a.get("max"),num_samples:a.get("num_samples")}})}});var ParamaMonsterTrack=Backbone.RelationalModel.extend({defaults:{track:null,mode:"Pack",settings:null,regions:null},relations:[{type:Backbone.HasMany,key:"regions",relatedModel:"GenomeRegion"}],initialize:function(a){if(a.track){var b=_.extend({data_url:galaxy_paths.get("raw_data_url"),converted_datasets_state_url:galaxy_paths.get("dataset_state_url")},a.track);this.set("track",object_from_template(b,{},null))}},same_settings:function(a){var b=this.get("settings"),c=a.get("settings");for(var d in b){if(!c[d]||b[d]!==c[d]){return false}}return true},toJSON:function(){return{track:this.get("track").to_dict(),settings:this.get("settings"),regions:this.get("regions")}}});var TrackCollection=Backbone.Collection.extend({model:ParamaMonsterTrack});var ParamaMonsterVisualization=Visualization.extend({defaults:_.extend({},Visualization.prototype.defaults,{dataset:null,tool:null,parameter_tree:null,regions:null,tracks:null,default_mode:"Pack"}),relations:[{type:Backbone.HasOne,key:"dataset",relatedModel:"Dataset"},{type:Backbone.HasOne,key:"tool",relatedModel:"Tool"},{type:Backbone.HasMany,key:"regions",relatedModel:"GenomeRegion"},{type:Backbone.HasMany,key:"tracks",relatedModel:"ParamaMonsterTrack"}],initialize:function(a){var b=this.get("tool").copy(true);this.set("tool_with_samplable_inputs",b);this.set("parameter_tree",new ToolParameterTree({tool:b,config:a.tree_config}))},add_track:function(a){this.get("tracks").add(a)},toJSON:function(){return{id:this.get("id"),title:"Parameter exploration for dataset '"+this.get("dataset").get("name")+"'",type:"paramamonster",dataset_id:this.get("dataset").id,tool_id:this.get("tool").id,regions:this.get("regions").toJSON(),tree_config:this.get("parameter_tree").toJSON(),tracks:this.get("tracks").toJSON()}}});var ParamaMonsterTrackView=Backbone.View.extend({tagName:"tr",TILE_LEN:250,initialize:function(a){this.canvas_manager=a.canvas_manager;this.render();this.model.on("change:track change:mode",this.draw_tiles,this)},render:function(){var f=this.model.get("settings"),b=f.get("values"),d=$("<td/>").addClass("settings").appendTo(this.$el),c=$("<div/>").addClass("track-info").hide().appendTo(d);c.append($("<div/>").css("font-weight","bold").text("Track Settings"));f.get("inputs").each(function(h){c.append(h.get("label")+": "+b[h.get("name")]+"<br/>")});var a=this,g=$("<button/>").appendTo(c).text("Run on complete dataset").click(function(){c.toggle();a.trigger("run_on_dataset",f)});var e=create_icon_buttons_menu([{title:"Settings",icon_class:"gear track-settings",on_click:function(){c.toggle()},tipsy_config:{gravity:"s"}},{title:"Remove",icon_class:"cross-circle",on_click:function(){a.$el.remove();$(".tipsy").remove()}}]);d.prepend(e.$el);this.model.get("regions").each(function(){a.$el.append($("<td/>").addClass("tile").html($("<img/>").attr("src",galaxy_paths.get("image_path")+"/loading_large_white_bg.gif")))});if(this.model.get("track")){this.draw_tiles()}},draw_tiles:function(){var b=this,a=this.model.get("track"),d=this.model.get("regions"),c=this.$el.find("td.tile");if(!a){return}$.when(a.data_manager.data_is_ready()).then(function(e){d.each(function(h,g){var f=h.length()/b.TILE_LEN,j=1/f,i=b.model.get("mode");$.when(a.data_manager.get_data(h,i,f,{})).then(function(l){var k=b.canvas_manager.new_canvas();k.width=b.TILE_LEN;k.height=a.get_canvas_height(l,i,j,k.width);a.draw_tile(l,k.getContext("2d"),i,f,h,j);$(c[g]).empty().append(k)})})})}});var ToolInputValOrSweepView=Backbone.View.extend({number_input_template:'<div class="form-row-input sweep"><input class="min" type="text" size="6" value="<%= min %>"> - <input class="max" type="text" size="6" value="<%= max %>"> samples: <input class="num_samples" type="text" size="1" value="<%= num_samples %>"></div>',select_input_template:'<div class="form-row-input sweep"><%= options %></div>',initialize:function(a){this.$el=a.tool_row;this.render()},render:function(){var b=this.model,f=b.get("type"),h=this.$el.find(".form-row-input"),d=null;h.find(":input").change(function(){b.set("value",$(this).val())});if(f==="number"){d=$(_.template(this.number_input_template,this.model.toJSON()))}else{if(f==="select"){var c=_.map(this.$el.find("select option"),function(i){return $(i).val()}),e=c.join(", ");d=$(_.template(this.select_input_template,{options:e}))}}d.insertAfter(h);var a=this,g=create_icon_buttons_menu([{title:"Add parameter to tree",icon_class:"plus-button",on_click:function(){b.set("in_ptree",true);h.hide();d.show();$(this).hide();a.$el.find(".icon-button.toggle").show()}},{title:"Remove parameter from tree",icon_class:"toggle",on_click:function(){b.set("in_ptree",false);d.hide();h.show();$(this).hide();a.$el.find(".icon-button.plus-button").show()}}],{tipsy_config:{gravity:"s"}});this.$el.prepend(g.$el);if(b.get("in_ptree")){h.hide();a.$el.find(".icon-button.plus-button").hide()}else{a.$el.find(".icon-button.toggle").hide();d.hide()}_.each(["min","max","num_samples"],function(i){d.find("."+i).change(function(){b.set(i,parseFloat($(this).val()))})})}});var ToolParameterTreeDesignView=Backbone.View.extend({className:"tree-design",initialize:function(a){this.render()},render:function(){var c=new ToolFormView({model:this.model.get("tool")});c.render();this.$el.append(c.$el);var b=this,a=b.model.get("tool").get("inputs");this.$el.find(".form-row").not(".form-actions").each(function(d){var e=new ToolInputValOrSweepView({model:a.at(d),tool_row:$(this)})})}});var ToolParameterTreeView=Backbone.View.extend({className:"tool-parameter-tree",initialize:function(a){this.model.on("change:tree_data",this.render,this)},render:function(){this.$el.children().remove();var i=this.model.get_tree_params();if(!i.length){return}this.width=100*(2+i.length);this.height=15*this.model.get_num_leaves();var h=this;var g=d3.layout.cluster().size([this.height,this.width-160]);var c=d3.svg.diagonal().projection(function(j){return[j.y,j.x]});var a=g.nodes(this.model.get("tree_data"));var d=_.uniq(_.pluck(a,"y"));_.each(i,function(l,k){var j=d[k+1],m=$("#center").position().left;h.$el.append($("<div>").addClass("label").text(l.get("label")).css("left",j+m))});var b=d3.select(this.$el[0]).append("svg").attr("width",this.width).attr("height",this.height+30).append("g").attr("transform","translate(40, 20)");var f=b.selectAll("path.link").data(g.links(a)).enter().append("path").attr("class","link").attr("d",c);var e=b.selectAll("g.node").data(a).enter().append("g").attr("class","node").attr("transform",function(j){return"translate("+j.y+","+j.x+")"}).on("mouseover",function(k){var j=_.pluck(h.model.get_connected_nodes(k),"id");e.filter(function(l){return _.find(j,function(m){return m===l.id})!==undefined}).style("fill","#f00")}).on("mouseout",function(){e.style("fill","#000")});e.append("circle").attr("r",9);e.append("text").attr("dx",function(j){return j.children?-12:12}).attr("dy",3).attr("text-anchor",function(j){return j.children?"end":"start"}).text(function(j){return j.name})}});var ParamaMonsterVisualizationView=Backbone.View.extend({className:"paramamonster",helpText:"<div><h4>Getting Started</h4><ol><li>Create a parameter tree by using the icons next to the tool's parameter names to add or remove parameters.<li>Adjust the tree by using parameter inputs to select min, max, and number of samples<li>Run the tool with different settings by clicking on tree nodes</ol></div>",initialize:function(b){this.canvas_manager=new CanvasManager(this.$el.parents("body"));this.tool_param_tree_view=new ToolParameterTreeView({model:this.model.get("parameter_tree")});this.track_collection_container=$("<table/>").addClass("tracks");this.model.get("parameter_tree").on("change:tree_data",this.handle_node_clicks,this);var a=this;this.model.get("tracks").each(function(c){c.get("track").view=a})},render:function(){var g=new ToolParameterTreeDesignView({model:this.model.get("parameter_tree")});$("#left").append(g.$el);var j=this,d=j.model.get("regions"),h=$("<tr/>").appendTo(this.track_collection_container);d.each(function(k){h.append($("<th>").text(k.toString()))});h.children().first().attr("colspan",2);var e=$("<div>").addClass("tiles");$("#right").append(e.append(this.track_collection_container));j.model.get("tracks").each(function(k){j.add_track(k)});var i=$(this.helpText).addClass("help"),f=create_icon_buttons_menu([{title:"Close",icon_class:"cross-circle",on_click:function(){$(".tipsy").remove();i.remove()},tipsy_config:{gravity:"s"}}]);i.prepend(f.$el.css("float","right"));$("#center").append(i);this.tool_param_tree_view.render();$("#center").append(this.tool_param_tree_view.$el);this.handle_node_clicks();var c=create_icon_buttons_menu([{icon_class:"chevron-expand",title:"Set display mode"},{icon_class:"cross-circle",title:"Close",on_click:function(){window.location="${h.url_for( controller='visualization', action='list' )}"}}],{tipsy_config:{gravity:"n"}});var b=["Squish","Pack"],a={};_.each(b,function(k){a[k]=function(){j.model.set("default_mode",k);j.model.get("tracks").each(function(l){l.set("mode",k)})}});make_popupmenu(c.$el.find(".chevron-expand"),a);c.$el.attr("style","float: right");$("#right .unified-panel-header-inner").append(c.$el)},run_tool_on_dataset:function(b){var a=this.model.get("tool"),d=a.get("name"),c=this.model.get("dataset");a.set_input_values(b.get("values"));$.when(a.rerun(c)).then(function(e){});show_modal("Running "+d+" on complete dataset",d+" is running on dataset '"+c.get("name")+"'. Outputs are in the dataset's history.",{Ok:function(){hide_modal()}})},add_track:function(d){var b=this,c=this.model.get("parameter_tree");b.model.add_track(d);var a=new ParamaMonsterTrackView({model:d,canvas_manager:b.canvas_manager});a.on("run_on_dataset",b.run_tool_on_dataset,b);b.track_collection_container.append(a.$el);a.$el.hover(function(){var f=c.get_leaf(d.get("settings").get("values"));var e=_.pluck(c.get_connected_nodes(f),"id");d3.select(b.tool_param_tree_view.$el[0]).selectAll("g.node").filter(function(g){return _.find(e,function(h){return h===g.id})!==undefined}).style("fill","#f00")},function(){d3.select(b.tool_param_tree_view.$el[0]).selectAll("g.node").style("fill","#000")});return d},handle_node_clicks:function(){var a=this,b=this.model.get("parameter_tree"),d=this.model.get("regions"),c=d3.select(this.tool_param_tree_view.$el[0]).selectAll("g.node");c.on("click",function(k,g){var f=a.model.get("tool"),j=a.model.get("dataset"),h=b.get_node_settings(k),e=$.Deferred();if(h.length>=10){show_modal("Whoa there cowboy!","You clicked on a node to try "+a.model.get("tool").get("name")+" with "+h.length+" different combinations of settings. You can only run 10 jobs at a time.",{Ok:function(){hide_modal();e.resolve(false)}})}else{e.resolve(true)}$.when(e).then(function(i){if(!i){return}var l=_.map(h,function(m){var n=new ParamaMonsterTrack({settings:m,regions:d,mode:a.model.get("default_mode")});a.add_track(n);return n});_.each(l,function(n,m){setTimeout(function(){f.set_input_values(n.get("settings").get("values"));$.when(f.rerun(j,d)).then(function(p){var q=_.extend({data_url:galaxy_paths.get("raw_data_url"),converted_datasets_state_url:galaxy_paths.get("dataset_state_url")},p.first().get("track_config")),o=object_from_template(q,a,null);n.set("track",o)})},m*10000)})})})}});
\ No newline at end of file
diff -r 33676ce91213156e434e9c9c2f2def8d9fbbecc2 -r a2d1619198063084b99a1e6e8c75e1658593c448 static/scripts/viz/paramamonster.js
--- a/static/scripts/viz/paramamonster.js
+++ b/static/scripts/viz/paramamonster.js
@@ -638,9 +638,9 @@
var vis = d3.select(this.$el[0])
.append("svg")
.attr("width", this.width)
- .attr("height", this.height + 20)
+ .attr("height", this.height + 30)
.append("g")
- .attr("transform", "translate(40, 10)");
+ .attr("transform", "translate(40, 20)");
// Draw links.
var link = vis.selectAll("path.link")
diff -r 33676ce91213156e434e9c9c2f2def8d9fbbecc2 -r a2d1619198063084b99a1e6e8c75e1658593c448 templates/visualization/circster.mako
--- a/templates/visualization/circster.mako
+++ b/templates/visualization/circster.mako
@@ -57,7 +57,6 @@
} }
]);
- menu.render();
menu.$el.attr("style", "float: right");
$("#center .unified-panel-header-inner").append(menu.$el);
// Manual tipsy config because default gravity is S and cannot be changed.
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dan: Fix for history items going to different histories if current history is switched while the workflow is still being queued.
by Bitbucket 11 Jul '12
by Bitbucket 11 Jul '12
11 Jul '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/33676ce91213/
changeset: 33676ce91213
user: dan
date: 2012-07-11 18:01:16
summary: Fix for history items going to different histories if current history is switched while the workflow is still being queued.
affected #: 1 file
diff -r f673cb8e75d9978ef069fd0dcad9ee0dc065ac6e -r 33676ce91213156e434e9c9c2f2def8d9fbbecc2 lib/galaxy/web/controllers/workflow.py
--- a/lib/galaxy/web/controllers/workflow.py
+++ b/lib/galaxy/web/controllers/workflow.py
@@ -1409,6 +1409,9 @@
nh_name = '%s on %s' % (nh_name, mx_ds_name)
new_history = trans.app.model.History( user=trans.user, name=nh_name )
trans.sa_session.add( new_history )
+ target_history = new_history
+ else:
+ target_history = trans.get_history()
# Run each step, connecting outputs to inputs
workflow_invocation = model.WorkflowInvocation()
workflow_invocation.workflow = workflow
@@ -1429,7 +1432,7 @@
except KeyError, k:
error( "Error due to input mapping of '%s' in '%s'. A common cause of this is conditional outputs that cannot be determined until runtime, please review your workflow." % (tool.name, k.message))
# Execute it
- job, out_data = tool.execute( trans, step.state.inputs, history=new_history)
+ job, out_data = tool.execute( trans, step.state.inputs, history=target_history)
outputs[ step.id ] = out_data
# Create new PJA associations with the created job, to be run on completion.
# PJA Parameter Replacement (only applies to immediate actions-- rename specifically, for now)
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: greg: Fixes for installing tool dependencies, and uninstalling repositories and tool dependencies.
by Bitbucket 11 Jul '12
by Bitbucket 11 Jul '12
11 Jul '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/f673cb8e75d9/
changeset: f673cb8e75d9
user: greg
date: 2012-07-11 17:53:22
summary: Fixes for installing tool dependencies, and uninstalling repositories and tool dependencies.
affected #: 2 files
diff -r 005f732eb00f76e7d1319dfb8288953aff9b8939 -r f673cb8e75d9978ef069fd0dcad9ee0dc065ac6e lib/galaxy/util/shed_util.py
--- a/lib/galaxy/util/shed_util.py
+++ b/lib/galaxy/util/shed_util.py
@@ -1210,6 +1210,8 @@
ElementInclude.include( root )
fabric_version_checked = False
for elem in root:
+ # Only install the package if it is not already installed.
+ can_install = False
if elem.tag == 'package':
package_name = elem.get( 'name', None )
package_version = elem.get( 'version', None )
@@ -1217,8 +1219,6 @@
# The value of tool_dependencies will be None only when this method is called by the InstallManager. In that case, tool
# dependency installation is not ajaxian, so the ToolDependency objects do not yet exist.
if tool_dependencies:
- # Only install the package if it is not already installed.
- can_install = False
for tool_dependency in tool_dependencies:
if tool_dependency.name==package_name and tool_dependency.version==package_version:
can_install = tool_dependency.status in [ app.model.ToolDependency.installation_status.NEVER_INSTALLED,
@@ -1457,6 +1457,7 @@
log.debug( error_message )
if removed:
tool_dependency.status = trans.model.ToolDependency.installation_status.UNINSTALLED
+ tool_dependency.error_message = None
trans.sa_session.add( tool_dependency )
trans.sa_session.flush()
return removed, error_message
diff -r 005f732eb00f76e7d1319dfb8288953aff9b8939 -r f673cb8e75d9978ef069fd0dcad9ee0dc065ac6e lib/galaxy/web/controllers/admin_toolshed.py
--- a/lib/galaxy/web/controllers/admin_toolshed.py
+++ b/lib/galaxy/web/controllers/admin_toolshed.py
@@ -437,6 +437,7 @@
tool_shed_repository.deleted = True
if remove_from_disk_checked:
tool_shed_repository.status = trans.model.ToolShedRepository.installation_status.UNINSTALLED
+ tool_shed_repository.error_message = None
else:
tool_shed_repository.status = trans.model.ToolShedRepository.installation_status.DEACTIVATED
trans.sa_session.add( tool_shed_repository )
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: greg: Fix the sqlite db connection string in the community app so local tool sheds will work when using sqlite.
by Bitbucket 11 Jul '12
by Bitbucket 11 Jul '12
11 Jul '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/005f732eb00f/
changeset: 005f732eb00f
user: greg
date: 2012-07-11 16:47:51
summary: Fix the sqlite db connection string in the community app so local tool sheds will work when using sqlite.
affected #: 1 file
diff -r 85dccacdfa80ba7818979049810a7891102fe2ef -r 005f732eb00f76e7d1319dfb8288953aff9b8939 lib/galaxy/webapps/community/app.py
--- a/lib/galaxy/webapps/community/app.py
+++ b/lib/galaxy/webapps/community/app.py
@@ -17,13 +17,12 @@
config.configure_logging( self.config )
# Set up datatypes registry
self.datatypes_registry = galaxy.datatypes.registry.Registry()
- # TODO: Handle datatypes included in repositories - the following will only load datatypes_conf.xml.
self.datatypes_registry.load_datatypes( self.config.root, self.config.datatypes_config )
# Determine the database url
if self.config.database_connection:
db_url = self.config.database_connection
else:
- db_url = "sqlite://%s?isolation_level=IMMEDIATE" % self.config.database
+ db_url = "sqlite:///%s?isolation_level=IMMEDIATE" % self.config.database
# Initialize database / check for appropriate schema version
from galaxy.webapps.community.model.migrate.check import create_or_verify_database
create_or_verify_database( db_url, self.config.database_engine_options )
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dan: Remove FreeBayes from tool_conf.xml.sample/main since it has been migrated to the toolshed.
by Bitbucket 10 Jul '12
by Bitbucket 10 Jul '12
10 Jul '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/85dccacdfa80/
changeset: 85dccacdfa80
user: dan
date: 2012-07-10 23:35:30
summary: Remove FreeBayes from tool_conf.xml.sample/main since it has been migrated to the toolshed.
affected #: 2 files
diff -r af62b5d831de40a19da96e8c1c4e20c02aa1983c -r 85dccacdfa80ba7818979049810a7891102fe2ef tool_conf.xml.main
--- a/tool_conf.xml.main
+++ b/tool_conf.xml.main
@@ -208,7 +208,6 @@
<tool file="phenotype_association/lps.xml" /><tool file="phenotype_association/hilbertvis.xml" /><tool file="phenotype_association/freebayes.xml" />
- <tool file="variant_detection/freebayes.xml" /><tool file="phenotype_association/master2pg.xml" /><tool file="phenotype_association/vcf2pgSnp.xml" /><tool file="phenotype_association/dividePgSnpAlleles.xml" />
@@ -319,9 +318,6 @@
<tool file="indels/indel_sam2interval.xml" /><tool file="indels/indel_analysis.xml" /></section>
- <section name="NGS: Variant Detection" id="variant_detection">
- <tool file="variant_detection/freebayes.xml" />
- </section><section name="NGS: Peak Calling" id="peak_calling"><tool file="peak_calling/macs_wrapper.xml" /><tool file="peak_calling/sicer_wrapper.xml" />
diff -r af62b5d831de40a19da96e8c1c4e20c02aa1983c -r 85dccacdfa80ba7818979049810a7891102fe2ef tool_conf.xml.sample
--- a/tool_conf.xml.sample
+++ b/tool_conf.xml.sample
@@ -477,7 +477,6 @@
<tool file="phenotype_association/lps.xml" /><tool file="phenotype_association/hilbertvis.xml" /><tool file="phenotype_association/freebayes.xml" />
- <tool file="variant_detection/freebayes.xml" /><tool file="phenotype_association/master2pg.xml" /><tool file="phenotype_association/vcf2pgSnp.xml" /><tool file="phenotype_association/dividePgSnpAlleles.xml" />
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/6a75ab8e6a2b/
changeset: 6a75ab8e6a2b
user: rmarenco
date: 2012-07-10 23:20:57
summary: Fix dataset tool parameter information form. Fixes #773
affected #: 1 file
diff -r 3e6ab1cf0c2eebbc886a7911e970f43bbfde522b -r 6a75ab8e6a2bcc08b2a4ad8af55c4afe62e390de templates/show_params.mako
--- a/templates/show_params.mako
+++ b/templates/show_params.mako
@@ -19,19 +19,27 @@
%elif input.type == "conditional":
<% current_case = param_values[input.name]['__current_case__'] %><tr>
- <td>${input.label}</td>
- <td>${current_case}</td>
+ ${ inputs_recursive_indent( text=input.test_param.label,depth=depth )}
+ <!-- Get the value of the current Conditonal parameter -->
+ <td>${input.cases[current_case].value}</td></tr>
${ inputs_recursive(input.cases[current_case].inputs, param_values[input.name], depth=depth+1) }
%elif getattr(input, "label", None):
<tr>
- <td>${input.label}</td>
+ ${inputs_recursive_indent( text=input.label,depth=depth )}
<td>${input.value_to_display_text(param_values[input.name], trans.app)}</td></tr>
%endif
%endfor
</%def>
+ ## function to add a indentation depending on the depth in a <tr>
+<%def name="inputs_recursive_indent( text, depth )">
+ <td style="padding-left: ${ ( depth - 1 ) * 10 }px">
+ ${text}
+ </td>
+</%def>
+
<table class="tabletip"><thead><tr><th colspan="2" style="font-size: 120%;">
https://bitbucket.org/galaxy/galaxy-central/changeset/af62b5d831de/
changeset: af62b5d831de
user: rmarenco
date: 2012-07-10 23:23:56
summary: Automerge
affected #: 2 files
diff -r 6a75ab8e6a2bcc08b2a4ad8af55c4afe62e390de -r af62b5d831de40a19da96e8c1c4e20c02aa1983c tool_conf.xml.main
--- a/tool_conf.xml.main
+++ b/tool_conf.xml.main
@@ -314,9 +314,6 @@
<tool file="gatk/variant_eval.xml" /><tool file="gatk/variant_combine.xml" /></section>
- <section name="NGS: Variant Detection" id="variant_detection">
- <tool file="variant_detection/freebayes.xml" />
- </section><section name="NGS: Indel Analysis" id="indel_analysis"><tool file="indels/sam_indel_filter.xml" /><tool file="indels/indel_sam2interval.xml" />
diff -r 6a75ab8e6a2bcc08b2a4ad8af55c4afe62e390de -r af62b5d831de40a19da96e8c1c4e20c02aa1983c tool_conf.xml.sample
--- a/tool_conf.xml.sample
+++ b/tool_conf.xml.sample
@@ -419,9 +419,6 @@
<tool file="gatk/variant_eval.xml" /><tool file="gatk/variant_combine.xml" /></section>
- <section name="NGS: Variant Detection" id="variant_detection">
- <tool file="variant_detection/freebayes.xml" />
- </section><section name="NGS: Peak Calling" id="peak_calling"><tool file="peak_calling/macs_wrapper.xml" /><tool file="peak_calling/sicer_wrapper.xml" />
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dan: Remove FreeBayes from tool_conf.xml.sample/main since it has been migrated to the toolshed.
by Bitbucket 10 Jul '12
by Bitbucket 10 Jul '12
10 Jul '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/791d67a5f3f3/
changeset: 791d67a5f3f3
user: dan
date: 2012-07-10 23:20:55
summary: Remove FreeBayes from tool_conf.xml.sample/main since it has been migrated to the toolshed.
affected #: 2 files
diff -r 3e6ab1cf0c2eebbc886a7911e970f43bbfde522b -r 791d67a5f3f3c5f3c0bc51c9fe8df040a0407990 tool_conf.xml.main
--- a/tool_conf.xml.main
+++ b/tool_conf.xml.main
@@ -314,9 +314,6 @@
<tool file="gatk/variant_eval.xml" /><tool file="gatk/variant_combine.xml" /></section>
- <section name="NGS: Variant Detection" id="variant_detection">
- <tool file="variant_detection/freebayes.xml" />
- </section><section name="NGS: Indel Analysis" id="indel_analysis"><tool file="indels/sam_indel_filter.xml" /><tool file="indels/indel_sam2interval.xml" />
diff -r 3e6ab1cf0c2eebbc886a7911e970f43bbfde522b -r 791d67a5f3f3c5f3c0bc51c9fe8df040a0407990 tool_conf.xml.sample
--- a/tool_conf.xml.sample
+++ b/tool_conf.xml.sample
@@ -419,9 +419,6 @@
<tool file="gatk/variant_eval.xml" /><tool file="gatk/variant_combine.xml" /></section>
- <section name="NGS: Variant Detection" id="variant_detection">
- <tool file="variant_detection/freebayes.xml" />
- </section><section name="NGS: Peak Calling" id="peak_calling"><tool file="peak_calling/macs_wrapper.xml" /><tool file="peak_calling/sicer_wrapper.xml" />
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: greg: Migrate the freebayes tool out of the Galaxy code distribution.
by Bitbucket 10 Jul '12
by Bitbucket 10 Jul '12
10 Jul '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/3e6ab1cf0c2e/
changeset: 3e6ab1cf0c2e
user: greg
date: 2012-07-10 22:23:34
summary: Migrate the freebayes tool out of the Galaxy code distribution.
affected #: 4 files
diff -r d07c00d96b60746a1e83713530a9070bf818e16c -r 3e6ab1cf0c2eebbc886a7911e970f43bbfde522b lib/galaxy/tool_shed/migrate/versions/0003_tools.py
--- /dev/null
+++ b/lib/galaxy/tool_shed/migrate/versions/0003_tools.py
@@ -0,0 +1,12 @@
+"""
+The freebayes tool has been eliminated from the distribution . The repository named freebayes from the main
+Galaxy tool shed at http://toolshed.g2.bx.psu.edu will be installed into your local Galaxy instance at the
+location discussed above by running the following command.
+"""
+
+import sys
+
+def upgrade():
+ print __doc__
+def downgrade():
+ pass
diff -r d07c00d96b60746a1e83713530a9070bf818e16c -r 3e6ab1cf0c2eebbc886a7911e970f43bbfde522b scripts/migrate_tools/0003_tools.sh
--- /dev/null
+++ b/scripts/migrate_tools/0003_tools.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd `dirname $0`/../..
+python ./scripts/migrate_tools/migrate_tools.py 0003_tools.xml $@
diff -r d07c00d96b60746a1e83713530a9070bf818e16c -r 3e6ab1cf0c2eebbc886a7911e970f43bbfde522b scripts/migrate_tools/0003_tools.xml
--- /dev/null
+++ b/scripts/migrate_tools/0003_tools.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<toolshed name="toolshed.g2.bx.psu.edu">
+ <repository name="freebayes" description="Galaxy Freebayes Bayesian genetic variant detector tool" changeset_revision="046c7983e2ff">
+ <tool id="freebayes" version="0.0.2 " file="freebayes.xml" />
+ </repository>
+</toolshed>
diff -r d07c00d96b60746a1e83713530a9070bf818e16c -r 3e6ab1cf0c2eebbc886a7911e970f43bbfde522b tools/variant_detection/freebayes.xml
--- a/tools/variant_detection/freebayes.xml
+++ /dev/null
@@ -1,670 +0,0 @@
-<?xml version="1.0"?>
-<tool id="freebayes" name="FreeBayes" version="0.0.2">
- <requirements>
- <requirement type="package" version="0.9.4">freebayes</requirement>
- <requirement type="package">samtools</requirement>
- </requirements>
- <description> - Bayesian genetic variant detector</description>
- <command>
- ##set up input files
- #set $reference_fasta_filename = "localref.fa"
- #if str( $reference_source.reference_source_selector ) == "history":
- ln -s "${reference_source.ref_file}" "${reference_fasta_filename}" &&
- samtools faidx "${reference_fasta_filename}" 2>&1 || echo "Error running samtools faidx for FreeBayes" >&2 &&
- #else:
- #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path )
- #end if
- #for $bam_count, $input_bam in enumerate( $reference_source.input_bams ):
- ln -s "${input_bam.input_bam}" "localbam_${bam_count}.bam" &&
- ln -s "${input_bam.input_bam.metadata.bam_index}" "localbam_${bam_count}.bam.bai" &&
- #end for
- ##finished setting up inputs
-
- ##start FreeBayes commandline
- freebayes
- #for $bam_count, $input_bam in enumerate( $reference_source.input_bams ):
- --bam "localbam_${bam_count}.bam"
- #end for
- --fasta-reference "${reference_fasta_filename}"
-
- ##outputs
- --vcf "${output_vcf}"
-
- ##advanced options
- #if str( $options_type.options_type_selector ) == "advanced":
- ##additional outputs
- #if $options_type.output_trace_option:
- --trace "${output_trace}"
- #end if
- #if $options_type.output_failed_alleles_option:
- --failed-alleles "${output_failed_alleles_bed}"
- #end if
-
- ##additional inputs
- #if str( $options_type.target_limit_type.target_limit_type_selector ) == "limit_by_target_file":
- --targets "${options_type.target_limit_type.input_target_bed}"
- #elif str( $options_type.target_limit_type.target_limit_type_selector ) == "limit_by_region":
- --region "${options_type.target_limit_type.region_chromosome}:${options_type.target_limit_type.region_start}..${options_type.target_limit_type.region_end}"
- #end if
- #if $options_type.input_sample_file:
- --samples "${options_type.input_sample_file}"
- #end if
- #if $options_type.input_populations_file:
- --populations "${options_type.input_populations_file}"
- #end if
- #if $options_type.input_cnv_map_bed:
- --cnv-map "${options_type.input_cnv_map_bed}"
- #end if
- #if str( $options_type.input_variant_type.input_variant_type_selector ) == "provide_vcf":
- --variant-input "${options_type.input_variant_type.input_variant_vcf}"
- ${options_type.input_variant_type.only_use_input_alleles}
- #end if
-
- ##reporting
- #if str( $options_type.section_reporting_type.section_reporting_type_selector ) == "set":
- --pvar "${options_type.section_reporting_type.pvar}"
- ${options_type.section_reporting_type.show_reference_repeats}
- #end if
-
- ##population model
- #if str( $options_type.section_population_model_type.section_population_model_type_selector ) == "set":
- --theta "${options_type.section_population_model_type.theta}"
- --ploidy "${options_type.section_population_model_type.ploidy}"
- ${options_type.section_population_model_type.pooled}
- #end if
-
- ##reference allele
- #if str( $options_type.use_reference_allele_type.use_reference_allele_type_selector ) == "include_reference_allele":
- --use-reference-allele
- ${options_type.use_reference_allele_type.diploid_reference}
- --reference-quality "${options_type.use_reference_allele_type.reference_quality_mq},${options_type.use_reference_allele_type.reference_quality_bq}"
- #end if
-
- ##allele scope
- #if str( $options_type.section_allele_scope_type.section_allele_scope_type_selector ) == "set":
- ${options_type.section_allele_scope_type.no_snps}
- ${options_type.section_allele_scope_type.no_indels}
- ${options_type.section_allele_scope_type.no_mnps}
- ${options_type.section_allele_scope_type.no_complex}
- --use-best-n-alleles "${options_type.section_allele_scope_type.use_best_n_alleles}"
- #if $options_type.section_allele_scope_type.max_complex_gap:
- --max-complex-gap "${options_type.section_allele_scope_type.max_complex_gap}"
- #end if
- #end if
-
- ##indel realignment
- ${options_type.left_align_indels}
-
- ##input filters
- #if str( $options_type.section_input_filters_type.section_input_filters_type_selector ) == "set":
- ${options_type.section_input_filters_type.use_duplicate_reads}
- #if str( $options_type.section_input_filters_type.no_filter_type.no_filter_type_selector ) == "apply_filters":
- --min-mapping-quality "${options_type.section_input_filters_type.no_filter_type.min_mapping_quality}"
- --min-base-quality "${options_type.section_input_filters_type.no_filter_type.min_base_quality}"
- --min-supporting-quality "${options_type.section_input_filters_type.no_filter_type.min_supporting_quality_mq},${options_type.section_input_filters_type.no_filter_type.min_supporting_quality_bq}"
- #else:
- --no-filters
- #end if
- --mismatch-base-quality-threshold "${options_type.section_input_filters_type.mismatch_base_quality_threshold}"
- #if $options_type.section_input_filters_type.read_mismatch_limit:
- --read-mismatch-limit "${options_type.section_input_filters_type.read_mismatch_limit}"
- #end if
- --read-max-mismatch-fraction "${options_type.section_input_filters_type.read_max_mismatch_fraction}"
- #if $options_type.section_input_filters_type.read_snp_limit:
- --read-snp-limit "${options_type.section_input_filters_type.read_snp_limit}"
- #end if
- #if $options_type.section_input_filters_type.read_indel_limit:
- --read-indel-limit "${options_type.section_input_filters_type.read_indel_limit}"
- #end if
- --indel-exclusion-window "${options_type.section_input_filters_type.indel_exclusion_window}"
- --min-alternate-fraction "${options_type.section_input_filters_type.min_alternate_fraction}"
- --min-alternate-count "${options_type.section_input_filters_type.min_alternate_count}"
- --min-alternate-qsum "${options_type.section_input_filters_type.min_alternate_qsum}"
- --min-alternate-total "${options_type.section_input_filters_type.min_alternate_total}"
- --min-coverage "${options_type.section_input_filters_type.min_coverage}"
- #end if
-
- ##bayesian priors
- #if str( $options_type.section_bayesian_priors_type.section_bayesian_priors_type_selector ) == "set":
- ${options_type.section_bayesian_priors_type.no_ewens_priors}
- ${options_type.section_bayesian_priors_type.no_population_priors}
- ${options_type.section_bayesian_priors_type.hwe_priors}
- #end if
-
- ##observation prior expectations
- #if str( $options_type.section_observation_prior_expectations_type.section_observation_prior_expectations_type_selector ) == "set":
- ${options_type.section_observation_prior_expectations_type.binomial_obs_priors}
- ${options_type.section_observation_prior_expectations_type.allele_balance_priors}
- #end if
-
- ##algorithmic features
- #if str( $options_type.section_algorithmic_features_type.section_algorithmic_features_type_selector ) == "set":
- --site-selection-max-iterations "${options_type.section_algorithmic_features_type.site_selection_max_iterations}"
- --genotyping-max-iterations "${options_type.section_algorithmic_features_type.genotyping_max_iterations}"
- --genotyping-max-banddepth "${options_type.section_algorithmic_features_type.genotyping_max_banddepth}"
- --posterior-integration-limits "${options_type.section_algorithmic_features_type.posterior_integration_limits_n},${options_type.section_algorithmic_features_type.posterior_integration_limits_m}"
- ${options_type.section_algorithmic_features_type.no_permute}
- ${options_type.section_algorithmic_features_type.exclude_unobserved_genotypes}
- #if $options_type.section_algorithmic_features_type.genotype_variant_threshold:
- --genotype-variant-threshold "${options_type.section_algorithmic_features_type.genotype_variant_threshold}"
- #end if
- ${options_type.section_algorithmic_features_type.use_mapping_quality}
- --read-dependence-factor "${options_type.section_algorithmic_features_type.read_dependence_factor}"
- ${options_type.section_algorithmic_features_type.no_marginals}
- #end if
-
- #end if
- </command>
- <inputs>
- <conditional name="reference_source">
- <param name="reference_source_selector" type="select" label="Choose the source for the reference list">
- <option value="cached">Locally cached</option>
- <option value="history">History</option>
- </param>
- <when value="cached">
- <repeat name="input_bams" title="Sample BAM file" min="1">
- <param name="input_bam" type="data" format="bam" label="BAM file">
- <validator type="unspecified_build" />
- <validator type="dataset_metadata_in_data_table" table_name="sam_fa_indexes" metadata_name="dbkey" metadata_column="value" message="Sequences are not currently available for the specified build." />
- </param>
- </repeat>
- <param name="ref_file" type="select" label="Using reference genome">
- <options from_data_table="sam_fa_indexes">
- <!-- <filter type="sam_fa_indexes" key="dbkey" ref="input_bam" column="value"/> does not yet work in a repeat...-->
- </options>
- <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
- </param>
- </when>
- <when value="history"><!-- FIX ME!!!! -->
- <repeat name="input_bams" title="Sample BAM file" min="1">
- <param name="input_bam" type="data" format="bam" label="BAM file" />
- </repeat>
- <param name="ref_file" type="data" format="fasta" label="Using reference file" />
- </when>
- </conditional>
-
- <conditional name="options_type">
- <param name="options_type_selector" type="select" label="Basic or Advanced options">
- <option value="basic" selected="True">Basic</option>
- <option value="advanced">Advanced</option>
- </param>
- <when value="basic">
- <!-- Do nothing here -->
- </when>
- <when value="advanced">
-
- <!-- output -->
- <param name="output_failed_alleles_option" type="boolean" truevalue="--failed-alleles" falsevalue="" checked="False" label="Write out failed alleles file" />
- <param name="output_trace_option" type="boolean" truevalue="--trace" falsevalue="" checked="False" label="Write out algorithm trace file" />
-
-
- <!-- input -->
- <conditional name="target_limit_type">
- <param name="target_limit_type_selector" type="select" label="Limit analysis to listed targets">
- <option value="do_not_limit" selected="True">Do not limit</option>
- <option value="limit_by_target_file">Limit by target file</option>
- <option value="limit_by_region">Limit to region</option>
- </param>
- <when value="do_not_limit">
- <!-- Do nothing here -->
- </when>
- <when value="limit_by_target_file">
- <param name="input_target_bed" type="data" format="bed" label="Limit analysis to targets listed in the BED-format FILE." />
- </when>
- <when value="limit_by_region">
- <param name="region_chromosome" type="text" label="Region Chromosome" value="" /><!--only once? -->
- <param name="region_start" type="integer" label="Region Start" value="" />
- <param name="region_end" type="integer" label="Region End" value="" />
- </when>
- </conditional>
- <param name="input_sample_file" type="data" format="txt" label="Limit analysis to samples listed (one per line) in the FILE" optional="True" />
- <param name="input_populations_file" type="data" format="txt" label="Populations File" optional="True" />
- <param name="input_cnv_map_bed" type="data" format="bed" label="Read a copy number map from the BED file FILE" optional="True" />
- <conditional name="input_variant_type">
- <param name="input_variant_type_selector" type="select" label="Provide variants file">
- <option value="do_not_provide" selected="True">Do not provide</option>
- <option value="provide_vcf">Provide VCF file</option>
- </param>
- <when value="do_not_provide">
- <!-- Do nothing here -->
- </when>
- <when value="provide_vcf">
- <param name="input_variant_vcf" type="data" format="vcf" label="Use variants reported in VCF file as input to the algorithm" />
- <param name="only_use_input_alleles" type="boolean" truevalue="--only-use-input-alleles" falsevalue="" checked="False" label="Only provide variant calls and genotype likelihoods for sites in VCF" />
- </when>
- </conditional>
-
-
- <!-- reporting -->
- <conditional name="section_reporting_type">
- <param name="section_reporting_type_selector" type="select" label="Set Reporting options">
- <option value="do_not_set" selected="True">Do not set</option>
- <option value="set">Set</option>
- </param>
- <when value="do_not_set">
- <!-- do nothing here -->
- </when>
- <when value="set">
- <param name="pvar" type="float" label="Report sites if the probability that there is a polymorphism at the site is greater" value="0.0001" />
- <param name="show_reference_repeats" type="boolean" truevalue="--show-reference-repeats" falsevalue="" checked="False" label="Calculate and show information about reference repeats" />
- </when>
- </conditional>
-
-
- <!-- population model -->
- <conditional name="section_population_model_type">
- <param name="section_population_model_type_selector" type="select" label="Set population model options">
- <option value="do_not_set" selected="True">Do not set</option>
- <option value="set">Set</option>
- </param>
- <when value="do_not_set">
- <!-- do nothing here -->
- </when>
- <when value="set">
- <param name="theta" type="float" label="expected mutation rate or pairwise nucleotide diversity among the population" value="0.001" help="This serves as the single parameter to the Ewens Sampling Formula prior model"/>
- <param name="ploidy" type="integer" label="default ploidy for the analysis" value="2" />
- <param name="pooled" type="boolean" truevalue="--pooled" falsevalue="" checked="False" label="Assume that samples result from pooled sequencing" help="When using this flag, set --ploidy to the number of alleles in each sample." />
- </when>
- </conditional>
-
- <!-- reference allele -->
- <conditional name="use_reference_allele_type">
- <param name="use_reference_allele_type_selector" type="select" label="Include the reference allele in the analysis">
- <option value="do_not_include_reference_allele" selected="True">Do not include</option>
- <option value="include_reference_allele">Include</option>
- </param>
- <when value="do_not_include_reference_allele">
- <!-- Do nothing here -->
- </when>
- <when value="include_reference_allele">
- <param name="diploid_reference" type="boolean" truevalue="--diploid-reference" falsevalue="" checked="False" label="Treat reference as diploid" />
- <param name="reference_quality_mq" type="integer" label="Assign mapping quality" value="100" />
- <param name="reference_quality_bq" type="integer" label="Assign base quality" value="60" />
- </when>
- </conditional>
-
- <!-- allele scope -->
- <conditional name="section_allele_scope_type">
- <param name="section_allele_scope_type_selector" type="select" label="Set allele scope options">
- <option value="do_not_set" selected="True">Do not set</option>
- <option value="set">Set</option>
- </param>
- <when value="do_not_set">
- <!-- do nothing here -->
- </when>
- <when value="set">
- <param name="no_snps" type="boolean" truevalue="--no-snps" falsevalue="" checked="False" label="Ignore SNP alleles" />
- <param name="no_indels" type="boolean" truevalue="--no-indels" falsevalue="" checked="False" label="Ignore insertion and deletion alleles" />
- <param name="no_mnps" type="boolean" truevalue="--no-mnps" falsevalue="" checked="False" label="Ignore multi-nuceotide polymorphisms, MNPs" />
- <param name="no_complex" type="boolean" truevalue="--no-complex" falsevalue="" checked="False" label="Ignore complex events (composites of other classes)" />
- <param name="use_best_n_alleles" type="integer" label="Evaluate only the best N SNP alleles" value="0" min="0" help="Ranked by sum of supporting quality scores; Set to 0 to use all" />
- <param name="max_complex_gap" type="integer" label="Allow complex alleles with contiguous embedded matches of up to this length" value="" optional="True"/>
- </when>
- </conditional>
-
- <!-- indel realignment -->
- <param name="left_align_indels" type="boolean" truevalue="--left-align-indels" falsevalue="" checked="False" label="Left-realign and merge gaps embedded in reads" />
-
- <!-- input filters -->
- <conditional name="section_input_filters_type">
- <param name="section_input_filters_type_selector" type="select" label="Set input filters options">
- <option value="do_not_set" selected="True">Do not set</option>
- <option value="set">Set</option>
- </param>
- <when value="do_not_set">
- <!-- do nothing here -->
- </when>
- <when value="set">
- <param name="use_duplicate_reads" type="boolean" truevalue="--use-duplicate-reads" falsevalue="" checked="False" label="Include duplicate-marked alignments in the analysis" />
- <conditional name="no_filter_type">
- <param name="no_filter_type_selector" type="select" label="Apply filters">
- <option value="apply_filters" selected="True">Apply</option>
- <option value="no_filters">Do not apply</option>
- </param>
- <when value="no_filters">
- <!-- Do nothing here --><!-- no-filters -->
- </when>
- <when value="apply_filters">
- <param name="min_mapping_quality" type="integer" label="Exclude alignments from analysis if they have a mapping quality less than" value="30" />
- <param name="min_base_quality" type="integer" label="Exclude alleles from analysis if their supporting base quality less than" value="20" />
- <param name="min_supporting_quality_mq" type="integer" label="In order to consider an alternate allele, at least one supporting alignment must have mapping quality" value="0" />
- <param name="min_supporting_quality_bq" type="integer" label="In order to consider an alternate allele, at least one supporting alignment must have base quality" value="0" />
- </when>
- </conditional>
- <param name="mismatch_base_quality_threshold" type="integer" label="Count mismatches toward read-mismatch-limit if the base quality of the mismatch is >=" value="10" />
- <param name="read_mismatch_limit" type="integer" label="Exclude reads with more than N mismatches where each mismatch has base quality >= mismatch-base-quality-threshold" value="" optional="True" />
- <param name="read_max_mismatch_fraction" type="float" label="Exclude reads with more than N [0,1] fraction of mismatches where each mismatch has base quality >= mismatch-base-quality-threshold" value="1.0" />
- <param name="read_snp_limit" type="integer" label="Exclude reads with more than N base mismatches, ignoring gaps with quality >= mismatch-base-quality-threshold" value="" optional="True" />
- <param name="read_indel_limit" type="integer" label="Exclude reads with more than N separate gaps" value="" optional="True" />
- <param name="indel_exclusion_window" type="integer" label="Ignore portions of alignments this many bases from a putative insertion or deletion allele" value="0" />
- <param name="min_alternate_fraction" type="float" label="Require at least this fraction of observations supporting an alternate allele within a single individual in the in order to evaluate the position" value="0" />
- <param name="min_alternate_count" type="integer" label="Require at least this count of observations supporting an alternate allele within a single individual in order to evaluate the position" value="1" />
- <param name="min_alternate_qsum" type="integer" label="Require at least this sum of quality of observations supporting an alternate allele within a single individual in order to evaluate the position" value="0" />
- <param name="min_alternate_total" type="integer" label="Require at least this count of observations supporting an alternate allele within the total population in order to use the allele in analysis" value="1" />
- <param name="min_coverage" type="integer" label="Require at least this coverage to process a site" value="0" />
- </when>
- </conditional>
-
-
- <!-- bayesian priors -->
- <conditional name="section_bayesian_priors_type">
- <param name="section_bayesian_priors_type_selector" type="select" label="Set bayesian priors options">
- <option value="do_not_set" selected="True">Do not set</option>
- <option value="set">Set</option>
- </param>
- <when value="do_not_set">
- <!-- do nothing here -->
- </when>
- <when value="set">
- <param name="no_ewens_priors" type="boolean" truevalue="--no-ewens-priors" falsevalue="" checked="False" label="Turns off the Ewens' Sampling Formula component of the priors" />
- <param name="no_population_priors" type="boolean" truevalue="--no-population-priors" falsevalue="" checked="False" label="No population priors" help="Equivalent to --pooled --no-ewens-priors" />
- <param name="hwe_priors" type="boolean" truevalue="--hwe-priors" falsevalue="" checked="False" label="Use the probability of the combination arising under HWE given the allele frequency as estimated by observation frequency" />
- </when>
- </conditional>
-
- <!-- observation prior expectations -->
- <conditional name="section_observation_prior_expectations_type">
- <param name="section_observation_prior_expectations_type_selector" type="select" label="Set observation prior expectations options">
- <option value="do_not_set" selected="True">Do not set</option>
- <option value="set">Set</option>
- </param>
- <when value="do_not_set">
- <!-- do nothing here -->
- </when>
- <when value="set">
- <param name="binomial_obs_priors" type="boolean" truevalue="--binomial-obs-priors" falsevalue="" checked="False" label="Incorporate expectations about osbervations into the priors, Uses read placement probability, strand balance probability, and read position (5'-3') probability" />
- <param name="allele_balance_priors" type="boolean" truevalue="--allele-balance-priors" falsevalue="" checked="False" label="Use aggregate probability of observation balance between alleles as a component of the priors. Best for observations with minimal inherent reference bias" />
- </when>
- </conditional>
-
-
- <!-- algorithmic features -->
- <conditional name="section_algorithmic_features_type">
- <param name="section_algorithmic_features_type_selector" type="select" label="Set algorithmic features options">
- <option value="do_not_set" selected="True">Do not set</option>
- <option value="set">Set</option>
- </param>
- <when value="do_not_set">
- <!-- do nothing here -->
- </when>
- <when value="set">
- <param name="site_selection_max_iterations" type="integer" label="Uses hill-climbing algorithm to search posterior space for N iterations to determine if the site should be evaluated." value="5" help="Set to 0 to prevent use of this algorithm for site selection, and to a low integer for improvide site selection at a slight performance penalty" />
- <param name="genotyping_max_iterations" type="integer" label="Iterate no more than N times during genotyping step" value="25" />
- <param name="genotyping_max_banddepth" type="integer" label="Integrate no deeper than the Nth best genotype by likelihood when genotyping" value="6" />
- <param name="posterior_integration_limits_n" type="integer" label="Posteriror integration limit N" help="Integrate all genotype combinations in our posterior space which include no more than N samples with their Mth best data likelihood." value="1" />
- <param name="posterior_integration_limits_m" type="integer" label="Posteriror integration limit M" help="Integrate all genotype combinations in our posterior space which include no more than N samples with their Mth best data likelihood." value="3" />
- <param name="no_permute" type="boolean" truevalue="--no-permute" falsevalue="" checked="False" label="Do not scale prior probability of genotype combination given allele frequency by the number of permutations of included genotypes" />
- <param name="exclude_unobserved_genotypes" type="boolean" truevalue="--exclude-unobserved-genotypes" falsevalue="" checked="False" label="Skip sample genotypings for which the sample has no supporting reads" />
- <param name="genotype_variant_threshold" type="integer" label="Limit posterior integration to samples where the second-best genotype likelihood is no more than log(N) from the highest genotype likelihood for the sample" value="" optional="True" />
- <param name="use_mapping_quality" type="boolean" truevalue="--use-mapping-quality" falsevalue="" checked="False" label="Use mapping quality of alleles when calculating data likelihoods" />
- <param name="read_dependence_factor" type="float" label="Incorporate non-independence of reads by scaling successive observations by this factor during data likelihood calculations" value="0.9" />
- <param name="no_marginals" type="boolean" truevalue="--no-marginals" falsevalue="" checked="False" label="Do not calculate the marginal probability of genotypes. Saves time and improves scaling performance in large populations" />
- </when>
- </conditional>
-
-
- </when>
- </conditional>
-
- </inputs>
- <outputs>
- <data format="vcf" name="output_vcf" label="${tool.name} on ${on_string} (variants)" />
- <data format="bed" name="output_failed_alleles_bed" label="${tool.name} on ${on_string} (failed alleles)">
- <filter>options_type['options_type_selector'] == "advanced" and options_type['output_failed_alleles_option'] is True</filter>
- </data>
- <data format="txt" name="output_trace" label="${tool.name} on ${on_string} (trace)">
- <filter>options_type['options_type_selector'] == "advanced" and options_type['output_trace_option'] is True</filter>
- </data>
- </outputs>
- <tests>
- <test>
- <param name="reference_source_selector" value="history" />
- <param name="ref_file" ftype="fasta" value="phiX.fasta"/>
- <param name="input_bam" ftype="bam" value="gatk/fake_phiX_reads_1.bam"/>
- <param name="options_type_selector" value="basic"/>
- <output name="output_vcf" file="variant_detection/freebayes/freebayes_out_1.vcf.contains" compare="contains"/>
- <!-- <output name="output_failed_alleles_bed" file="empty_file.dat" />
- <output name="output_trace" file="variant_detection/freebayes/freebayes_out_1.output_trace" /> -->
- </test>
- </tests>
- <help>
-**What it does**
-
-This tool uses FreeBayes to call SNPS given a reference sequence and a BAM alignment file.
-
-FreeBayes is a high-performance, flexible, and open-source Bayesian genetic variant detector. It operates on BAM alignment files, which are produced by most contemporary short-read aligners.
-
-In addition to substantial performance improvements over its predecessors (PolyBayes, GigaBayes, and BamBayes), it expands the scope of SNP and small-indel variant calling to populations of individuals with heterogeneous copy number. FreeBayes is currently under active development.
-
-Go `here <http://bioinformatics.bc.edu/marthlab/FreeBayes>`_ for details on FreeBayes.
-
-------
-
-**Inputs**
-
-FreeBayes accepts an input aligned BAM file.
-
-
-**Outputs**
-
-The output is in the VCF format.
-
--------
-
-**Settings**::
-
- input and output:
-
- -b --bam FILE Add FILE to the set of BAM files to be analyzed.
- -c --stdin Read BAM input on stdin.
- -v --vcf FILE Output VCF-format results to FILE.
- -f --fasta-reference FILE
- Use FILE as the reference sequence for analysis.
- An index file (FILE.fai) will be created if none exists.
- If neither --targets nor --region are specified, FreeBayes
- will analyze every position in this reference.
- -t --targets FILE
- Limit analysis to targets listed in the BED-format FILE.
- -r --region <chrom>:<start_position>..<end_position>
- Limit analysis to the specified region, 0-base coordinates,
- end_position not included (same as BED format).
- -s --samples FILE
- Limit analysis to samples listed (one per line) in the FILE.
- By default FreeBayes will analyze all samples in its input
- BAM files.
- --populations FILE
- Each line of FILE should list a sample and a population which
- it is part of. The population-based bayesian inference model
- will then be partitioned on the basis of the populations.
- -A --cnv-map FILE
- Read a copy number map from the BED file FILE, which has
- the format:
- reference sequence, start, end, sample name, copy number
- ... for each region in each sample which does not have the
- default copy number as set by --ploidy.
- -L --trace FILE Output an algorithmic trace to FILE.
- --failed-alleles FILE
- Write a BED file of the analyzed positions which do not
- pass --pvar to FILE.
- -@ --variant-input VCF
- Use variants reported in VCF file as input to the algorithm.
- A report will be generated for every record in the VCF file.
- -l --only-use-input-alleles
- Only provide variant calls and genotype likelihoods for sites
- and alleles which are provided in the VCF input, and provide
- output in the VCF for all input alleles, not just those which
- have support in the data.
-
- reporting:
-
- -P --pvar N Report sites if the probability that there is a polymorphism
- at the site is greater than N. default: 0.0001
- -_ --show-reference-repeats
- Calculate and show information about reference repeats in
- the VCF output.
-
- population model:
-
- -T --theta N The expected mutation rate or pairwise nucleotide diversity
- among the population under analysis. This serves as the
- single parameter to the Ewens Sampling Formula prior model
- default: 0.001
- -p --ploidy N Sets the default ploidy for the analysis to N. default: 2
- -J --pooled Assume that samples result from pooled sequencing.
- When using this flag, set --ploidy to the number of
- alleles in each sample.
-
- reference allele:
-
- -Z --use-reference-allele
- This flag includes the reference allele in the analysis as
- if it is another sample from the same population.
- -H --diploid-reference
- If using the reference sequence as a sample (-Z),
- treat it as diploid. default: false (reference is haploid)
- --reference-quality MQ,BQ
- Assign mapping quality of MQ to the reference allele at each
- site and base quality of BQ. default: 100,60
-
- allele scope:
-
- -I --no-snps Ignore SNP alleles.
- -i --no-indels Ignore insertion and deletion alleles.
- -X --no-mnps Ignore multi-nuceotide polymorphisms, MNPs.
- -u --no-complex Ignore complex events (composites of other classes).
- -n --use-best-n-alleles N
- Evaluate only the best N SNP alleles, ranked by sum of
- supporting quality scores. (Set to 0 to use all; default: all)
- -E --max-complex-gap N
- Allow complex alleles with contiguous embedded matches of up
- to this length.
-
- indel realignment:
-
- -O --left-align-indels
- Left-realign and merge gaps embedded in reads. default: false
-
- input filters:
-
- -4 --use-duplicate-reads
- Include duplicate-marked alignments in the analysis.
- default: exclude duplicates
- -m --min-mapping-quality Q
- Exclude alignments from analysis if they have a mapping
- quality less than Q. default: 30
- -q --min-base-quality Q
- Exclude alleles from analysis if their supporting base
- quality is less than Q. default: 20
- -R --min-supporting-quality MQ,BQ
- In order to consider an alternate allele, at least one supporting
- alignment must have mapping quality MQ, and one supporting
- allele must have base quality BQ. default: 0,0, unset
- -Q --mismatch-base-quality-threshold Q
- Count mismatches toward --read-mismatch-limit if the base
- quality of the mismatch is >= Q. default: 10
- -U --read-mismatch-limit N
- Exclude reads with more than N mismatches where each mismatch
- has base quality >= mismatch-base-quality-threshold.
- default: ~unbounded
- -z --read-max-mismatch-fraction N
- Exclude reads with more than N [0,1] fraction of mismatches where
- each mismatch has base quality >= mismatch-base-quality-threshold
- default: 1.0
- -$ --read-snp-limit N
- Exclude reads with more than N base mismatches, ignoring gaps
- with quality >= mismatch-base-quality-threshold.
- default: ~unbounded
- -e --read-indel-limit N
- Exclude reads with more than N separate gaps.
- default: ~unbounded
- -0 --no-filters Do not use any input base and mapping quality filters
- Equivalent to -m 0 -q 0 -R 0 -S 0
- -x --indel-exclusion-window
- Ignore portions of alignments this many bases from a
- putative insertion or deletion allele. default: 0
- -F --min-alternate-fraction N
- Require at least this fraction of observations supporting
- an alternate allele within a single individual in the
- in order to evaluate the position. default: 0.0
- -C --min-alternate-count N
- Require at least this count of observations supporting
- an alternate allele within a single individual in order
- to evaluate the position. default: 1
- -3 --min-alternate-qsum N
- Require at least this sum of quality of observations supporting
- an alternate allele within a single individual in order
- to evaluate the position. default: 0
- -G --min-alternate-total N
- Require at least this count of observations supporting
- an alternate allele within the total population in order
- to use the allele in analysis. default: 1
- -! --min-coverage N
- Require at least this coverage to process a site. default: 0
-
- bayesian priors:
-
- -Y --no-ewens-priors
- Turns off the Ewens' Sampling Formula component of the priors.
- -k --no-population-priors
- Equivalent to --pooled --no-ewens-priors
- -w --hwe-priors Use the probability of the combination arising under HWE given
- the allele frequency as estimated by observation frequency.
-
- observation prior expectations:
-
- -V --binomial-obs-priors
- Incorporate expectations about osbervations into the priors,
- Uses read placement probability, strand balance probability,
- and read position (5'-3') probability.
- -a --allele-balance-priors
- Use aggregate probability of observation balance between alleles
- as a component of the priors. Best for observations with minimal
- inherent reference bias.
-
- algorithmic features:
-
- -M --site-selection-max-iterations N
- Uses hill-climbing algorithm to search posterior space for N
- iterations to determine if the site should be evaluated. Set to 0
- to prevent use of this algorithm for site selection, and
- to a low integer for improvide site selection at a slight
- performance penalty. default: 5.
- -B --genotyping-max-iterations N
- Iterate no more than N times during genotyping step. default: 25.
- --genotyping-max-banddepth N
- Integrate no deeper than the Nth best genotype by likelihood when
- genotyping. default: 6.
- -W --posterior-integration-limits N,M
- Integrate all genotype combinations in our posterior space
- which include no more than N samples with their Mth best
- data likelihood. default: 1,3.
- -K --no-permute
- Do not scale prior probability of genotype combination given allele
- frequency by the number of permutations of included genotypes.
- -N --exclude-unobserved-genotypes
- Skip sample genotypings for which the sample has no supporting reads.
- -S --genotype-variant-threshold N
- Limit posterior integration to samples where the second-best
- genotype likelihood is no more than log(N) from the highest
- genotype likelihood for the sample. default: ~unbounded
- -j --use-mapping-quality
- Use mapping quality of alleles when calculating data likelihoods.
- -D --read-dependence-factor N
- Incorporate non-independence of reads by scaling successive
- observations by this factor during data likelihood
- calculations. default: 0.9
- -= --no-marginals
- Do not calculate the marginal probability of genotypes. Saves
- time and improves scaling performance in large populations.
-
-
-------
-
-**Citation**
-
-For the underlying tool, please cite `FreeBayes <http://bioinformatics.bc.edu/marthlab/FreeBayes>`_.
-
-If you use this tool in Galaxy, please cite Blankenberg D, et al. *In preparation.*
-
- </help>
-</tool>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: jgoecks: Fix duplicate inclusion of tipsy library in base panels.
by Bitbucket 10 Jul '12
by Bitbucket 10 Jul '12
10 Jul '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/d07c00d96b60/
changeset: d07c00d96b60
user: jgoecks
date: 2012-07-10 18:44:35
summary: Fix duplicate inclusion of tipsy library in base panels.
affected #: 2 files
diff -r 7dcea1c1c833dac37844430180db6705d4846aa3 -r d07c00d96b60746a1e83713530a9070bf818e16c templates/webapps/community/base_panels.mako
--- a/templates/webapps/community/base_panels.mako
+++ b/templates/webapps/community/base_panels.mako
@@ -5,7 +5,6 @@
<%def name="javascripts()">
${parent.javascripts()}
- ${h.js( "jquery.tipsy" )}
</%def>
## Masthead
diff -r 7dcea1c1c833dac37844430180db6705d4846aa3 -r d07c00d96b60746a1e83713530a9070bf818e16c templates/webapps/galaxy/base_panels.mako
--- a/templates/webapps/galaxy/base_panels.mako
+++ b/templates/webapps/galaxy/base_panels.mako
@@ -5,7 +5,6 @@
<%def name="javascripts()">
${parent.javascripts()}
- ${h.js( "jquery.tipsy" )}
</%def>
## Masthead
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: greg: Fixes for installing tool shed repositories that include proprietary datatypes.
by Bitbucket 10 Jul '12
by Bitbucket 10 Jul '12
10 Jul '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/7dcea1c1c833/
changeset: 7dcea1c1c833
user: greg
date: 2012-07-10 17:38:32
summary: Fixes for installing tool shed repositories that include proprietary datatypes.
affected #: 6 files
diff -r 761a17ad3aad454283abca2bf33866ad954a2d97 -r 7dcea1c1c833dac37844430180db6705d4846aa3 lib/galaxy/tool_shed/install_manager.py
--- a/lib/galaxy/tool_shed/install_manager.py
+++ b/lib/galaxy/tool_shed/install_manager.py
@@ -190,9 +190,11 @@
except:
pass
if 'datatypes' in metadata_dict:
- update_tool_shed_repository_status( self.app,
- tool_shed_repository,
- self.app.model.ToolShedRepository.installation_status.LOADING_PROPRIETARY_DATATYPES )
+ tool_shed_repository.status = self.app.model.ToolShedRepository.installation_status.LOADING_PROPRIETARY_DATATYPES
+ if not tool_shed_repository.includes_datatypes:
+ tool_shed_repository.includes_datatypes = True
+ self.app.sa_session.add( tool_shed_repository )
+ self.app.sa_session.flush()
work_dir = make_tmp_directory()
datatypes_config = get_config_from_repository( self.app,
'datatypes_conf.xml',
diff -r 761a17ad3aad454283abca2bf33866ad954a2d97 -r 7dcea1c1c833dac37844430180db6705d4846aa3 lib/galaxy/util/shed_util.py
--- a/lib/galaxy/util/shed_util.py
+++ b/lib/galaxy/util/shed_util.py
@@ -309,6 +309,15 @@
for filename in sample_files:
if filename not in sample_files_copied:
copy_sample_file( app, filename, dest_path=dest_path )
+def create_repo_info_dict( repository, owner, repository_clone_url, changeset_revision, ctx_rev, metadata ):
+ repo_info_dict = {}
+ repo_info_dict[ repository.name ] = ( repository.description,
+ repository_clone_url,
+ changeset_revision,
+ ctx_rev,
+ owner,
+ metadata.get( 'tool_dependencies', None ) )
+ return repo_info_dict
def create_repository_dict_for_proprietary_datatypes( tool_shed, name, owner, installed_changeset_revision, tool_dicts, converter_path=None, display_path=None ):
return dict( tool_shed=tool_shed,
repository_name=name,
diff -r 761a17ad3aad454283abca2bf33866ad954a2d97 -r 7dcea1c1c833dac37844430180db6705d4846aa3 lib/galaxy/web/base/controller.py
--- a/lib/galaxy/web/base/controller.py
+++ b/lib/galaxy/web/base/controller.py
@@ -1,7 +1,7 @@
"""
Contains functionality needed in every web interface
"""
-import os, time, logging, re, string, sys, glob, shutil, tempfile, subprocess
+import os, time, logging, re, string, sys, glob, shutil, tempfile, subprocess, operator
from datetime import date, datetime, timedelta
from time import strftime
from galaxy import config, tools, web, util
@@ -177,6 +177,14 @@
def not_implemented( self, trans, **kwd ):
raise HTTPNotImplemented()
+class Datatype( object ):
+ """Used for storing in-memory list of datatypes currently in the datatypes registry."""
+ def __init__( self, extension, dtype, type_extension, mimetype, display_in_upload ):
+ self.extension = extension
+ self.dtype = dtype
+ self.type_extension = type_extension
+ self.mimetype = mimetype
+ self.display_in_upload = display_in_upload
#
# -- Mixins for working with Galaxy objects. --
#
@@ -2722,3 +2730,18 @@
return trans.environ[ 'webapp' ]
# The default is galaxy.
return 'galaxy'
+def sort_by_attr( seq, attr ):
+ """
+ Sort the sequence of objects by object's attribute
+ Arguments:
+ seq - the list or any sequence (including immutable one) of objects to sort.
+ attr - the name of attribute to sort by
+ """
+ # Use the "Schwartzian transform"
+ # Create the auxiliary list of tuples where every i-th tuple has form
+ # (seq[i].attr, i, seq[i]) and sort it. The second item of tuple is needed not
+ # only to provide stable sorting, but mainly to eliminate comparison of objects
+ # (which can be expensive or prohibited) in case of equal attribute values.
+ intermed = map( None, map( getattr, seq, ( attr, ) * len( seq ) ), xrange( len( seq ) ), seq )
+ intermed.sort()
+ return map( operator.getitem, intermed, ( -1, ) * len( intermed ) )
diff -r 761a17ad3aad454283abca2bf33866ad954a2d97 -r 7dcea1c1c833dac37844430180db6705d4846aa3 lib/galaxy/web/controllers/admin_toolshed.py
--- a/lib/galaxy/web/controllers/admin_toolshed.py
+++ b/lib/galaxy/web/controllers/admin_toolshed.py
@@ -605,7 +605,8 @@
tool_section = trans.app.toolbox.tool_panel[ tool_panel_section_key ]
else:
tool_section = None
- for tool_shed_repository, repo_info_dict in zip( tool_shed_repositories, repo_info_dicts ):
+ for tup in zip( tool_shed_repositories, repo_info_dicts ):
+ tool_shed_repository, repo_info_dict = tup
# Clone each repository to the configured location.
update_tool_shed_repository_status( trans.app, tool_shed_repository, trans.model.ToolShedRepository.installation_status.CLONING )
repo_info_tuple = repo_info_dict[ tool_shed_repository.name ]
@@ -670,37 +671,6 @@
shutil.rmtree( work_dir )
except:
pass
- if 'datatypes' in metadata:
- update_tool_shed_repository_status( trans.app,
- tool_shed_repository,
- trans.model.ToolShedRepository.installation_status.LOADING_PROPRIETARY_DATATYPES )
- work_dir = make_tmp_directory()
- datatypes_config = get_config_from_repository( trans.app,
- 'datatypes_conf.xml',
- tool_shed_repository,
- tool_shed_repository.installed_changeset_revision,
- work_dir )
- # Load proprietary data types required by tools.
- converter_path, display_path = alter_config_and_load_prorietary_datatypes( trans.app, datatypes_config, relative_install_dir, override=False )
- if converter_path or display_path:
- # Create a dictionary of tool shed repository related information.
- repository_dict = create_repository_dict_for_proprietary_datatypes( tool_shed=self.tool_shed,
- name=tool_shed_repository.name,
- owner=tool_shed_repository.owner,
- installed_changeset_revision=tool_shed_repository.installed_changeset_revision,
- tool_dicts=metadata.get( 'tools', [] ),
- converter_path=converter_path,
- display_path=display_path )
- if converter_path:
- # Load proprietary datatype converters
- trans.app.datatypes_registry.load_datatype_converters( trans.app.toolbox, installed_repository_dict=repository_dict )
- if display_path:
- # Load proprietary datatype display applications
- trans.app.datatypes_registry.load_display_applications( installed_repository_dict=repository_dict )
- try:
- shutil.rmtree( work_dir )
- except:
- pass
update_tool_shed_repository_status( trans.app, tool_shed_repository, trans.model.ToolShedRepository.installation_status.INSTALLED )
tsr_ids_for_monitoring = [ trans.security.encode_id( tsr.id ) for tsr in tool_shed_repositories ]
return trans.response.send_redirect( web.url_for( controller='admin_toolshed',
@@ -749,9 +719,11 @@
except:
pass
if 'datatypes' in metadata_dict:
- update_tool_shed_repository_status( trans.app,
- tool_shed_repository,
- trans.model.ToolShedRepository.installation_status.LOADING_PROPRIETARY_DATATYPES )
+ tool_shed_repository.status = trans.model.ToolShedRepository.installation_status.LOADING_PROPRIETARY_DATATYPES
+ if not tool_shed_repository.includes_datatypes:
+ tool_shed_repository.includes_datatypes = True
+ trans.sa_session.add( tool_shed_repository )
+ trans.sa_session.flush()
work_dir = make_tmp_directory()
datatypes_config = get_config_from_repository( trans.app,
'datatypes_conf.xml',
@@ -1255,13 +1227,12 @@
repo_info_dict = kwd.get( 'repo_info_dict', None )
if not repo_info_dict:
# This should only happen if the tool_shed_repository does not include any valid tools.
- repo_info_dict = {}
- repo_info_dict[ tool_shed_repository.name ] = ( tool_shed_repository.description,
- repository_clone_url,
- tool_shed_repository.installed_changeset_revision,
- ctx_rev,
- tool_shed_repository.owner,
- metadata.get( 'tool_dependencies', None ) )
+ repo_info_dict = create_repo_info_dict( tool_shed_repository,
+ tool_shed_repository.owner,
+ repository_clone_url,
+ tool_shed_repository.installed_changeset_revision,
+ ctx_rev,
+ metadata )
new_kwd = dict( includes_tool_dependencies=tool_shed_repository.includes_tool_dependencies,
includes_tools=tool_shed_repository.includes_tools,
install_tool_dependencies=install_tool_dependencies,
@@ -1291,7 +1262,8 @@
if ids is not None and status_list is not None:
ids = util.listify( ids )
status_list = util.listify( status_list )
- for id, status in zip( ids, status_list ):
+ for tup in zip( ids, status_list ):
+ id, status = tup
repository = trans.sa_session.query( trans.model.ToolShedRepository ).get( trans.security.decode_id( id ) )
if repository.status != status:
rval.append( dict( id=id,
@@ -1335,13 +1307,12 @@
tool_shed_url = get_url_from_repository_tool_shed( trans.app, repository )
ctx_rev = get_ctx_rev( tool_shed_url, repository.name, repository.owner, repository.installed_changeset_revision )
repository_clone_url = generate_clone_url( trans, repository )
- repo_info_dict = {}
- repo_info_dict[ repository.name ] = ( repository.description,
- repository_clone_url,
- repository.installed_changeset_revision,
- ctx_rev,
- repository.owner,
- metadata.get( 'tool_dependencies', None ) )
+ repo_info_dict = create_repo_info_dict( repository,
+ repository.owner,
+ repository_clone_url,
+ repository.installed_changeset_revision,
+ ctx_rev,
+ metadata )
# Get the location in the tool panel in which the tool was originally loaded.
if 'tool_panel_section' in metadata:
tool_panel_dict = metadata[ 'tool_panel_section' ]
@@ -1419,7 +1390,8 @@
if ids is not None and status_list is not None:
ids = util.listify( ids )
status_list = util.listify( status_list )
- for id, status in zip( ids, status_list ):
+ for tup in zip( ids, status_list ):
+ id, status = tup
tool_dependency = trans.sa_session.query( trans.model.ToolDependency ).get( trans.security.decode_id( id ) )
if tool_dependency.status != status:
rval.append( dict( id=id,
diff -r 761a17ad3aad454283abca2bf33866ad954a2d97 -r 7dcea1c1c833dac37844430180db6705d4846aa3 lib/galaxy/webapps/community/controllers/repository.py
--- a/lib/galaxy/webapps/community/controllers/repository.py
+++ b/lib/galaxy/webapps/community/controllers/repository.py
@@ -9,7 +9,7 @@
from galaxy.web.framework.helpers import time_ago, iff, grids
from galaxy.util.json import from_json_string, to_json_string
from galaxy.model.orm import *
-from galaxy.util.shed_util import get_changectx_for_changeset, get_configured_ui, get_repository_file_contents, make_tmp_directory, NOT_TOOL_CONFIGS
+from galaxy.util.shed_util import create_repo_info_dict, get_changectx_for_changeset, get_configured_ui, get_repository_file_contents, make_tmp_directory, NOT_TOOL_CONFIGS
from galaxy.util.shed_util import open_repository_files_folder, reversed_lower_upper_bounded_changelog, strip_path
from galaxy.tool_shed.encoding_util import *
from common import *
@@ -931,29 +931,6 @@
trans.sa_session.flush()
download_url = '/repos/%s/%s/archive/%s' % ( repository.user.username, repository.name, file_type_str )
return trans.response.send_redirect( download_url )
- def __encode_repo_info_dict( self, trans, repository_metadata_ids ):
- repo_info_dict = {}
- includes_tools = False
- includes_tool_dependencies = False
- for repository_metadata_id in util.listify( repository_metadata_ids ):
- repository_metadata = get_repository_metadata_by_id( trans, repository_metadata_id )
- if not includes_tools and 'tools' in repository_metadata.metadata:
- includes_tools = True
- if not includes_tool_dependencies and 'tool_dependencies' in repository_metadata.metadata:
- includes_tool_dependencies = True
- repository = get_repository( trans, trans.security.encode_id( repository_metadata.repository_id ) )
- # Get the changelog rev for this changeset_revision.
- repo_dir = repository.repo_path
- repo = hg.repository( get_configured_ui(), repo_dir )
- changeset_revision = repository_metadata.changeset_revision
- ctx = get_changectx_for_changeset( repo, changeset_revision )
- repository_id = trans.security.encode_id( repository.id )
- repository_clone_url = generate_clone_url( trans, repository_id )
- if includes_tool_dependencies:
- repo_info_dict[ repository.name ] = ( repository.description, repository_clone_url, changeset_revision, str( ctx.rev() ) )
- else:
- repo_info_dict[ repository.name ] = ( repository.description, repository_clone_url, changeset_revision, str( ctx.rev() ) )
- return tool_shed_encode( repo_info_dict ), includes_tools, includes_tool_dependencies
@web.expose
def find_tools( self, trans, **kwd ):
params = util.Params( kwd )
@@ -1156,7 +1133,8 @@
includes_tools = False
includes_tool_dependencies = False
repo_info_dicts = []
- for repository_id, changeset_revision in zip( util.listify( repository_ids ), util.listify( changeset_revisions ) ):
+ for tup in zip( util.listify( repository_ids ), util.listify( changeset_revisions ) ):
+ repository_id, changeset_revision = tup
repository_clone_url = generate_clone_url( trans, repository_id )
repository = get_repository( trans, repository_id )
repository_metadata = get_repository_metadata_by_changeset_revision( trans, repository_id, changeset_revision )
@@ -1168,15 +1146,8 @@
repo_dir = repository.repo_path
repo = hg.repository( get_configured_ui(), repo_dir )
ctx = get_changectx_for_changeset( repo, changeset_revision )
- repo_info_dict = {}
- repo_info_dict[ repository.name ] = ( repository.description,
- repository_clone_url,
- changeset_revision,
- str( ctx.rev() ),
- repository.user.username,
- metadata.get( 'tool_dependencies', None ) )
- encoded_repo_info_dict = tool_shed_encode( repo_info_dict )
- repo_info_dicts.append( encoded_repo_info_dict )
+ repo_info_dict = create_repo_info_dict( repository, repository.user.username, repository_clone_url, changeset_revision, str( ctx.rev() ), metadata )
+ repo_info_dicts.append( tool_shed_encode( repo_info_dict ) )
return dict( includes_tools=includes_tools, includes_tool_dependencies=includes_tool_dependencies, repo_info_dicts=repo_info_dicts )
@web.expose
def get_readme( self, trans, **kwd ):
diff -r 761a17ad3aad454283abca2bf33866ad954a2d97 -r 7dcea1c1c833dac37844430180db6705d4846aa3 templates/admin/view_datatypes_registry.mako
--- a/templates/admin/view_datatypes_registry.mako
+++ b/templates/admin/view_datatypes_registry.mako
@@ -5,8 +5,24 @@
${render_msg( message, status )}
%endif
+<%
+ import galaxy.util
+ from galaxy.web.base.controller import sort_by_attr, Datatype
+ ctr = 0
+ datatypes = []
+ for elem in trans.app.datatypes_registry.datatype_elems:
+ # Build a list of objects that can be sorted.
+ extension = elem.get( 'extension', None )
+ dtype = elem.get( 'type', None )
+ type_extension = elem.get( 'type_extension', None )
+ mimetype = elem.get( 'mimetype', None )
+ display_in_upload = galaxy.util.string_as_bool( elem.get( 'display_in_upload', False ) )
+ datatypes.append( Datatype( extension, dtype, type_extension, mimetype, display_in_upload ) )
+ sorted_datatypes = sort_by_attr( datatypes, 'extension' )
+%>
+
<div class="toolForm">
- <div class="toolFormTitle">Current datatypes registry contains ${len( trans.app.datatypes_registry.datatype_elems )} datatypes</div>
+ <div class="toolFormTitle">Current datatypes registry contains ${len( sorted_datatypes )} datatypes</div><div class="toolFormBody"><table class="manage-table colored" border="0" cellspacing="0" cellpadding="0" width="100%"><tr>
@@ -14,33 +30,23 @@
<th>Type</th><th>Mimetype</th><th>Display in upload</th>
- <th>Datatype class</th></tr>
- <% ctr = 0 %>
- %for elem in trans.app.datatypes_registry.datatype_elems:
- <%
- import galaxy.util
- extension = elem.get( 'extension', None )
- dtype = elem.get( 'type', None )
- type_extension = elem.get( 'type_extension', None )
- mimetype = elem.get( 'mimetype', None )
- display_in_upload = galaxy.util.string_as_bool( elem.get( 'display_in_upload', False ) )
- %>
+ %for datatype in sorted_datatypes:
%if ctr % 2 == 1:
<tr class="odd_row">
%else:
<tr class="tr">
%endif
- <td>${extension}</td>
- <td>${dtype}</td>
+ <td>${datatype.extension}</td>
+ <td>${datatype.dtype}</td><td>
- %if mimetype:
- ${mimetype}
+ %if datatype.mimetype:
+ ${datatype.mimetype}
%endif
</td><td>
- %if display_in_upload:
- ${display_in_upload}
+ %if datatype.display_in_upload:
+ ${datatype.display_in_upload}
%endif
</td></tr>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0