galaxy-dev
Threads by month
- ----- 2025 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 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
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- 10008 discussions

25 Feb '10
details: http://www.bx.psu.edu/hg/galaxy/rev/294b1283ea56
changeset: 3444:294b1283ea56
user: rc
date: Thu Feb 25 14:59:43 2010 -0500
description:
lims: bar code related state change bug fixed
diffstat:
lib/galaxy/web/controllers/requests_admin.py | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diffs (36 lines):
diff -r ea7f4e4b7214 -r 294b1283ea56 lib/galaxy/web/controllers/requests_admin.py
--- a/lib/galaxy/web/controllers/requests_admin.py Thu Feb 25 12:27:07 2010 -0500
+++ b/lib/galaxy/web/controllers/requests_admin.py Thu Feb 25 14:59:43 2010 -0500
@@ -421,7 +421,7 @@
# change the state of each of the samples of thus request
new_state = request.type.states[0]
for s in request.samples:
- event = trans.app.model.SampleEvent(s, new_state, 'Samples submitted to the system')
+ event = trans.app.model.SampleEvent(s, new_state, 'Samples created.')
trans.sa_session.add( event )
trans.sa_session.add( request )
trans.sa_session.flush()
@@ -1018,6 +1018,7 @@
dataset_files=[])
trans.sa_session.add( s )
trans.sa_session.flush()
+
else:
messagetype = 'done'
msg = 'Changes made to the sample(s) are saved. '
@@ -1032,6 +1033,15 @@
messagetype = 'error'
msg += bc_msg
else:
+ if not sample.bar_code:
+ # if this is a 'new' (still in its first state) sample
+ # change the state to the next
+ if sample.current_state().id == request.type.states[0].id:
+ event = trans.app.model.SampleEvent(sample,
+ request.type.states[1],
+ 'Sample added to the system')
+ trans.sa_session.add( event )
+ trans.sa_session.flush()
sample.bar_code = current_samples[sample_index]['barcode']
trans.sa_session.add( sample )
trans.sa_session.flush()
1
0

25 Feb '10
details: http://www.bx.psu.edu/hg/galaxy/rev/983d70363eeb
changeset: 3442:983d70363eeb
user: rc
date: Thu Feb 25 11:28:14 2010 -0500
description:
lims: deactivate the enter key in requests page so that the scanner can be used to enter barcodes for each sample
diffstat:
templates/admin/requests/show_request.mako | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 25015efefdd9 -r 983d70363eeb templates/admin/requests/show_request.mako
--- a/templates/admin/requests/show_request.mako Wed Feb 24 18:55:30 2010 -0500
+++ b/templates/admin/requests/show_request.mako Thu Feb 25 11:28:14 2010 -0500
@@ -41,14 +41,23 @@
});
});
</script>
+
<style type="text/css">
.msg_head {
padding: 0px 0px;
cursor: pointer;
}
+</style>
-}
-</style>
+<script type="text/javascript">
+ function stopRKey(evt) {
+ var evt = (evt) ? evt : ((event) ? event : null);
+ var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
+ if ((evt.keyCode == 13) && (node.type=="text")) {return false;}
+ }
+ document.onkeypress = stopRKey
+</script>
+
%if request.rejected():
${render_msg( "Reason for rejection: "+request.last_comment(), "warning" )}
1
0

25 Feb '10
details: http://www.bx.psu.edu/hg/galaxy/rev/25015efefdd9
changeset: 3441:25015efefdd9
user: Kanwei Li <kanwei(a)gmail.com>
date: Wed Feb 24 18:55:30 2010 -0500
description:
Fix workflow bug where "Layout" changes would not be saved, and "Save and Close" did not save
diffstat:
static/scripts/galaxy.workflow_editor.canvas.js | 1 +
static/scripts/packed/galaxy.workflow_editor.canvas.js | 2 +-
templates/workflow/editor.mako | 31 ++++++++---------
3 files changed, 17 insertions(+), 17 deletions(-)
diffs (111 lines):
diff -r 674aaee19991 -r 25015efefdd9 static/scripts/galaxy.workflow_editor.canvas.js
--- a/static/scripts/galaxy.workflow_editor.canvas.js Wed Feb 24 16:50:06 2010 -0500
+++ b/static/scripts/galaxy.workflow_editor.canvas.js Wed Feb 24 18:55:30 2010 -0500
@@ -476,6 +476,7 @@
},
layout : function () {
this.check_changes_in_active_form();
+ this.has_changes = true;
// Prepare predecessor / successor tracking
var n_pred = {};
var successors = {};
diff -r 674aaee19991 -r 25015efefdd9 static/scripts/packed/galaxy.workflow_editor.canvas.js
--- a/static/scripts/packed/galaxy.workflow_editor.canvas.js Wed Feb 24 16:50:06 2010 -0500
+++ b/static/scripts/packed/galaxy.workflow_editor.canvas.js Wed Feb 24 18:55:30 2010 -0500
@@ -1,1 +1,1 @@
-function Terminal(a){this.element=a;this.connectors=[]}$.extend(Terminal.prototype,{connect:function(a){this.connectors.push(a);if(this.node){this.node.changed()}},disconnect:function(a){this.connectors.splice($.inArray(a,this.connectors),1);if(this.node){this.node.changed()}},redraw:function(){$.each(this.connectors,function(a,b){b.redraw()})},destroy:function(){$.each(this.connectors.slice(),function(a,b){b.destroy()})}});function OutputTerminal(a,b){Terminal.call(this,a);this.datatype=b}OutputTerminal.prototype=new Terminal();function InputTerminal(a,b){Terminal.call(this,a);this.datatypes=b}InputTerminal.prototype=new Terminal();$.extend(InputTerminal.prototype,{can_accept:function(a){if(this.connectors.length<1){for(var b in this.datatypes){if(a.datatype=="input"){return true}if(issubtype(a.datatype,this.datatypes[b])){return true}}}return false}});function Connector(b,a){this.canvas=null;this.dragging=false;this.inner_color="#FFFFFF";this.outer_color="#D8B365";if(b&&a!
){this.connect(b,a)}}$.extend(Connector.prototype,{connect:function(b,a){this.handle1=b;this.handle1.connect(this);this.handle2=a;this.handle2.connect(this)},destroy:function(){if(this.handle1){this.handle1.disconnect(this)}if(this.handle2){this.handle2.disconnect(this)}$(this.canvas).remove()},redraw:function(){var d=$("#canvas-container");if(!this.canvas){this.canvas=document.createElement("canvas");if(window.G_vmlCanvasManager){G_vmlCanvasManager.initElement(this.canvas)}d.append($(this.canvas));if(this.dragging){this.canvas.style.zIndex="300"}}var n=function(c){return $(c).offset().left-d.offset().left};var i=function(c){return $(c).offset().top-d.offset().top};var h=n(this.handle1.element)+5;var g=i(this.handle1.element)+5;var p=n(this.handle2.element)+5;var m=i(this.handle2.element)+5;var f=100;var k=Math.min(h,p);var a=Math.max(h,p);var j=Math.min(g,m);var t=Math.max(g,m);var b=Math.min(Math.max(Math.abs(t-j)/2,100),300);var o=k-f;var s=j-f;var q=a-k+2*f;var l=t-j+2*!
f;this.canvas.style.left=o+"px";this.canvas.style.top=s+"px";this.canv
as.setAttribute("width",q);this.canvas.setAttribute("height",l);h-=o;g-=s;p-=o;m-=s;var r=this.canvas.getContext("2d");r.lineCap="round";r.strokeStyle=this.outer_color;r.lineWidth=7;r.beginPath();r.moveTo(h,g);r.bezierCurveTo(h+b,g,p-b,m,p,m);r.stroke();r.strokeStyle=this.inner_color;r.lineWidth=5;r.beginPath();r.moveTo(h,g);r.bezierCurveTo(h+b,g,p-b,m,p,m);r.stroke()}});function Node(a){this.element=a;this.input_terminals={};this.output_terminals={};this.tool_errors={}}$.extend(Node.prototype,{enable_input_terminal:function(d,a,b){var c=this;$(d).each(function(){var f=this.terminal=new InputTerminal(this,b);f.node=c;f.name=a;$(this).bind("dropstart",function(g){g.dragProxy.terminal.connectors[0].inner_color="#BBFFBB"}).bind("dropend",function(g){g.dragProxy.terminal.connectors[0].inner_color="#FFFFFF"}).bind("drop",function(g){(new Connector(g.dragTarget.terminal,g.dropTarget.terminal)).redraw()}).bind("hover",function(){if(f.connectors.length>0){var g=$("<div class='callou!
t'></div>").css({display:"none"}).appendTo("body").append($("<div class='buttons'></div>").append($("<img src='../images/delete_icon.png' />").click(function(){$.each(f.connectors,function(i,h){h.destroy()});g.remove()}))).bind("mouseleave",function(){$(this).remove()});g.css({top:$(this).offset().top-2,left:$(this).offset().left-g.width(),"padding-right":$(this).width()}).show()}});c.input_terminals[a]=f})},enable_output_terminal:function(d,a,b){var c=this;$(d).each(function(){var g=this;var f=this.terminal=new OutputTerminal(this,b);f.node=c;f.name=a;$(this).bind("dragstart",function(j){var i=$('<div class="drag-terminal" style="position: absolute;"></div>').appendTo("#canvas-container").get(0);i.terminal=new OutputTerminal(i);var k=new Connector();k.dragging=true;k.connect(this.terminal,i.terminal);$.dropManage({filter:function(h){return this.terminal.can_accept(f)}}).addClass("input-terminal-active");return i}).bind("drag",function(i){var h=function(){var k=$(i.dragProx!
y).offsetParent().offset(),j=i.offsetX-k.left,l=i.offsetY-k.top;$(i.dr
agProxy).css({left:j,top:l});i.dragProxy.terminal.redraw();canvas_manager.update_viewport_overlay()};h();$("#canvas-container").get(0).scroll_panel.test(i,h)}).bind("dragend",function(h){h.dragProxy.terminal.connectors[0].destroy();$(h.dragProxy).remove();$.dropManage().removeClass("input-terminal-active");$("#canvas-container").get(0).scroll_panel.stop()});c.output_terminals[a]=f})},redraw:function(){$.each(this.input_terminals,function(a,b){b.redraw()});$.each(this.output_terminals,function(a,b){b.redraw()})},destroy:function(){$.each(this.input_terminals,function(a,b){b.destroy()});$.each(this.output_terminals,function(a,b){b.destroy()});workflow.remove_node(this);$(this.element).remove()},make_active:function(){$(this.element).addClass("toolForm-active")},make_inactive:function(){var a=this.element.get(0);(function(b){b.removeChild(a);b.appendChild(a)})(a.parentNode);$(a).removeClass("toolForm-active")},init_field_data:function(g){var d=this.element;if(g.type){this.type=!
g.type}this.name=g.name;this.form_html=g.form_html;this.tool_state=g.tool_state;this.tool_errors=g.tool_errors;this.tooltip=g.tooltip?g.tooltip:"";this.annotation=g.annotation;if(this.tool_errors){d.addClass("tool-node-error")}else{d.removeClass("tool-node-error")}var c=this;var a=d.find(".toolFormBody");a.find("div").remove();var h=$("<div class='inputs'></div>").appendTo(a);$.each(g.data_inputs,function(j,b){var f=$("<div class='terminal input-terminal'></div>");c.enable_input_terminal(f,b.name,b.extensions);h.append($("<div class='form-row dataRow input-data-row' name='"+b.name+"'>"+b.label+"</div>").prepend(f))});if((g.data_inputs.length>0)&&(g.data_outputs.length>0)){a.append($("<div class='rule'></div>"))}$.each(g.data_outputs,function(k,b){var j=$("<div class='terminal output-terminal'></div>");c.enable_output_terminal(j,b.name,b.extension);var f=b.name;if(b.extension!="input"){f=f+" ("+b.extension+")"}a.append($("<div class='form-row dataRow'>"+f+"</div>").append(j)!
)});workflow.node_changed(this)},update_field_data:function(f){var c=$
(this.element),d=this;this.tool_state=f.tool_state;this.form_html=f.form_html;this.tool_errors=f.tool_errors;if(this.tool_errors){c.addClass("tool-node-error")}else{c.removeClass("tool-node-error")}var g=c.find("div.inputs");var b=$("<div class='inputs'></div>");var a=g.find("div.input-data-row");$.each(f.data_inputs,function(k,h){var j=$("<div class='terminal input-terminal'></div>");d.enable_input_terminal(j,h.name,h.extensions);g.find("div[name="+h.name+"]").each(function(){$(this).find(".input-terminal").each(function(){var i=this.terminal.connectors[0];if(i){j[0].terminal.connectors[0]=i;i.handle2=j[0].terminal}});$(this).remove()});b.append($("<div class='form-row dataRow input-data-row' name='"+h.name+"'>"+h.label+"</div>").prepend(j))});g.replaceWith(b);g.find("div.input-data-row > .terminal").each(function(){this.terminal.destroy()});this.changed();this.redraw()},error:function(d){var a=$(this.element).find(".toolFormBody");a.find("div").remove();var c="<div style='!
color: red; text-style: italic;'>"+d+"</div>";this.form_html=c;a.html(c);workflow.node_changed(this)},changed:function(){workflow.node_changed(this)}});function Workflow(a){this.canvas_container=a;this.id_counter=0;this.nodes={};this.name=null;this.has_changes=false;this.active_form_has_changes=false}$.extend(Workflow.prototype,{add_node:function(a){a.id=this.id_counter;a.element.attr("id","wf-node-step-"+a.id);this.id_counter++;this.nodes[a.id]=a;this.has_changes=true;a.workflow=this},remove_node:function(a){if(this.active_node==a){this.clear_active_node()}delete this.nodes[a.id];this.has_changes=true},remove_all:function(){wf=this;$.each(this.nodes,function(b,a){a.destroy();wf.remove_node(a)})},to_simple:function(){var a={};$.each(this.nodes,function(b,d){var f={};$.each(d.input_terminals,function(g,h){f[h.name]=null;$.each(h.connectors,function(j,k){f[h.name]={id:k.handle1.node.id,output_name:k.handle1.name}})});var c={id:d.id,type:d.type,tool_id:d.tool_id,tool_state:d.t!
ool_state,tool_errors:d.tool_errors,input_connections:f,position:$(d.e
lement).position(),annotation:d.annotation};a[d.id]=c});return{steps:a}},from_simple:function(a){wf=this;var b=0;wf.name=a.name;$.each(a.steps,function(f,d){var c=prebuild_node("tool",d.name,d.tool_id);c.init_field_data(d);if(d.position){c.element.css({top:d.position.top,left:d.position.left})}c.id=d.id;wf.nodes[c.id]=c;b=Math.max(b,parseInt(f))});wf.id_counter=b+1;$.each(a.steps,function(f,d){var c=wf.nodes[f];$.each(d.input_connections,function(h,g){if(g){var i=wf.nodes[g.id];var j=new Connector();j.connect(i.output_terminals[g.output_name],c.input_terminals[h]);j.redraw()}})})},check_changes_in_active_form:function(){if(this.active_form_has_changes){this.has_changes=true;$("#right-content").find("form").submit();this.active_form_has_changes=false}},clear_active_node:function(){if(this.active_node){this.active_node.make_inactive();this.active_node=null}parent.show_form_for_tool("<div>No node selected</div>")},activate_node:function(a){if(this.active_node!=a){this.check_cha!
nges_in_active_form();this.clear_active_node();parent.show_form_for_tool(a.form_html+a.tooltip,a);a.make_active();this.active_node=a}},node_changed:function(a){this.has_changes=true;if(this.active_node==a){parent.show_form_for_tool(a.form_html+a.tooltip,a)}},layout:function(){this.check_changes_in_active_form();var i={};var b={};$.each(this.nodes,function(l,k){if(i[l]===undefined){i[l]=0}if(b[l]===undefined){b[l]=[]}});$.each(this.nodes,function(l,k){$.each(k.input_terminals,function(m,n){$.each(n.connectors,function(p,q){var o=q.handle1.node;i[k.id]+=1;b[o.id].push(k.id)})})});node_ids_by_level=[];while(true){level_parents=[];for(var a in i){if(i[a]==0){level_parents.push(a)}}if(level_parents.length==0){break}node_ids_by_level.push(level_parents);for(var f in level_parents){var j=level_parents[f];delete i[j];for(var g in b[j]){i[b[j][g]]-=1}}}if(i.length){return}var d=this.nodes;var h=80;v_pad=30;var c=h;$.each(node_ids_by_level,function(k,l){l.sort(function(p,o){return $(!
d[p].element).position().top-$(d[o].element).position().top});var m=0;
var n=v_pad;$.each(l,function(o,r){var q=d[r];var p=$(q.element);$(p).css({top:n,left:c});m=Math.max(m,$(p).width());n+=$(p).height()+v_pad});c+=m+h});$.each(d,function(k,l){l.redraw()})},bounds_for_all_nodes:function(){var d=Infinity,b=-Infinity,c=Infinity,a=-Infinity,f;$.each(this.nodes,function(h,g){e=$(g.element);f=e.position();d=Math.min(d,f.left);b=Math.max(b,f.left+e.width());c=Math.min(c,f.top);a=Math.max(a,f.top+e.width())});return{xmin:d,xmax:b,ymin:c,ymax:a}},fit_canvas_to_nodes:function(){var a=this.bounds_for_all_nodes();var f=this.canvas_container.position();var i=this.canvas_container.parent();var d=fix_delta(a.xmin,100);var h=fix_delta(a.ymin,100);d=Math.max(d,f.left);h=Math.max(h,f.top);var c=f.left-d;var g=f.top-h;var b=round_up(a.xmax+100,100)+d;var j=round_up(a.ymax+100,100)+h;b=Math.max(b,-c+i.width());j=Math.max(j,-g+i.height());this.canvas_container.css({left:c,top:g,width:b,height:j});this.canvas_container.children().each(function(){var k=$(this).posi!
tion();$(this).css("left",k.left+d);$(this).css("top",k.top+h)})}});function fix_delta(a,b){if(a<b||a>3*b){new_pos=(Math.ceil(((a%b))/b)+1)*b;return(-(a-new_pos))}return 0}function round_up(a,b){return Math.ceil(a/b)*b}function prebuild_node(l,j,r){var i=$("<div class='toolForm toolFormInCanvas'></div>");var g=new Node(i);g.type=l;if(l=="tool"){g.tool_id=r}var n=$("<div class='toolFormTitle unselectable'>"+j+"</div>");i.append(n);i.css("left",$(window).scrollLeft()+20);i.css("top",$(window).scrollTop()+20);var m=$("<div class='toolFormBody'></div>");var h="<div><img height='16' align='middle' src='../images/loading_small_white_bg.gif'/> loading tool info...</div>";m.append(h);g.form_html=h;i.append(m);var k=$("<div class='buttons' style='float: right;'></div>");k.append($("<img src='../images/delete_icon.png' />").click(function(b){g.destroy()}).hover(function(){$(this).attr("src","../images/delete_icon_dark.png")},function(){$(this).attr("src","../images/delete_icon.png")}!
));i.appendTo("#canvas-container");var d=$("#canvas-container").positi
on();var c=$("#canvas-container").parent();var a=i.width();var q=i.height();i.css({left:(-d.left)+(c.width()/2)-(a/2),top:(-d.top)+(c.height()/2)-(q/2)});k.prependTo(n);a+=(k.width()+10);i.css("width",a);$(i).bind("dragstart",function(){workflow.activate_node(g)}).bind("dragend",function(){workflow.node_changed(this);workflow.fit_canvas_to_nodes();canvas_manager.draw_overview()}).bind("dragclickonly",function(){workflow.activate_node(g)}).bind("drag",function(o){var f=$(this).offsetParent().offset(),b=o.offsetX-f.left,p=o.offsetY-f.top;$(this).css({left:b,top:p});$(this).find(".terminal").each(function(){this.terminal.redraw()})});return g}var ext_to_type=null;var type_to_type=null;function issubtype(b,a){b=ext_to_type[b];a=ext_to_type[a];return(type_to_type[b])&&(a in type_to_type[b])}function populate_datatype_info(a){ext_to_type=a.ext_to_class_name;type_to_type=a.class_to_classes}function ScrollPanel(a){this.panel=a}$.extend(ScrollPanel.prototype,{test:function(v,d){clear!
Timeout(this.timeout);var k=v.pageX,j=v.pageY,l=$(this.panel),c=l.position(),b=l.width(),i=l.height(),w=l.parent(),s=w.width(),a=w.height(),r=w.offset(),p=r.left,m=r.top,A=p+w.width(),u=m+w.height(),B=-(b-(s/2)),z=-(i-(a/2)),g=(s/2),f=(a/2),h=false,q=5,o=23;if(k-q<p){if(c.left<g){var n=Math.min(o,g-c.left);l.css("left",c.left+n);h=true}}else{if(k+q>A){if(c.left>B){var n=Math.min(o,c.left-B);l.css("left",c.left-n);h=true}}else{if(j-q<m){if(c.top<f){var n=Math.min(o,f-c.top);l.css("top",c.top+n);h=true}}else{if(j+q>u){if(c.top>z){var n=Math.min(o,c.top-B);l.css("top",(c.top-n)+"px");h=true}}}}}if(h){d();var l=this;this.timeout=setTimeout(function(){l.test(v,d)},50)}},stop:function(b,a){clearTimeout(this.timeout)}});function CanvasManager(b,a){this.cv=b;this.cc=this.cv.find("#canvas-container");this.oc=a.find("#overview-canvas");this.ov=a.find("#overview-viewport");this.init_drag()}$.extend(CanvasManager.prototype,{init_drag:function(){var b=this;var a=function(f,g){f=Math.min!
(f,b.cv.width()/2);f=Math.max(f,-b.cc.width()+b.cv.width()/2);g=Math.m
in(g,b.cv.height()/2);g=Math.max(g,-b.cc.height()+b.cv.height()/2);b.cc.css({left:f,top:g});b.update_viewport_overlay()};this.cc.each(function(){this.scroll_panel=new ScrollPanel(this)});var d,c;this.cv.bind("dragstart",function(g){var h=$(this).offset();var f=b.cc.position();c=f.top-h.top;d=f.left-h.left}).bind("drag",function(f){a(f.offsetX+d,f.offsetY+c)}).bind("dragend",function(){workflow.fit_canvas_to_nodes();b.draw_overview()});this.ov.bind("drag",function(k){var j=b.cc.width(),g=b.cc.height(),f=b.oc.width(),h=b.oc.height(),i=$(this).offsetParent().offset(),m=k.offsetX-i.left,l=k.offsetY-i.top;a(-(m/f*j),-(l/h*g))}).bind("dragend",function(){workflow.fit_canvas_to_nodes();b.draw_overview()});$("#overview-border").bind("drag",function(g){var i=$(this).offsetParent();var h=i.offset();var f=Math.max(i.width()-(g.offsetX-h.left),i.height()-(g.offsetY-h.top));$(this).css({width:f,height:f});b.draw_overview()});$("#overview-border div").bind("drag",function(f){})},update_vi!
ewport_overlay:function(){var b=this.cc,f=this.cv,a=this.oc,c=this.ov,d=b.width(),j=b.height(),i=a.width(),g=a.height(),h=b.position();c.css({left:-(h.left/d*i),top:-(h.top/j*g),width:(f.width()/d*i)-2,height:(f.height()/j*g)-2})},draw_overview:function(){var j=$("#overview-canvas"),m=j.parent().parent().width(),i=j.get(0).getContext("2d"),d=$("#canvas-container").width(),l=$("#canvas-container").height();var g,a,k,f;var h=this.cv.width();var b=this.cv.height();if(d<h&&l<b){k=d/h*m;f=(m-k)/2;g=l/b*m;a=(m-g)/2}else{if(d<l){a=0;g=m;k=Math.ceil(g*d/l);f=(m-k)/2}else{k=m;f=0;g=Math.ceil(k*l/d);a=(m-g)/2}}j.parent().css({left:f,top:a,width:k,height:g});j.attr("width",k);j.attr("height",g);i.fillStyle="#D2C099";i.strokeStyle="#D8B365";i.lineWidth=1;$.each(workflow.nodes,function(t,q){var s=$(q.element),n=s.position(),c=n.left/d*k,r=n.top/l*g,o=s.width()/d*k,p=s.height()/l*g;i.fillRect(c,r,o,p);i.strokeRect(c,r,o,p)});this.update_viewport_overlay()}});
\ No newline at end of file
+function Terminal(a){this.element=a;this.connectors=[]}$.extend(Terminal.prototype,{connect:function(a){this.connectors.push(a);if(this.node){this.node.changed()}},disconnect:function(a){this.connectors.splice($.inArray(a,this.connectors),1);if(this.node){this.node.changed()}},redraw:function(){$.each(this.connectors,function(a,b){b.redraw()})},destroy:function(){$.each(this.connectors.slice(),function(a,b){b.destroy()})}});function OutputTerminal(a,b){Terminal.call(this,a);this.datatype=b}OutputTerminal.prototype=new Terminal();function InputTerminal(a,b){Terminal.call(this,a);this.datatypes=b}InputTerminal.prototype=new Terminal();$.extend(InputTerminal.prototype,{can_accept:function(a){if(this.connectors.length<1){for(var b in this.datatypes){if(a.datatype=="input"){return true}if(issubtype(a.datatype,this.datatypes[b])){return true}}}return false}});function Connector(b,a){this.canvas=null;this.dragging=false;this.inner_color="#FFFFFF";this.outer_color="#D8B365";if(b&&a!
){this.connect(b,a)}}$.extend(Connector.prototype,{connect:function(b,a){this.handle1=b;this.handle1.connect(this);this.handle2=a;this.handle2.connect(this)},destroy:function(){if(this.handle1){this.handle1.disconnect(this)}if(this.handle2){this.handle2.disconnect(this)}$(this.canvas).remove()},redraw:function(){var d=$("#canvas-container");if(!this.canvas){this.canvas=document.createElement("canvas");if(window.G_vmlCanvasManager){G_vmlCanvasManager.initElement(this.canvas)}d.append($(this.canvas));if(this.dragging){this.canvas.style.zIndex="300"}}var n=function(c){return $(c).offset().left-d.offset().left};var i=function(c){return $(c).offset().top-d.offset().top};var h=n(this.handle1.element)+5;var g=i(this.handle1.element)+5;var p=n(this.handle2.element)+5;var m=i(this.handle2.element)+5;var f=100;var k=Math.min(h,p);var a=Math.max(h,p);var j=Math.min(g,m);var t=Math.max(g,m);var b=Math.min(Math.max(Math.abs(t-j)/2,100),300);var o=k-f;var s=j-f;var q=a-k+2*f;var l=t-j+2*!
f;this.canvas.style.left=o+"px";this.canvas.style.top=s+"px";this.canv
as.setAttribute("width",q);this.canvas.setAttribute("height",l);h-=o;g-=s;p-=o;m-=s;var r=this.canvas.getContext("2d");r.lineCap="round";r.strokeStyle=this.outer_color;r.lineWidth=7;r.beginPath();r.moveTo(h,g);r.bezierCurveTo(h+b,g,p-b,m,p,m);r.stroke();r.strokeStyle=this.inner_color;r.lineWidth=5;r.beginPath();r.moveTo(h,g);r.bezierCurveTo(h+b,g,p-b,m,p,m);r.stroke()}});function Node(a){this.element=a;this.input_terminals={};this.output_terminals={};this.tool_errors={}}$.extend(Node.prototype,{enable_input_terminal:function(d,a,b){var c=this;$(d).each(function(){var f=this.terminal=new InputTerminal(this,b);f.node=c;f.name=a;$(this).bind("dropstart",function(g){g.dragProxy.terminal.connectors[0].inner_color="#BBFFBB"}).bind("dropend",function(g){g.dragProxy.terminal.connectors[0].inner_color="#FFFFFF"}).bind("drop",function(g){(new Connector(g.dragTarget.terminal,g.dropTarget.terminal)).redraw()}).bind("hover",function(){if(f.connectors.length>0){var g=$("<div class='callou!
t'></div>").css({display:"none"}).appendTo("body").append($("<div class='buttons'></div>").append($("<img src='../images/delete_icon.png' />").click(function(){$.each(f.connectors,function(i,h){h.destroy()});g.remove()}))).bind("mouseleave",function(){$(this).remove()});g.css({top:$(this).offset().top-2,left:$(this).offset().left-g.width(),"padding-right":$(this).width()}).show()}});c.input_terminals[a]=f})},enable_output_terminal:function(d,a,b){var c=this;$(d).each(function(){var g=this;var f=this.terminal=new OutputTerminal(this,b);f.node=c;f.name=a;$(this).bind("dragstart",function(j){var i=$('<div class="drag-terminal" style="position: absolute;"></div>').appendTo("#canvas-container").get(0);i.terminal=new OutputTerminal(i);var k=new Connector();k.dragging=true;k.connect(this.terminal,i.terminal);$.dropManage({filter:function(h){return this.terminal.can_accept(f)}}).addClass("input-terminal-active");return i}).bind("drag",function(i){var h=function(){var k=$(i.dragProx!
y).offsetParent().offset(),j=i.offsetX-k.left,l=i.offsetY-k.top;$(i.dr
agProxy).css({left:j,top:l});i.dragProxy.terminal.redraw();canvas_manager.update_viewport_overlay()};h();$("#canvas-container").get(0).scroll_panel.test(i,h)}).bind("dragend",function(h){h.dragProxy.terminal.connectors[0].destroy();$(h.dragProxy).remove();$.dropManage().removeClass("input-terminal-active");$("#canvas-container").get(0).scroll_panel.stop()});c.output_terminals[a]=f})},redraw:function(){$.each(this.input_terminals,function(a,b){b.redraw()});$.each(this.output_terminals,function(a,b){b.redraw()})},destroy:function(){$.each(this.input_terminals,function(a,b){b.destroy()});$.each(this.output_terminals,function(a,b){b.destroy()});workflow.remove_node(this);$(this.element).remove()},make_active:function(){$(this.element).addClass("toolForm-active")},make_inactive:function(){var a=this.element.get(0);(function(b){b.removeChild(a);b.appendChild(a)})(a.parentNode);$(a).removeClass("toolForm-active")},init_field_data:function(g){var d=this.element;if(g.type){this.type=!
g.type}this.name=g.name;this.form_html=g.form_html;this.tool_state=g.tool_state;this.tool_errors=g.tool_errors;this.tooltip=g.tooltip?g.tooltip:"";this.annotation=g.annotation;if(this.tool_errors){d.addClass("tool-node-error")}else{d.removeClass("tool-node-error")}var c=this;var a=d.find(".toolFormBody");a.find("div").remove();var h=$("<div class='inputs'></div>").appendTo(a);$.each(g.data_inputs,function(j,b){var f=$("<div class='terminal input-terminal'></div>");c.enable_input_terminal(f,b.name,b.extensions);h.append($("<div class='form-row dataRow input-data-row' name='"+b.name+"'>"+b.label+"</div>").prepend(f))});if((g.data_inputs.length>0)&&(g.data_outputs.length>0)){a.append($("<div class='rule'></div>"))}$.each(g.data_outputs,function(k,b){var j=$("<div class='terminal output-terminal'></div>");c.enable_output_terminal(j,b.name,b.extension);var f=b.name;if(b.extension!="input"){f=f+" ("+b.extension+")"}a.append($("<div class='form-row dataRow'>"+f+"</div>").append(j)!
)});workflow.node_changed(this)},update_field_data:function(f){var c=$
(this.element),d=this;this.tool_state=f.tool_state;this.form_html=f.form_html;this.tool_errors=f.tool_errors;if(this.tool_errors){c.addClass("tool-node-error")}else{c.removeClass("tool-node-error")}var g=c.find("div.inputs");var b=$("<div class='inputs'></div>");var a=g.find("div.input-data-row");$.each(f.data_inputs,function(k,h){var j=$("<div class='terminal input-terminal'></div>");d.enable_input_terminal(j,h.name,h.extensions);g.find("div[name="+h.name+"]").each(function(){$(this).find(".input-terminal").each(function(){var i=this.terminal.connectors[0];if(i){j[0].terminal.connectors[0]=i;i.handle2=j[0].terminal}});$(this).remove()});b.append($("<div class='form-row dataRow input-data-row' name='"+h.name+"'>"+h.label+"</div>").prepend(j))});g.replaceWith(b);g.find("div.input-data-row > .terminal").each(function(){this.terminal.destroy()});this.changed();this.redraw()},error:function(d){var a=$(this.element).find(".toolFormBody");a.find("div").remove();var c="<div style='!
color: red; text-style: italic;'>"+d+"</div>";this.form_html=c;a.html(c);workflow.node_changed(this)},changed:function(){workflow.node_changed(this)}});function Workflow(a){this.canvas_container=a;this.id_counter=0;this.nodes={};this.name=null;this.has_changes=false;this.active_form_has_changes=false}$.extend(Workflow.prototype,{add_node:function(a){a.id=this.id_counter;a.element.attr("id","wf-node-step-"+a.id);this.id_counter++;this.nodes[a.id]=a;this.has_changes=true;a.workflow=this},remove_node:function(a){if(this.active_node==a){this.clear_active_node()}delete this.nodes[a.id];this.has_changes=true},remove_all:function(){wf=this;$.each(this.nodes,function(b,a){a.destroy();wf.remove_node(a)})},to_simple:function(){var a={};$.each(this.nodes,function(b,d){var f={};$.each(d.input_terminals,function(g,h){f[h.name]=null;$.each(h.connectors,function(j,k){f[h.name]={id:k.handle1.node.id,output_name:k.handle1.name}})});var c={id:d.id,type:d.type,tool_id:d.tool_id,tool_state:d.t!
ool_state,tool_errors:d.tool_errors,input_connections:f,position:$(d.e
lement).position(),annotation:d.annotation};a[d.id]=c});return{steps:a}},from_simple:function(a){wf=this;var b=0;wf.name=a.name;$.each(a.steps,function(f,d){var c=prebuild_node("tool",d.name,d.tool_id);c.init_field_data(d);if(d.position){c.element.css({top:d.position.top,left:d.position.left})}c.id=d.id;wf.nodes[c.id]=c;b=Math.max(b,parseInt(f))});wf.id_counter=b+1;$.each(a.steps,function(f,d){var c=wf.nodes[f];$.each(d.input_connections,function(h,g){if(g){var i=wf.nodes[g.id];var j=new Connector();j.connect(i.output_terminals[g.output_name],c.input_terminals[h]);j.redraw()}})})},check_changes_in_active_form:function(){if(this.active_form_has_changes){this.has_changes=true;$("#right-content").find("form").submit();this.active_form_has_changes=false}},clear_active_node:function(){if(this.active_node){this.active_node.make_inactive();this.active_node=null}parent.show_form_for_tool("<div>No node selected</div>")},activate_node:function(a){if(this.active_node!=a){this.check_cha!
nges_in_active_form();this.clear_active_node();parent.show_form_for_tool(a.form_html+a.tooltip,a);a.make_active();this.active_node=a}},node_changed:function(a){this.has_changes=true;if(this.active_node==a){parent.show_form_for_tool(a.form_html+a.tooltip,a)}},layout:function(){this.check_changes_in_active_form();this.has_changes=true;var i={};var b={};$.each(this.nodes,function(l,k){if(i[l]===undefined){i[l]=0}if(b[l]===undefined){b[l]=[]}});$.each(this.nodes,function(l,k){$.each(k.input_terminals,function(m,n){$.each(n.connectors,function(p,q){var o=q.handle1.node;i[k.id]+=1;b[o.id].push(k.id)})})});node_ids_by_level=[];while(true){level_parents=[];for(var a in i){if(i[a]==0){level_parents.push(a)}}if(level_parents.length==0){break}node_ids_by_level.push(level_parents);for(var f in level_parents){var j=level_parents[f];delete i[j];for(var g in b[j]){i[b[j][g]]-=1}}}if(i.length){return}var d=this.nodes;var h=80;v_pad=30;var c=h;$.each(node_ids_by_level,function(k,l){l.sort(f!
unction(p,o){return $(d[p].element).position().top-$(d[o].element).pos
ition().top});var m=0;var n=v_pad;$.each(l,function(o,r){var q=d[r];var p=$(q.element);$(p).css({top:n,left:c});m=Math.max(m,$(p).width());n+=$(p).height()+v_pad});c+=m+h});$.each(d,function(k,l){l.redraw()})},bounds_for_all_nodes:function(){var d=Infinity,b=-Infinity,c=Infinity,a=-Infinity,f;$.each(this.nodes,function(h,g){e=$(g.element);f=e.position();d=Math.min(d,f.left);b=Math.max(b,f.left+e.width());c=Math.min(c,f.top);a=Math.max(a,f.top+e.width())});return{xmin:d,xmax:b,ymin:c,ymax:a}},fit_canvas_to_nodes:function(){var a=this.bounds_for_all_nodes();var f=this.canvas_container.position();var i=this.canvas_container.parent();var d=fix_delta(a.xmin,100);var h=fix_delta(a.ymin,100);d=Math.max(d,f.left);h=Math.max(h,f.top);var c=f.left-d;var g=f.top-h;var b=round_up(a.xmax+100,100)+d;var j=round_up(a.ymax+100,100)+h;b=Math.max(b,-c+i.width());j=Math.max(j,-g+i.height());this.canvas_container.css({left:c,top:g,width:b,height:j});this.canvas_container.children().each(functio!
n(){var k=$(this).position();$(this).css("left",k.left+d);$(this).css("top",k.top+h)})}});function fix_delta(a,b){if(a<b||a>3*b){new_pos=(Math.ceil(((a%b))/b)+1)*b;return(-(a-new_pos))}return 0}function round_up(a,b){return Math.ceil(a/b)*b}function prebuild_node(l,j,r){var i=$("<div class='toolForm toolFormInCanvas'></div>");var g=new Node(i);g.type=l;if(l=="tool"){g.tool_id=r}var n=$("<div class='toolFormTitle unselectable'>"+j+"</div>");i.append(n);i.css("left",$(window).scrollLeft()+20);i.css("top",$(window).scrollTop()+20);var m=$("<div class='toolFormBody'></div>");var h="<div><img height='16' align='middle' src='../images/loading_small_white_bg.gif'/> loading tool info...</div>";m.append(h);g.form_html=h;i.append(m);var k=$("<div class='buttons' style='float: right;'></div>");k.append($("<img src='../images/delete_icon.png' />").click(function(b){g.destroy()}).hover(function(){$(this).attr("src","../images/delete_icon_dark.png")},function(){$(this).attr("src","../ima!
ges/delete_icon.png")}));i.appendTo("#canvas-container");var d=$("#can
vas-container").position();var c=$("#canvas-container").parent();var a=i.width();var q=i.height();i.css({left:(-d.left)+(c.width()/2)-(a/2),top:(-d.top)+(c.height()/2)-(q/2)});k.prependTo(n);a+=(k.width()+10);i.css("width",a);$(i).bind("dragstart",function(){workflow.activate_node(g)}).bind("dragend",function(){workflow.node_changed(this);workflow.fit_canvas_to_nodes();canvas_manager.draw_overview()}).bind("dragclickonly",function(){workflow.activate_node(g)}).bind("drag",function(o){var f=$(this).offsetParent().offset(),b=o.offsetX-f.left,p=o.offsetY-f.top;$(this).css({left:b,top:p});$(this).find(".terminal").each(function(){this.terminal.redraw()})});return g}var ext_to_type=null;var type_to_type=null;function issubtype(b,a){b=ext_to_type[b];a=ext_to_type[a];return(type_to_type[b])&&(a in type_to_type[b])}function populate_datatype_info(a){ext_to_type=a.ext_to_class_name;type_to_type=a.class_to_classes}function ScrollPanel(a){this.panel=a}$.extend(ScrollPanel.prototype,{te!
st:function(v,d){clearTimeout(this.timeout);var k=v.pageX,j=v.pageY,l=$(this.panel),c=l.position(),b=l.width(),i=l.height(),w=l.parent(),s=w.width(),a=w.height(),r=w.offset(),p=r.left,m=r.top,A=p+w.width(),u=m+w.height(),B=-(b-(s/2)),z=-(i-(a/2)),g=(s/2),f=(a/2),h=false,q=5,o=23;if(k-q<p){if(c.left<g){var n=Math.min(o,g-c.left);l.css("left",c.left+n);h=true}}else{if(k+q>A){if(c.left>B){var n=Math.min(o,c.left-B);l.css("left",c.left-n);h=true}}else{if(j-q<m){if(c.top<f){var n=Math.min(o,f-c.top);l.css("top",c.top+n);h=true}}else{if(j+q>u){if(c.top>z){var n=Math.min(o,c.top-B);l.css("top",(c.top-n)+"px");h=true}}}}}if(h){d();var l=this;this.timeout=setTimeout(function(){l.test(v,d)},50)}},stop:function(b,a){clearTimeout(this.timeout)}});function CanvasManager(b,a){this.cv=b;this.cc=this.cv.find("#canvas-container");this.oc=a.find("#overview-canvas");this.ov=a.find("#overview-viewport");this.init_drag()}$.extend(CanvasManager.prototype,{init_drag:function(){var b=this;var a=fu!
nction(f,g){f=Math.min(f,b.cv.width()/2);f=Math.max(f,-b.cc.width()+b.
cv.width()/2);g=Math.min(g,b.cv.height()/2);g=Math.max(g,-b.cc.height()+b.cv.height()/2);b.cc.css({left:f,top:g});b.update_viewport_overlay()};this.cc.each(function(){this.scroll_panel=new ScrollPanel(this)});var d,c;this.cv.bind("dragstart",function(g){var h=$(this).offset();var f=b.cc.position();c=f.top-h.top;d=f.left-h.left}).bind("drag",function(f){a(f.offsetX+d,f.offsetY+c)}).bind("dragend",function(){workflow.fit_canvas_to_nodes();b.draw_overview()});this.ov.bind("drag",function(k){var j=b.cc.width(),g=b.cc.height(),f=b.oc.width(),h=b.oc.height(),i=$(this).offsetParent().offset(),m=k.offsetX-i.left,l=k.offsetY-i.top;a(-(m/f*j),-(l/h*g))}).bind("dragend",function(){workflow.fit_canvas_to_nodes();b.draw_overview()});$("#overview-border").bind("drag",function(g){var i=$(this).offsetParent();var h=i.offset();var f=Math.max(i.width()-(g.offsetX-h.left),i.height()-(g.offsetY-h.top));$(this).css({width:f,height:f});b.draw_overview()});$("#overview-border div").bind("drag",fun!
ction(f){})},update_viewport_overlay:function(){var b=this.cc,f=this.cv,a=this.oc,c=this.ov,d=b.width(),j=b.height(),i=a.width(),g=a.height(),h=b.position();c.css({left:-(h.left/d*i),top:-(h.top/j*g),width:(f.width()/d*i)-2,height:(f.height()/j*g)-2})},draw_overview:function(){var j=$("#overview-canvas"),m=j.parent().parent().width(),i=j.get(0).getContext("2d"),d=$("#canvas-container").width(),l=$("#canvas-container").height();var g,a,k,f;var h=this.cv.width();var b=this.cv.height();if(d<h&&l<b){k=d/h*m;f=(m-k)/2;g=l/b*m;a=(m-g)/2}else{if(d<l){a=0;g=m;k=Math.ceil(g*d/l);f=(m-k)/2}else{k=m;f=0;g=Math.ceil(k*l/d);a=(m-g)/2}}j.parent().css({left:f,top:a,width:k,height:g});j.attr("width",k);j.attr("height",g);i.fillStyle="#D2C099";i.strokeStyle="#D8B365";i.lineWidth=1;$.each(workflow.nodes,function(t,q){var s=$(q.element),n=s.position(),c=n.left/d*k,r=n.top/l*g,o=s.width()/d*k,p=s.height()/l*g;i.fillRect(c,r,o,p);i.strokeRect(c,r,o,p)});this.update_viewport_overlay()}});
\ No newline at end of file
diff -r 674aaee19991 -r 25015efefdd9 templates/workflow/editor.mako
--- a/templates/workflow/editor.mako Wed Feb 24 16:50:06 2010 -0500
+++ b/templates/workflow/editor.mako Wed Feb 24 18:55:30 2010 -0500
@@ -163,7 +163,11 @@
}
// Show viewport on load unless pref says it's off
- $.jStore.store("overview-off") ? hide_overview() : show_overview()
+ if ($.jStore.store("overview-off")) {
+ hide_overview();
+ } else {
+ show_overview();
+ }
});
});
@@ -220,16 +224,15 @@
});
// Rename async.
- async_save_text("workflow-name", "workflow-name", "${h.url_for( action="rename_async", id=trans.security.encode_id(stored.id) )}", "new_name");
+ async_save_text("workflow-name", "workflow-name", "${h.url_for( action='rename_async', id=trans.security.encode_id(stored.id) )}", "new_name");
// Tag async. Simply have the workflow edit element generate a click on the tag element to activate tagging.
- $('#workflow-tag').click( function()
- {
+ $('#workflow-tag').click( function() {
$('.tag-area').click();
return false;
});
// Annotate async.
- async_save_text("workflow-annotation", "workflow-annotation", "${h.url_for( action="annotate_async", id=trans.security.encode_id(stored.id) )}", "new_annotation", 25, true, 4);
+ async_save_text("workflow-annotation", "workflow-annotation", "${h.url_for( action='annotate_async', id=trans.security.encode_id(stored.id) )}", "new_annotation", 25, true, 4);
});
// Global state for the whole workflow
@@ -241,7 +244,7 @@
}
function scroll_to_nodes() {
- var cv = $("#canvas-vieport");
+ var cv = $("#canvas-viewport");
var cc = $("#canvas-container")
var top, left;
if ( cc.width() < cv.width() ) {
@@ -352,8 +355,7 @@
// Add metadata form to tool.
- if ( node )
- {
+ if (node) {
var metadata_div =
$( "<p><div class='metadataForm'> \
<div class='metadataFormTitle'>Edit Step Attributes</div> \
@@ -408,7 +410,7 @@
}
return;
}
- var savefn = function() {
+ var savefn = function(callback) {
$.ajax( {
url: "${h.url_for( action='save_workflow' )}",
type: "POST",
@@ -433,12 +435,12 @@
workflow.name = data.name;
workflow.has_changes = false;
workflow.stored = true;
- if ( success_callback ) {
- success_callback();
- }
if ( data.errors ) {
show_modal( "Saving workflow", body, { "Ok" : hide_modal } );
} else {
+ if (callback) {
+ callback();
+ }
hide_modal();
}
}
@@ -455,10 +457,7 @@
active_ajax_call = false;
});
} else {
- savefn();
- }
- if ( success_callback ) {
- success_callback();
+ savefn(success_callback);
}
}
1
0

25 Feb '10
details: http://www.bx.psu.edu/hg/galaxy/rev/674aaee19991
changeset: 3440:674aaee19991
user: Dan Blankenberg <dan(a)bx.psu.edu>
date: Wed Feb 24 16:50:06 2010 -0500
description:
Update Combine FASTA and QUAL tool to allow the quality score file to be optional.
When not provided, the output will be fastqsanger or fastqsolid (when a csfasta is provided) with each quality score being the maximal allowed value (93).
diffstat:
lib/galaxy_utils/sequence/fasta.py | 2 +
lib/galaxy_utils/sequence/fastq.py | 25 +
test-data/fastq_combiner_no_qual_ascii_out_1.fastqsolid | 576 +++++++++++++
test-data/fastq_combiner_no_qual_decimal_out_1.fastqsanger | 12 +
tools/fastq/fastq_combiner.py | 11 +-
tools/fastq/fastq_combiner.xml | 16 +-
6 files changed, 637 insertions(+), 5 deletions(-)
diffs (725 lines):
diff -r 46849d69d7e6 -r 674aaee19991 lib/galaxy_utils/sequence/fasta.py
--- a/lib/galaxy_utils/sequence/fasta.py Wed Feb 24 16:48:22 2010 -0500
+++ b/lib/galaxy_utils/sequence/fasta.py Wed Feb 24 16:50:06 2010 -0500
@@ -53,6 +53,8 @@
def close( self ):
return self.file.close()
def get( self, sequence_id ):
+ if not isinstance( sequence_id, basestring ):
+ sequence_id = sequence_id.identifier
rval = None
if sequence_id in self.offset_dict:
initial_offset = self.file.tell()
diff -r 46849d69d7e6 -r 674aaee19991 lib/galaxy_utils/sequence/fastq.py
--- a/lib/galaxy_utils/sequence/fastq.py Wed Feb 24 16:48:22 2010 -0500
+++ b/lib/galaxy_utils/sequence/fastq.py Wed Feb 24 16:50:06 2010 -0500
@@ -3,6 +3,7 @@
import string
import transform
from sequence import SequencingRead
+from fasta import fastaSequence
class fastqSequencingRead( SequencingRead ):
format = 'sanger' #sanger is default
@@ -456,6 +457,8 @@
def close( self ):
return self.file.close()
def get( self, sequence_id ):
+ if not isinstance( sequence_id, basestring ):
+ sequence_id = sequence_id.identifier
rval = None
if sequence_id in self.offset_dict:
initial_offset = self.file.tell()
@@ -593,3 +596,25 @@
fastq_read.sequence = fasta_seq.sequence
fastq_read.quality = quality_seq.sequence
return fastq_read
+
+class fastqFakeFastaScoreReader( object ):
+ def __init__( self, format = 'sanger', quality_encoding = None ):
+ self.fastq_read = fastqSequencingRead.get_class_by_format( format )()
+ if quality_encoding != 'decimal':
+ quality_encoding = 'ascii'
+ self.quality_encoding = quality_encoding
+ def close( self ):
+ return #nothing to close
+ def get( self, sequence ):
+ assert isinstance( sequence, fastaSequence ), 'fastqFakeFastaScoreReader requires a fastaSequence object as the parameter'
+ #add sequence to fastq_read, then get_sequence(), color space adapters do not have quality score values
+ self.fastq_read.sequence = sequence.sequence
+ new_sequence = fastaSequence()
+ new_sequence.identifier = sequence.identifier
+ if self.quality_encoding == 'ascii':
+ new_sequence.sequence = chr( self.fastq_read.ascii_max ) * len( self.fastq_read.get_sequence() )
+ else:
+ new_sequence.sequence = ( "%i " % self.fastq_read.quality_max ) * len( self.fastq_read.get_sequence() )
+ return new_sequence
+ def has_data( self ):
+ return '' #No actual data exist, none can be remaining
diff -r 46849d69d7e6 -r 674aaee19991 test-data/fastq_combiner_no_qual_ascii_out_1.fastqsolid
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/fastq_combiner_no_qual_ascii_out_1.fastqsolid Wed Feb 24 16:50:06 2010 -0500
@@ -0,0 +1,576 @@
+@1831_573_1004_F3
+T00030133312212111300011021310132222
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_573_1050_F3
+T03330322230322112131010221102122113
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_573_1067_F3
+T00023032023103330112220321200200002
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_573_1219_F3
+T11211130300300301021212330201121310
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_573_1242_F3
+T02132003121011302100130302112221121
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_573_1333_F3
+T00200312330110101013212313222303112
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_573_1362_F3
+T21203131001102231121211101111321131
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_573_1448_F3
+T23101211223113320132212331313312022
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_573_1490_F3
+T31312310323301210002210123101021011
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_573_1523_F3
+T10322001220012223202202222001230222
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_573_1578_F3
+T21202302100010020121100311022120111
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_573_1647_F3
+T10222233301013033120132223202022123
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_573_1684_F3
+T13310013212312012302121010221231123
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_573_1769_F3
+T33220123030232212032021032302233131
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_573_1853_F3
+T11000012111222211310103212122102331
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_573_1943_F3
+T20300123032210232001222122001132111
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_573_1977_F3
+T22212302221310332321002303112011311
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_109_F3
+T13122332123301331032220222133301033
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_148_F3
+T01200113123030012202302312200010231
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_185_F3
+T21123333211302300321312212102123121
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_243_F3
+T30221011230013102201033131203302330
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_257_F3
+T00301133110002100302003000000102301
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_293_F3
+T23213210003000103010211331300320130
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_389_F3
+T21032213032101122333230212301312020
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_575_F3
+T33313322100212102033032123311211302
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_592_F3
+T33103330110123102223122023103310330
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_617_F3
+T20021031221222021210021322200223211
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_725_F3
+T32010020322130330333010031120313210
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_734_F3
+T31132301200020012302210322213222222
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_824_F3
+T30212100033032123311211302122020013
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_959_F3
+T11212130220131221111002020123311211
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_1062_F3
+T30112230030300221001032033012211012
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_1092_F3
+T02013221200031031212200000111130310
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_1103_F3
+T20313113203302010303131123021310121
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_1116_F3
+T21011310123202303021021112021231011
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_1194_F3
+T23303101033322220312200222013013312
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_1204_F3
+T21330132231321322010303023221203200
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_1306_F3
+T10332133020311023221213100301001220
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_1387_F3
+T12301331310032132101301303230121111
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_1431_F3
+T12011023331022213001123111301312011
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_1560_F3
+T32212313302203320020222113111011111
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_1591_F3
+T23202101330322130221230222201123202
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_1624_F3
+T20122200222132200313011102302210332
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_1826_F3
+T13012312120112021233030302313201111
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_1903_F3
+T30232100103132133321330310210101221
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_574_1961_F3
+T02333101331223303300200011100032200
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_54_F3
+T13331330322230200102132110132013200
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_80_F3
+T33133322233322221003332230323312313
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_192_F3
+T30013012111133003301010212123302011
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_197_F3
+T33312113010133020301131330001310032
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_223_F3
+T10121010002202131221210302100121020
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_420_F3
+T31110103220000101310112112001020212
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_434_F3
+T30312132120223101113223301211113311
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_444_F3
+T33022120112320220100202132332113320
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_459_F3
+T31330310210101223330110231120131100
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_506_F3
+T31210200111210121332321310110132301
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_569_F3
+T10210201321323001012232322323002203
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_622_F3
+T01100031122111023002323113231210111
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_644_F3
+T11332003221203131231202200030110130
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_663_F3
+T32210013303112103322311101322021210
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_681_F3
+T23131132033020103031013233200101021
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_711_F3
+T03032331231101231020121210002332121
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_730_F3
+T31010102200110302123032330331011111
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_904_F3
+T20111213300020123200333321131121211
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_938_F3
+T13103102220022130222233301013033120
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_970_F3
+T23201311301023133303023011202220221
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_991_F3
+T33312212031111111012212120321121210
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_1138_F3
+T23320002011320012120333103233301321
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_1157_F3
+T13121323330203331222022230133102321
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_1180_F3
+T32003310122102323303101123331133110
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_1283_F3
+T02232200301300220130032321323131333
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_1302_F3
+T01201303312333123130200123201013021
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_1310_F3
+T31332131312021303211310220101211133
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_1321_F3
+T11001010233200122122022023000203212
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_1373_F3
+T21213011223311001221321132013121220
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_1419_F3
+T33222200303001021230212332001013020
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_1436_F3
+T13210313021212303321202113301220331
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_1442_F3
+T33132010022331132101132123132020222
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_1454_F3
+T11131130011012021120222231313211113
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_1500_F3
+T11010000223111301132313011130103021
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_1535_F3
+T21312012030320112110211013300131121
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_1724_F3
+T33123002323300220213232301000010010
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_1829_F3
+T21033321320111321230233302313101021
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_1898_F3
+T31330110303103131001110300102101330
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_575_1964_F3
+T22010201103202213200201301300232123
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_32_F3
+T13012100120333032211330300332022110
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_74_F3
+T30103313210232220102021223012112100
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_86_F3
+T10320000121033022010011030032211310
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_89_F3
+T02132333203332020020220033002121120
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_266_F3
+T30322223101312011300311121221333223
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_327_F3
+T22112331301313021321001332120332130
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_331_F3
+T32012133301311223023011232112333030
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_387_F3
+T00101211032031120300200222001230022
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_406_F3
+T00223133010210122221320212103132011
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_449_F3
+T31312001121222231100020132132100220
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_519_F3
+T03011321130130133213131202130321131
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_603_F3
+T21003032313302312320131221001330311
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_655_F3
+T02001023130302322122200313123123102
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_677_F3
+T13330131023320301031013230210103022
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_718_F3
+T31232113331022231333313223132231213
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_722_F3
+T31230320322120231333030031100313200
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_754_F3
+T30221231132103120112331303112133020
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_815_F3
+T23022113203032010120310102321001031
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_882_F3
+T13230020122320223230022031020110122
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_898_F3
+T10230132312121033222231132231233213
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_923_F3
+T21322010320202013210121223010123122
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_930_F3
+T21322103230123110323102012021020013
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_1019_F3
+T22032121213231032210312001103122312
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_1068_F3
+T00020232013101330112220321203220211
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_1131_F3
+T10233122200222132200313011102302210
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_1168_F3
+T31013300131121323122002113301002010
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_1207_F3
+T21001132013000122220301213221213010
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_1289_F3
+T03021210023110200323310302013121203
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_1329_F3
+T01100302102020113003022000120002100
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_1367_F3
+T12231310311233110031222013332011023
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_1416_F3
+T33021233100123120313103133211203221
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_1461_F3
+T32022221221112233100210223002100100
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_1605_F3
+T30232100103132133321330310210101221
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_1664_F3
+T31212101001312110320301201002011120
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_1671_F3
+T22313332300211322113223102231322313
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_1729_F3
+T11233312313010012320101302101023030
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_1880_F3
+T13032121323320213301001310130212003
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_1982_F3
+T00032312310201201333221212000011030
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_1987_F3
+T30022313313231221213220132001011320
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_2014_F3
+T31123201010100321122111102113021003
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_576_2028_F3
+T20131211210311112023201213120201100
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_577_40_F3
+T11111212330120012020200031313303003
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_577_119_F3
+T33111010021103320103213121313000102
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_577_133_F3
+T33213323012231300122223032223331322
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_577_255_F3
+T00332022110020300332022020202002232
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_577_281_F3
+T03032301231212301013112222111210000
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_577_288_F3
+T01031120221303100221230021013201130
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_577_322_F3
+T12003213220230103303201000130312202
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_577_362_F3
+T31203302330110131230331210121110220
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_577_382_F3
+T32312123033111120321303230201332100
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_577_464_F3
+T13020221011130013102221333131203302
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_577_488_F3
+T13200302330322110200323132101120301
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_577_511_F3
+T32232133031023313331312220133230333
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_577_545_F3
+T00112131333222303222210031322103233
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_577_559_F3
+T32321101303233120102011130022122002
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_577_562_F3
+T32331101301233110121000220031120031
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_577_637_F3
+T22113312122202103031023120301031110
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_577_641_F3
+T13031301101121223221212020032131113
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+@1831_577_692_F3
+T01122320200330103121202301211100220
++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff -r 46849d69d7e6 -r 674aaee19991 test-data/fastq_combiner_no_qual_decimal_out_1.fastqsanger
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/fastq_combiner_no_qual_decimal_out_1.fastqsanger Wed Feb 24 16:50:06 2010 -0500
@@ -0,0 +1,12 @@
+(a)SRR014849.50939 EIXKN4201BA2EC length=135
+GAAATTTCAGGGCCACCTTTTTTTTGATAGAATAATGGAGAAAATTAAAAGCTGTACATATACCAATGAACAATAAATCAATACATAAAAAAGGAGAAGTTGGAACCGAAAGGGTTTGAATTCAAACCCTTTCGG
++
+93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93
+(a)SRR014849.110027 EIXKN4201APUB0 length=131
+CTTCAAATGATTCCGGGACTGTTGGAACCGAAAGGGTTTGAATTCAAACCCTTTTCGGTTCCAACTCGCCGTCCGAATAATCCGTTCAAAATCTTGGCCTGTCAAAACGACTTTACGACCAGAACGATCCG
++
+93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93
+(a)SRR014849.203935 EIXKN4201B4HU6 length=144
+AACCCGTCCCATCAAAGATTTTGGTTGGAACCCGAAAGGGTTTTGAATTCAAACCCCTTTCGGTTCCAACTATTCAATTGTTTAACTTTTTTTAAATTGATGGTCTGTTGGACCATTTGTAATAATCCCCATCGGAATTTCTTT
++
+93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93
diff -r 46849d69d7e6 -r 674aaee19991 tools/fastq/fastq_combiner.py
--- a/tools/fastq/fastq_combiner.py Wed Feb 24 16:48:22 2010 -0500
+++ b/tools/fastq/fastq_combiner.py Wed Feb 24 16:50:06 2010 -0500
@@ -1,6 +1,6 @@
#Dan Blankenberg
import sys, os, shutil
-from galaxy_utils.sequence.fastq import fastqWriter, fastqSequencingRead, fastqCombiner
+from galaxy_utils.sequence.fastq import fastqWriter, fastqSequencingRead, fastqCombiner, fastqFakeFastaScoreReader
from galaxy_utils.sequence.fasta import fastaReader, fastaNamedReader
def main():
@@ -23,15 +23,18 @@
format = 'illumina'
out = fastqWriter( open( output_filename, 'wb' ), format = format, force_quality_encoding = force_quality_encoding )
- qual_input = fastaNamedReader( open( qual_filename, 'rb' ) )
+ if qual_filename == 'None':
+ qual_input = fastqFakeFastaScoreReader( format, quality_encoding = force_quality_encoding )
+ else:
+ qual_input = fastaNamedReader( open( qual_filename, 'rb' ) )
+
fastq_combiner = fastqCombiner( format )
i = None
skip_count = 0
for i, sequence in enumerate( fastaReader( open( fasta_filename, 'rb' ) ) ):
- quality = qual_input.get( sequence.identifier )
+ quality = qual_input.get( sequence )
if quality:
fastq_read = fastq_combiner.combine( sequence, quality )
- #Should we check that fastq read is valid? for now, assume groomer will be used to verify
out.write( fastq_read )
else:
skip_count += 1
diff -r 46849d69d7e6 -r 674aaee19991 tools/fastq/fastq_combiner.xml
--- a/tools/fastq/fastq_combiner.xml Wed Feb 24 16:48:22 2010 -0500
+++ b/tools/fastq/fastq_combiner.xml Wed Feb 24 16:50:06 2010 -0500
@@ -3,7 +3,7 @@
<command interpreter="python">fastq_combiner.py '$fasta_file' '${fasta_file.extension}' '$qual_file' '${qual_file.extension}' '$output_file' '$force_quality_encoding'</command>
<inputs>
<param name="fasta_file" type="data" format="fasta,csfasta" label="FASTA File" />
- <param name="qual_file" type="data" format="qual" label="Quality Score File" />
+ <param name="qual_file" type="data" format="qual" label="Quality Score File" optional="True" />
<param name="force_quality_encoding" type="select" label="Force Quality Score encoding">
<option value="None">Use Source Encoding</option>
<option value="ascii" selected="True">ASCII</option>
@@ -45,11 +45,25 @@
<param name="force_quality_encoding" value="decimal" />
<output name="output_file" file="wrapping_as_sanger_decimal.fastqsanger" />
</test>
+ <test>
+ <param name="fasta_file" value="fastq_combiner_in_1.fasta" ftype="fasta" />
+ <param name="qual_file" />
+ <param name="force_quality_encoding" value="decimal" />
+ <output name="output_file" file="fastq_combiner_no_qual_decimal_out_1.fastqsanger" />
+ </test>
+ <test>
+ <param name="fasta_file" value="s2fq_phiX.csfasta" ftype="csfasta" />
+ <param name="qual_file" />
+ <param name="force_quality_encoding" value="ascii" />
+ <output name="output_file" file="fastq_combiner_no_qual_ascii_out_1.fastqsolid" />
+ </test>
</tests>
<help>
**What it does**
This tool joins a FASTA file to a Quality Score file, creating a single FASTQ block for each read.
+Specifying a set of quality scores is optional; when not provided, the output will be fastqsanger or fastqsolid (when a csfasta is provided) with each quality score being the maximal allowed value (93).
+
</help>
</tool>
1
0

25 Feb '10
details: http://www.bx.psu.edu/hg/galaxy/rev/46849d69d7e6
changeset: 3439:46849d69d7e6
user: Dan Blankenberg <dan(a)bx.psu.edu>
date: Wed Feb 24 16:48:22 2010 -0500
description:
Update test framework to allow not setting a value for optional DataToolParameter inputs.
diffstat:
lib/galaxy/tools/test.py | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
diffs (50 lines):
diff -r 841037edd8a0 -r 46849d69d7e6 lib/galaxy/tools/test.py
--- a/lib/galaxy/tools/test.py Wed Feb 24 15:54:52 2010 -0500
+++ b/lib/galaxy/tools/test.py Wed Feb 24 16:48:22 2010 -0500
@@ -4,6 +4,9 @@
from parameters import basic
from parameters import grouping
from elementtree.ElementTree import XML
+import logging
+
+log = logging.getLogger( __name__ )
class ToolTestBuilder( object ):
"""
@@ -27,8 +30,12 @@
if isinstance( input_value, grouping.Conditional ) or isinstance( input_value, grouping.Repeat ):
self.__expand_grouping_for_data_input(name, value, extra, input_name, input_value)
elif isinstance( self.tool.inputs[name], parameters.DataToolParameter ) and ( value, extra ) not in self.required_files:
- self.required_files.append( ( value, extra ) )
- except: pass
+ if value is None:
+ assert self.tool.inputs[name].optional, '%s is not optional. You must provide a valid filename.' % name
+ else:
+ self.required_files.append( ( value, extra ) )
+ except Exception, e:
+ log.debug( "Error in add_param for %s: %s" % ( name, e ) )
self.inputs.append( ( name, value, extra ) )
def add_output( self, name, file, sort ):
self.outputs.append( ( name, file, sort ) )
@@ -39,7 +46,10 @@
for case in grouping_value.cases:
for case_input_name, case_input_value in case.inputs.items():
if case_input_name == name and isinstance( case_input_value, basic.DataToolParameter ) and ( value, extra ) not in self.required_files:
- self.required_files.append( ( value, extra ) )
+ if value is None:
+ assert case_input_value.optional, '%s is not optional. You must provide a valid filename.' % name
+ else:
+ self.required_files.append( ( value, extra ) )
return True
elif isinstance( case_input_value, grouping.Conditional ):
self.__expand_grouping_for_data_input(name, value, extra, case_input_name, case_input_value)
@@ -51,5 +61,8 @@
# one used ).
for input_name, input_value in grouping_value.inputs.items():
if input_name == name and isinstance( input_value, basic.DataToolParameter ) and ( value, extra ) not in self.required_files:
- self.required_files.append( ( value, extra ) )
+ if value is None:
+ assert input_value.optional, '%s is not optional. You must provide a valid filename.' % name
+ else:
+ self.required_files.append( ( value, extra ) )
return True
1
0

25 Feb '10
details: http://www.bx.psu.edu/hg/galaxy/rev/841037edd8a0
changeset: 3438:841037edd8a0
user: Nate Coraor <nate(a)bx.psu.edu>
date: Wed Feb 24 15:54:52 2010 -0500
description:
Fix for set metadata tests when setting metadata externally
diffstat:
scripts/functional_tests.py | 5 +++--
test/base/twilltestcase.py | 7 ++++++-
2 files changed, 9 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r aece26463c9d -r 841037edd8a0 scripts/functional_tests.py
--- a/scripts/functional_tests.py Wed Feb 24 11:57:35 2010 -0500
+++ b/scripts/functional_tests.py Wed Feb 24 15:54:52 2010 -0500
@@ -109,11 +109,12 @@
database_connection = os.environ['GALAXY_TEST_DBURI']
else:
database_connection = 'sqlite:///' + os.path.join( db_path, 'universe.sqlite' )
+ kwargs = {}
+ for dir in file_path, new_file_path:
try:
- os.makedirs( file_path )
+ os.makedirs( dir )
except OSError:
pass
- kwargs = {}
print "Database connection:", database_connection
diff -r aece26463c9d -r 841037edd8a0 test/base/twilltestcase.py
--- a/test/base/twilltestcase.py Wed Feb 24 11:57:35 2010 -0500
+++ b/test/base/twilltestcase.py Wed Feb 24 15:54:52 2010 -0500
@@ -475,7 +475,12 @@
self.check_page_for_string( 'This will inspect the dataset and attempt' )
tc.fv( 'auto_detect', 'id', hda_id )
tc.submit( 'detect' )
- self.check_page_for_string( 'Attributes updated' )
+ try:
+ self.check_page_for_string( 'Attributes have been queued to be updated' )
+ self.wait()
+ except AssertionError:
+ self.check_page_for_string( 'Attributes updated' )
+ #self.check_page_for_string( 'Attributes updated' )
self.home()
def convert_format( self, hda_id, target_type ):
"""Convert format of history_dataset_association"""
1
0

25 Feb '10
details: http://www.bx.psu.edu/hg/galaxy/rev/aece26463c9d
changeset: 3437:aece26463c9d
user: Dan Blankenberg <dan(a)bx.psu.edu>
date: Wed Feb 24 11:57:35 2010 -0500
description:
Move FASTA classes in galaxy_utils from fastq.py to fasta.py.
diffstat:
lib/galaxy_utils/sequence/fasta.py | 108 +++++++++++++++++++++++++++++++++++++
lib/galaxy_utils/sequence/fastq.py | 107 ------------------------------------
tools/fastq/fastq_combiner.py | 3 +-
tools/fastq/fastq_to_fasta.py | 3 +-
4 files changed, 112 insertions(+), 109 deletions(-)
diffs (260 lines):
diff -r 66ba0f2d6d32 -r aece26463c9d lib/galaxy_utils/sequence/fasta.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/galaxy_utils/sequence/fasta.py Wed Feb 24 11:57:35 2010 -0500
@@ -0,0 +1,108 @@
+#Dan Blankenberg
+
+class fastaSequence( object ):
+ def __init__( self ):
+ self.identifier = None
+ self.sequence = '' #holds raw sequence string: no whitespace
+ def __len__( self ):
+ return len( self.sequence )
+ def __str__( self ):
+ return "%s\n%s\n" % ( self.identifier, self.sequence )
+
+class fastaReader( object ):
+ def __init__( self, fh ):
+ self.file = fh
+ def close( self ):
+ return self.file.close()
+ def next( self ):
+ line = self.file.readline()
+ #remove header comment lines
+ while line and line.startswith( '#' ):
+ line = self.file.readline()
+ if not line:
+ raise StopIteration
+ assert line.startswith( '>' ), "FASTA headers must start with >"
+ rval = fastaSequence()
+ rval.identifier = line.strip()
+ offset = self.file.tell()
+ while True:
+ line = self.file.readline()
+ if not line or line.startswith( '>' ):
+ if line:
+ self.file.seek( offset ) #this causes sequence id lines to be read twice, once to determine previous sequence end and again when getting actual sequence; can we cache this to prevent it from being re-read?
+ return rval
+ #454 qual test data that was used has decimal scores that don't have trailing spaces
+ #so we'll need to parse and build these sequences not based upon de facto standards
+ #i.e. in a less than ideal fashion
+ line = line.rstrip()
+ if ' ' in rval.sequence or ' ' in line:
+ rval.sequence = "%s%s " % ( rval.sequence, line )
+ else:
+ rval.sequence += line
+ offset = self.file.tell()
+ def __iter__( self ):
+ while True:
+ yield self.next()
+
+class fastaNamedReader( object ):
+ def __init__( self, fh ):
+ self.file = fh
+ self.reader = fastaReader( self.file )
+ self.offset_dict = {}
+ self.eof = False
+ def close( self ):
+ return self.file.close()
+ def get( self, sequence_id ):
+ rval = None
+ if sequence_id in self.offset_dict:
+ initial_offset = self.file.tell()
+ seq_offset = self.offset_dict[ sequence_id ].pop( 0 )
+ if not self.offset_dict[ sequence_id ]:
+ del self.offset_dict[ sequence_id ]
+ self.file.seek( seq_offset )
+ rval = self.reader.next()
+ self.file.seek( initial_offset )
+ else:
+ while True:
+ offset = self.file.tell()
+ try:
+ fasta_seq = self.reader.next()
+ except StopIteration:
+ self.eof = True
+ break #eof, id not found, will return None
+ if fasta_seq.identifier == sequence_id:
+ rval = fasta_seq
+ break
+ else:
+ if fasta_seq.identifier not in self.offset_dict:
+ self.offset_dict[ fasta_seq.identifier ] = []
+ self.offset_dict[ fasta_seq.identifier ].append( offset )
+ return rval
+ def has_data( self ):
+ #returns a string representation of remaining data, or empty string (False) if no data remaining
+ eof = self.eof
+ count = 0
+ rval = ''
+ if self.offset_dict:
+ count = sum( map( len, self.offset_dict.values() ) )
+ if not eof:
+ offset = self.file.tell()
+ try:
+ fasta_seq = self.reader.next()
+ except StopIteration:
+ eof = True
+ self.file.seek( offset )
+ if count:
+ rval = "There were %i known sequences not utilized. " % count
+ if not eof:
+ rval = "%s%s" % ( rval, "An additional unknown number of sequences exist in the input that were not utilized." )
+ return rval
+
+class fastaWriter( object ):
+ def __init__( self, fh ):
+ self.file = fh
+ def write( self, fastq_read ):
+ #this will include SOLiD adapter base if applicable
+ self.file.write( ">%s\n%s\n" % ( fastq_read.identifier[1:], fastq_read.sequence ) )
+ def close( self ):
+ return self.file.close()
diff -r 66ba0f2d6d32 -r aece26463c9d lib/galaxy_utils/sequence/fastq.py
--- a/lib/galaxy_utils/sequence/fastq.py Wed Feb 24 10:42:36 2010 -0500
+++ b/lib/galaxy_utils/sequence/fastq.py Wed Feb 24 11:57:35 2010 -0500
@@ -514,15 +514,6 @@
def close( self ):
return self.file.close()
-class fastaWriter( object ):
- def __init__( self, fh ):
- self.file = fh
- def write( self, fastq_read ):
- #this will include SOLiD adapter base if applicable
- self.file.write( ">%s\n%s\n" % ( fastq_read.identifier[1:], fastq_read.sequence ) )
- def close( self ):
- return self.file.close()
-
class fastqJoiner( object ):
def __init__( self, format, force_quality_encoding = None ):
self.format = format
@@ -592,104 +583,6 @@
read2.description += "/2"
return read1, read2
-class fastaSequence( ):
- def __init__( self ):
- self.identifier = None
- self.sequence = '' #holds raw sequence string: no whitespace
- def __len__( self ):
- return len( self.sequence )
- def __str__( self ):
- return "%s\n%s\n" % ( self.identifier, self.sequence )
-
-class fastaReader( object ):
- def __init__( self, fh ):
- self.file = fh
- def close( self ):
- return self.file.close()
- def next( self ):
- line = self.file.readline()
- #remove header comment lines
- while line and line.startswith( '#' ):
- line = self.file.readline()
- if not line:
- raise StopIteration
- assert line.startswith( '>' ), "FASTA headers must start with >"
- rval = fastaSequence()
- rval.identifier = line.strip()
- offset = self.file.tell()
- while True:
- line = self.file.readline()
- if not line or line.startswith( '>' ):
- if line:
- self.file.seek( offset )
- return rval
- #454 qual test data that was used has decimal scores that don't have trailing spaces
- #so we'll need to parse and build these sequences not based upon de facto standards
- #i.e. in a less than ideal fashion
- line = line.rstrip()
- if ' ' in rval.sequence or ' ' in line:
- rval.sequence = "%s%s " % ( rval.sequence, line )
- else:
- rval.sequence += line
- offset = self.file.tell()
- def __iter__( self ):
- while True:
- yield self.next()
-
-class fastaNamedReader( object ):
- def __init__( self, fh ):
- self.file = fh
- self.reader = fastaReader( self.file )
- self.offset_dict = {}
- self.eof = False
- def close( self ):
- return self.file.close()
- def get( self, sequence_id ):
- rval = None
- if sequence_id in self.offset_dict:
- initial_offset = self.file.tell()
- seq_offset = self.offset_dict[ sequence_id ].pop( 0 )
- if not self.offset_dict[ sequence_id ]:
- del self.offset_dict[ sequence_id ]
- self.file.seek( seq_offset )
- rval = self.reader.next()
- self.file.seek( initial_offset )
- else:
- while True:
- offset = self.file.tell()
- try:
- fasta_seq = self.reader.next()
- except StopIteration:
- self.eof = True
- break #eof, id not found, will return None
- if fasta_seq.identifier == sequence_id:
- rval = fasta_seq
- break
- else:
- if fasta_seq.identifier not in self.offset_dict:
- self.offset_dict[ fasta_seq.identifier ] = []
- self.offset_dict[ fasta_seq.identifier ].append( offset )
- return rval
- def has_data( self ):
- #returns a string representation of remaining data, or empty string (False) if no data remaining
- eof = self.eof
- count = 0
- rval = ''
- if self.offset_dict:
- count = sum( map( len, self.offset_dict.values() ) )
- if not eof:
- offset = self.file.tell()
- try:
- fasta_seq = self.reader.next()
- except StopIteration:
- eof = True
- self.file.seek( offset )
- if count:
- rval = "There were %i known sequences not utilized. " % count
- if not eof:
- rval = "%s%s" % ( rval, "An additional unknown number of sequences exist in the input that were not utilized." )
- return rval
-
class fastqCombiner( object ):
def __init__( self, format ):
self.format = format
diff -r 66ba0f2d6d32 -r aece26463c9d tools/fastq/fastq_combiner.py
--- a/tools/fastq/fastq_combiner.py Wed Feb 24 10:42:36 2010 -0500
+++ b/tools/fastq/fastq_combiner.py Wed Feb 24 11:57:35 2010 -0500
@@ -1,6 +1,7 @@
#Dan Blankenberg
import sys, os, shutil
-from galaxy_utils.sequence.fastq import fastqWriter, fastaReader, fastaNamedReader, fastqSequencingRead, fastqCombiner
+from galaxy_utils.sequence.fastq import fastqWriter, fastqSequencingRead, fastqCombiner
+from galaxy_utils.sequence.fasta import fastaReader, fastaNamedReader
def main():
#Read command line arguments
diff -r 66ba0f2d6d32 -r aece26463c9d tools/fastq/fastq_to_fasta.py
--- a/tools/fastq/fastq_to_fasta.py Wed Feb 24 10:42:36 2010 -0500
+++ b/tools/fastq/fastq_to_fasta.py Wed Feb 24 11:57:35 2010 -0500
@@ -1,6 +1,7 @@
#Dan Blankenberg
import sys
-from galaxy_utils.sequence.fastq import fastqReader, fastaWriter
+from galaxy_utils.sequence.fastq import fastqReader
+from galaxy_utils.sequence.fasta import fastaWriter
def main():
input_filename = sys.argv[1]
1
0

25 Feb '10
Galaxy folks;
Would y'all be interested in writing up a Galaxy proposal for
Google's Summer of Code? NESCent is planning to apply for the
program this year; they've been a mentoring organization for the last
3 years, sponsoring students to work on phyloinformatics code, and I
was involved last year as a mentor. Here is some background from
last year's projects:
https://www.nescent.org/wg_phyloinformatics/Phyloinformatics_Summer_of_Code…
They are starting now to get together the application for 2010, and
one of the first steps in that process is generating proposals that
students can apply for.
I was thinking of including a proposal for integrating additional
phylogenetic tools into Galaxy, and wanted to gauge your interest.
Right now this is at the brainstorming level, but the general idea
would be to build off of the tools already present for metagenome
analysis. This could include anything from writing up XML files to
include additional stand alone phylogenetic programs, coding up
scripts or workflows to automate common analyses, and integrating
visualization tools for trees like the InfoVis toolkit:
http://thejit.org/
What do you think? If we get accepted and move forward it would be great
to have someone from the Galaxy team to help with both formulating the
project plans and mentoring during the summer. It's a great
opportunity to have an excellent student working on Galaxy full time
during the summer.
Brad
3
3
details: http://www.bx.psu.edu/hg/galaxy/rev/c1d024e76c2c
changeset: 3435:c1d024e76c2c
user: rc
date: Wed Feb 24 10:04:03 2010 -0500
description:
lims:
- added error msg when dataset transfer is started for samples with no library
- fixed typos
- now dataset transfer does not affect sample state
- request completion logic restored.
diffstat:
lib/galaxy/model/__init__.py | 2 +-
lib/galaxy/web/controllers/requests_admin.py | 28 +++++++++++++++--------
scripts/galaxy_messaging/server/data_transfer.py | 2 +-
templates/admin/requests/get_data.mako | 4 +-
templates/admin/requests/show_request.mako | 8 +------
templates/base_panels.mako | 1 +
templates/requests/show_request.mako | 2 +-
7 files changed, 25 insertions(+), 22 deletions(-)
diffs (159 lines):
diff -r 80747406525d -r c1d024e76c2c lib/galaxy/model/__init__.py
--- a/lib/galaxy/model/__init__.py Wed Feb 24 08:44:22 2010 -0500
+++ b/lib/galaxy/model/__init__.py Wed Feb 24 10:04:03 2010 -0500
@@ -1414,7 +1414,7 @@
if self.events:
return self.events[0].state
return None
- def untransfered_dataset_files(self):
+ def untransferred_dataset_files(self):
count = 0
for df, status in self.dataset_files:
if status == self.transfer_status.NOT_STARTED:
diff -r 80747406525d -r c1d024e76c2c lib/galaxy/web/controllers/requests_admin.py
--- a/lib/galaxy/web/controllers/requests_admin.py Wed Feb 24 08:44:22 2010 -0500
+++ b/lib/galaxy/web/controllers/requests_admin.py Wed Feb 24 10:04:03 2010 -0500
@@ -1275,8 +1275,8 @@
if s.current_state().id != request.type.states[-1].id:
complete = False
if request.complete() and not complete:
- comments = "Sample(s) " % request.type.states[-1].name
- event = trans.app.model.RequestEvent(request, request.states.COMPLETE, comments)
+ comments = "One or more samples moved back from the %s state" % request.type.states[-1].name
+ event = trans.app.model.RequestEvent(request, request.states.SUBMITTED, comments)
trans.sa_session.add( event )
trans.sa_session.flush()
elif complete:
@@ -1325,7 +1325,7 @@
event = trans.app.model.SampleEvent(sample, new_state, comments)
trans.sa_session.add( event )
trans.sa_session.flush()
- #self.__set_request_state( trans, sample.request )
+ self.__set_request_state( trans, sample.request )
return trans.response.send_redirect( web.url_for( controller='requests_admin',
action='show_events',
sample_id=sample.id))
@@ -1370,6 +1370,14 @@
status='error',
message="Invalid sample ID",
**kwd) )
+ # check if a library and folder has been set for this sample yet.
+ if not sample.library or not sample.folder:
+ return trans.response.send_redirect( web.url_for( controller='requests_admin',
+ action='list',
+ operation='show_request',
+ messagetype='error',
+ msg="Set a data library and folder for <b>%s</b> to transfer dataset(s)." % sample.name,
+ id=trans.security.encode_id(sample.request.id) ) )
if sample.request.type.datatx_info.get('data_dir', ''):
folder_path = util.restore_text( sample.request.type.datatx_info.get('data_dir', '') )
else:
@@ -1405,7 +1413,7 @@
sample_id=trans.security.encode_id(sample.id),
msg=msg, messagetype='error',
folder_path=folder_path ))
- return output.split()[2:]
+ return output.split()
def __get_files_in_dir(self, trans, sample, folder_path):
tmpfiles = self.__get_files(trans, sample, folder_path)
@@ -1581,12 +1589,12 @@
dataset_index=index,
cmd=cmd)
dtt.start()
- # set the sample state to the last state
- if sample.current_state().id != sample.request.type.states[-1].id:
- event = trans.app.model.SampleEvent(sample, sample.request.type.states[-1],
- 'The dataset is ready and are being transfered to Galaxy')
- trans.sa_session.add( event )
- trans.sa_session.flush()
+# # set the sample state to the last state
+# if sample.current_state().id != sample.request.type.states[-1].id:
+# event = trans.app.model.SampleEvent(sample, sample.request.type.states[-1],
+# 'The dataset is ready and are being transferred to Galaxy')
+# trans.sa_session.add( event )
+# trans.sa_session.flush()
if error_msg:
return trans.response.send_redirect( web.url_for( controller='requests_admin',
action='show_datatx_page',
diff -r 80747406525d -r c1d024e76c2c scripts/galaxy_messaging/server/data_transfer.py
--- a/scripts/galaxy_messaging/server/data_transfer.py Wed Feb 24 08:44:22 2010 -0500
+++ b/scripts/galaxy_messaging/server/data_transfer.py Wed Feb 24 10:04:03 2010 -0500
@@ -94,7 +94,7 @@
# update the data transfer status in the db
self.update_status('Complete')
# cleanup
- self.cleanup()
+ #self.cleanup()
sys.exit(0)
def cleanup(self):
diff -r 80747406525d -r c1d024e76c2c templates/admin/requests/get_data.mako
--- a/templates/admin/requests/get_data.mako Wed Feb 24 08:44:22 2010 -0500
+++ b/templates/admin/requests/get_data.mako Wed Feb 24 10:04:03 2010 -0500
@@ -30,7 +30,7 @@
<h3>Sample "${sample.name}" of Request "${sample.request.name}"</h3>
<ul class="manage-table-actions">
-## %if sample.request.submitted() and sample.untransfered_dataset_files():
+## %if sample.request.submitted() and sample.untransferred_dataset_files():
## <li>
## <a class="action-button" href="${h.url_for( controller='requests_admin', action='start_datatx', id=trans.security.encode_id(sample.id) )}">
## <span>Start data transfer</span></a>
@@ -60,7 +60,7 @@
<form name="get_data" action="${h.url_for( controller='requests_admin', action='get_data', sample_id=sample.id)}" method="post" >
%if len(dataset_files):
<div class="form-row">
- <h4>Datasets Transfered</h4>
+ <h4>Datasets Transferred</h4>
<div class="form-row">
<table class="grid">
<thead>
diff -r 80747406525d -r c1d024e76c2c templates/admin/requests/show_request.mako
--- a/templates/admin/requests/show_request.mako Wed Feb 24 08:44:22 2010 -0500
+++ b/templates/admin/requests/show_request.mako Wed Feb 24 10:04:03 2010 -0500
@@ -72,12 +72,6 @@
<span>Reject request</span></a>
</li>
%endif
-## %if request.submitted() and request.samples:
-## <li>
-## <a class="action-button" href="${h.url_for( controller='requests_admin', action='bar_codes', request_id=request.id)}">
-## <span>Bar codes</span></a>
-## </li>
-## %endif
<li>
<a class="action-button" href="${h.url_for( controller='requests_admin', action='list', operation='events', id=trans.security.encode_id(request.id) )}">
<span>History</span></a>
@@ -134,7 +128,7 @@
<th>Data Library</th>
<th>Folder</th>
%if request.submitted() or request.complete():
- <th>Dataset(s) Transfered</th>
+ <th>Dataset(s) Transferred</th>
%endif
<th></th>
</tr>
diff -r 80747406525d -r c1d024e76c2c templates/base_panels.mako
--- a/templates/base_panels.mako Wed Feb 24 08:44:22 2010 -0500
+++ b/templates/base_panels.mako Wed Feb 24 10:04:03 2010 -0500
@@ -188,6 +188,7 @@
<div class="submenu">
<ul>
<li><a href="${h.url_for( controller='/requests', action='index' )}">Sequencing Requests</a></li>
+ <li><a target="_blank" href="${app.config.get( "lims_doc_url", "http://main.g2.bx.psu.edu/u/rc/p/sts" )}">Help</a></li>
</ul>
</div>
</td>
diff -r 80747406525d -r c1d024e76c2c templates/requests/show_request.mako
--- a/templates/requests/show_request.mako Wed Feb 24 08:44:22 2010 -0500
+++ b/templates/requests/show_request.mako Wed Feb 24 10:04:03 2010 -0500
@@ -124,7 +124,7 @@
<th>Data Library</th>
<th>Folder</th>
%if request.submitted() or request.complete():
- <th>Dataset(s) Transfered</th>
+ <th>Dataset(s) Transferred</th>
%endif
<th></th>
</tr>
1
0
details: http://www.bx.psu.edu/hg/galaxy/rev/66ba0f2d6d32
changeset: 3436:66ba0f2d6d32
user: rc
date: Wed Feb 24 10:42:36 2010 -0500
description:
lims:
- code cleanup
- cleanup tmp files after data transfer
diffstat:
lib/galaxy/web/controllers/requests_admin.py | 6 ------
scripts/galaxy_messaging/server/data_transfer.py | 2 +-
2 files changed, 1 insertions(+), 7 deletions(-)
diffs (28 lines):
diff -r c1d024e76c2c -r 66ba0f2d6d32 lib/galaxy/web/controllers/requests_admin.py
--- a/lib/galaxy/web/controllers/requests_admin.py Wed Feb 24 10:04:03 2010 -0500
+++ b/lib/galaxy/web/controllers/requests_admin.py Wed Feb 24 10:42:36 2010 -0500
@@ -1589,12 +1589,6 @@
dataset_index=index,
cmd=cmd)
dtt.start()
-# # set the sample state to the last state
-# if sample.current_state().id != sample.request.type.states[-1].id:
-# event = trans.app.model.SampleEvent(sample, sample.request.type.states[-1],
-# 'The dataset is ready and are being transferred to Galaxy')
-# trans.sa_session.add( event )
-# trans.sa_session.flush()
if error_msg:
return trans.response.send_redirect( web.url_for( controller='requests_admin',
action='show_datatx_page',
diff -r c1d024e76c2c -r 66ba0f2d6d32 scripts/galaxy_messaging/server/data_transfer.py
--- a/scripts/galaxy_messaging/server/data_transfer.py Wed Feb 24 10:04:03 2010 -0500
+++ b/scripts/galaxy_messaging/server/data_transfer.py Wed Feb 24 10:42:36 2010 -0500
@@ -94,7 +94,7 @@
# update the data transfer status in the db
self.update_status('Complete')
# cleanup
- #self.cleanup()
+ self.cleanup()
sys.exit(0)
def cleanup(self):
1
0