lists.galaxyproject.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
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
List overview
Download
galaxy-dev
February 2010
----- 2024 -----
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
galaxy-dev@lists.galaxyproject.org
32 participants
180 discussions
Start a n
N
ew thread
[hg] galaxy 3342: Sanitize HTML in annotations and update annota...
by Greg Von Kuster
09 Feb '10
09 Feb '10
details:
http://www.bx.psu.edu/hg/galaxy/rev/207298b5ea39
changeset: 3342:207298b5ea39 user: jeremy goecks <jeremy.goecks(a)emory.edu> date: Fri Feb 05 15:28:03 2010 -0500 description: Sanitize HTML in annotations and update annotations via ajax to show sanitation results. diffstat: lib/galaxy/web/controllers/history.py | 8 +++++--- lib/galaxy/web/controllers/root.py | 5 ++++- lib/galaxy/web/controllers/workflow.py | 19 ++++++++++--------- static/scripts/galaxy.base.js | 4 ++-- 4 files changed, 21 insertions(+), 15 deletions(-) diffs (128 lines): diff -r 12789b4ba919 -r 207298b5ea39 lib/galaxy/web/controllers/history.py --- a/lib/galaxy/web/controllers/history.py Fri Feb 05 14:25:38 2010 -0500 +++ b/lib/galaxy/web/controllers/history.py Fri Feb 05 15:28:03 2010 -0500 @@ -4,6 +4,7 @@ from galaxy.model.mapping import desc from galaxy.model.orm import * from galaxy.util.json import * +from galaxy.util.sanitize_html import sanitize_html from galaxy.tags.tag_handler import TagHandler from sqlalchemy.sql.expression import ClauseElement import webhelpers, logging, operator @@ -355,17 +356,18 @@ history.name = new_name trans.sa_session.add( history ) trans.sa_session.flush() + return history.name @web.expose @web.require_login( "use Galaxy histories" ) def annotate_async( self, trans, id, new_annotation=None, **kwargs ): history = self.get_history( trans, id ) if new_annotation: + # Sanitize annotation before adding it. + new_annotation = sanitize_html( new_annotation, 'utf-8', 'text/html' ) self.add_item_annotation( trans, history, new_annotation ) trans.sa_session.flush() - return - else: - return "failed" + return new_annotation @web.expose @web.json diff -r 12789b4ba919 -r 207298b5ea39 lib/galaxy/web/controllers/root.py --- a/lib/galaxy/web/controllers/root.py Fri Feb 05 14:25:38 2010 -0500 +++ b/lib/galaxy/web/controllers/root.py Fri Feb 05 15:28:03 2010 -0500 @@ -5,6 +5,7 @@ from cgi import escape, FieldStorage from galaxy import util, datatypes, jobs, web, util from galaxy.web.base.controller import * +from galaxy.util.sanitize_html import sanitize_html from galaxy.model.orm import * log = logging.getLogger( __name__ ) @@ -305,7 +306,9 @@ else: setattr( data.metadata, name, spec.unwrap( params.get (name, None) ) ) data.datatype.after_setting_metadata( data ) - self.add_item_annotation( trans, data, params.annotation ) + # Sanitize annotation before adding it. + annotation = sanitize_html( params.annotation, 'utf-8', 'text/html' ) + self.add_item_annotation( trans, data, annotation ) else: msg = ' (Metadata could not be changed because this dataset is currently being used as input or output. You must cancel or wait for these jobs to complete before changing metadata.)' trans.sa_session.flush() diff -r 12789b4ba919 -r 207298b5ea39 lib/galaxy/web/controllers/workflow.py --- a/lib/galaxy/web/controllers/workflow.py Fri Feb 05 14:25:38 2010 -0500 +++ b/lib/galaxy/web/controllers/workflow.py Fri Feb 05 15:28:03 2010 -0500 @@ -11,6 +11,7 @@ from galaxy.datatypes.data import Data from galaxy.util.odict import odict from galaxy.util.bunch import Bunch +from galaxy.util.sanitize_html import sanitize_html from galaxy.util.topsort import topsort, topsort_levels, CycleError from galaxy.workflow.modules import * from galaxy.model.mapping import desc @@ -317,8 +318,9 @@ # Rename workflow. stored.name = kwargs[ 'name' ] if 'annotation' in kwargs: - # Set workflow annotation. - self.add_item_annotation( trans, stored, kwargs[ 'annotation' ] ) + # Set workflow annotation; sanitize annotation before adding it. + annotation = sanitize_html( kwargs[ 'annotation' ], 'utf-8', 'text/html' ) + self.add_item_annotation( trans, stored, annotation ) trans.sa_session.flush() return trans.fill_template( 'workflow/edit_attributes.mako', @@ -350,20 +352,18 @@ if new_name: stored.name = new_name trans.sa_session.flush() - return - else: - return "failed" + return stored.name @web.expose @web.require_login( "use Galaxy workflows" ) def annotate_async( self, trans, id, new_annotation=None, **kwargs ): stored = get_stored_workflow( trans, id ) if new_annotation: + # Sanitize annotation before adding it. + new_annotation = sanitize_html( new_annotation, 'utf-8', 'text/html' ) self.add_item_annotation( trans, stored, new_annotation ) trans.sa_session.flush() - return - else: - return "failed" + return new_annotation @web.expose @web.require_login( "use Galaxy workflows" ) @@ -643,7 +643,8 @@ step.temp_input_connections = step_dict['input_connections'] # Save step annotation. - self.add_item_annotation( trans, step, step_dict[ 'annotation' ] ) + annotation = sanitize_html( step_dict[ 'annotation' ], 'utf-8', 'text/html' ) + self.add_item_annotation( trans, step, annotation ) # Second pass to deal with connections between steps for step in steps: # Input connections diff -r 12789b4ba919 -r 207298b5ea39 static/scripts/galaxy.base.js --- a/static/scripts/galaxy.base.js Fri Feb 05 14:25:38 2010 -0500 +++ b/static/scripts/galaxy.base.js Fri Feb 05 15:28:03 2010 -0500 @@ -249,9 +249,9 @@ alert( "Text editing for elt " + text_elt_id + " failed" ); // TODO: call finish or no? For now, let's not because error occurred. }, - success: function() { + success: function(processed_text) { // Set new text and call finish method. - $("#" + text_elt_id).text( new_text ); + $("#" + text_elt_id).text( processed_text ); if (on_finish != null) on_finish(t); }
1
0
0
0
[hg] galaxy 3341: Add path to OS X HYPHY for buildbot
by Greg Von Kuster
09 Feb '10
09 Feb '10
details:
http://www.bx.psu.edu/hg/galaxy/rev/30c0d321bcbd
changeset: 3341:30c0d321bcbd user: Nate Coraor <nate(a)bx.psu.edu> date: Fri Feb 05 15:27:38 2010 -0500 description: Add path to OS X HYPHY for buildbot diffstat: buildbot_setup.sh | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diffs (19 lines): diff -r 12789b4ba919 -r 30c0d321bcbd buildbot_setup.sh --- a/buildbot_setup.sh Fri Feb 05 14:25:38 2010 -0500 +++ b/buildbot_setup.sh Fri Feb 05 15:27:38 2010 -0500 @@ -10,6 +10,15 @@ kernel=`uname -r | cut -f1,2 -d.` HYPHY="/galaxy/software/linux$kernel-$HOSTTYPE/hyphy" ;; + darwin*) + this_minor=`uname -r | awk -F. '{print ($1-4)}'` + machine=`machine` + for minor in `jot - 3 $this_minor 1`; do + HYPHY="/galaxy/software/macosx10.$minor-$machine/hyphy" + [ -d "$HYPHY" ] && break + done + [ ! -d "$HYPHY" ] && unset HYPHY + ;; esac LINKS="
1
0
0
0
[hg] galaxy 3340: Forms UI improvements
by Greg Von Kuster
09 Feb '10
09 Feb '10
details:
http://www.bx.psu.edu/hg/galaxy/rev/12789b4ba919
changeset: 3340:12789b4ba919 user: rc date: Fri Feb 05 14:25:38 2010 -0500 description: Forms UI improvements diffstat: lib/galaxy/web/controllers/forms.py | 8 +++++--- templates/display_common.mako | 34 +++++++++++++++++++--------------- 2 files changed, 24 insertions(+), 18 deletions(-) diffs (76 lines): diff -r 9e2ba4cf4494 -r 12789b4ba919 lib/galaxy/web/controllers/forms.py --- a/lib/galaxy/web/controllers/forms.py Fri Feb 05 14:18:37 2010 -0500 +++ b/lib/galaxy/web/controllers/forms.py Fri Feb 05 14:25:38 2010 -0500 @@ -135,7 +135,9 @@ return trans.response.send_redirect( web.url_for( controller='forms', action='new', msg=msg, - messagetype='error' ) ) + messagetype='error', + name=util.restore_text( params.get( 'name', '' ) ), + description=util.restore_text( params.get( 'description', '' ) ) ) ) self.__get_saved_form( fd ) if self.__imported_from_file: return trans.response.send_redirect( web.url_for( controller='forms', @@ -151,8 +153,8 @@ name=fd.name, description=fd.desc, form_type_selectbox=fd.type ) ) - inputs = [ ( 'Name', TextField( 'name', 40, 'New Form' ) ), - ( 'Description', TextField( 'description', 40, '' ) ), + inputs = [ ( 'Name', TextField( 'name', 40, util.restore_text( params.get( 'name', '' ) ) ) ), + ( 'Description', TextField( 'description', 40, util.restore_text( params.get( 'description', '' ) ) ) ), ( 'Type', self.__form_types_widget(trans, selected=params.get( 'form_type', 'none' )) ), ( 'Import from csv file (Optional)', FileField( 'file_data', 40, '' ) ) ] return trans.fill_template( '/admin/forms/create_form.mako', diff -r 9e2ba4cf4494 -r 12789b4ba919 templates/display_common.mako --- a/templates/display_common.mako Fri Feb 05 14:18:37 2010 -0500 +++ b/templates/display_common.mako Fri Feb 05 14:25:38 2010 -0500 @@ -30,6 +30,8 @@ ## Start with exceptions, end with default. if a_class is model.History: return "Histories" + elif a_class is model.FormDefinitionCurrent: + return "Forms" else: return get_class_display_name( a_class ) + "s" %> @@ -55,21 +57,23 @@ ## Get plural term for class. <%def name="get_class_plural( a_class )"> - <% - if a_class == model.History: - class_plural = "Histories" - elif a_class == model.StoredWorkflow: - class_plural = "Workflows" - elif a_class == model.Page: - class_plural = "Pages" - elif a_class == model.Library: - class_plural = "Libraries" - elif a_class == model.HistoryDatasetAssociation: - class_plural = "Datasets" - else: - class_plural = a_class.__name__ + "s" - return class_plural - %> +<% + if a_class == model.History: + class_plural = "Histories" + elif a_class == model.StoredWorkflow: + class_plural = "Workflows" + elif a_class == model.Page: + class_plural = "Pages" + elif a_class == model.Library: + class_plural = "Libraries" + elif a_class == model.HistoryDatasetAssociation: + class_plural = "Datasets" + elif a_class == model.FormDefinitionCurrent: + class_plural = "Forms" + else: + class_plural = a_class.__name__ + "s" + return class_plural +%> </%def> ## Returns the controller name for an item based on its class.
1
0
0
0
[hg] galaxy 3339: UI improvements for history panel and tags: (1...
by Greg Von Kuster
09 Feb '10
09 Feb '10
details:
http://www.bx.psu.edu/hg/galaxy/rev/9e2ba4cf4494
changeset: 3339:9e2ba4cf4494 user: jeremy goecks <jeremy.goecks(a)emory.edu> date: Fri Feb 05 14:18:37 2010 -0500 description: UI improvements for history panel and tags: (1) added icons for tags, annotations; (2) added tooltips for editable text; (3) added tooltips for tags. diffstat: static/images/sticky-note-text.png | 0 static/images/tag-label.png | 0 static/june_2007_style/base.css.tmpl | 47 ++++++++++++++++++- static/june_2007_style/blue/base.css | 9 +++- static/scripts/galaxy.base.js | 13 +++- static/scripts/packed/galaxy.base.js | 2 +- templates/root/history.mako | 88 ++++++++++++++++++++-------------- templates/tagging_common.mako | 23 +++++--- 8 files changed, 129 insertions(+), 53 deletions(-) diffs (266 lines): diff -r 7163a2128267 -r 9e2ba4cf4494 static/images/sticky-note-text.png Binary file static/images/sticky-note-text.png has changed diff -r 7163a2128267 -r 9e2ba4cf4494 static/images/tag-label.png Binary file static/images/tag-label.png has changed diff -r 7163a2128267 -r 9e2ba4cf4494 static/june_2007_style/base.css.tmpl --- a/static/june_2007_style/base.css.tmpl Fri Feb 05 11:53:06 2010 -0500 +++ b/static/june_2007_style/base.css.tmpl Fri Feb 05 14:18:37 2010 -0500 @@ -697,4 +697,49 @@ .icon-button.edit:hover { -sprite-group: history-buttons; -sprite-image: pencil_icon_dark.png; -} \ No newline at end of file +} + +.icon-button.tag { + background-image:url(/static/images/tag-label.png); + background-repeat:no-repeat; + background-position:center; + padding: 0px 0px 0px 0px; +} + +.icon-button.annotate { + background-image:url(/static/images/sticky-note-text.png); + background-repeat:no-repeat; + background-position:center; + padding: 0px 0px 0px 0px; +} + +.tooltip { + position: relative; + cursor: pointer; +} + +.tooltip span.tip { + display: none +} + +.tooltip:hover span.tip { + font-size: 90%; + display: block; + position: absolute; + right:2em;top:-1.75em; + width: inherit; + background-color: black; + color: white; + text-align: center; + padding: 0.25em 0.5em; +} + +.editable-text { + cursor:pointer; +} + +.editable-text:hover{ + background-image:url(); + background-repeat:no-repeat; + background-position:right; +} diff -r 7163a2128267 -r 9e2ba4cf4494 static/june_2007_style/blue/base.css --- a/static/june_2007_style/blue/base.css Fri Feb 05 11:53:06 2010 -0500 +++ b/static/june_2007_style/blue/base.css Fri Feb 05 14:18:37 2010 -0500 @@ -116,4 +116,11 @@ .icon-button.display{background:url(history-buttons.png) no-repeat 0px -0px;} .icon-button.display:hover{background:url(history-buttons.png) no-repeat 0px -26px;} .icon-button.delete{background:url(history-buttons.png) no-repeat 0px -104px;} -.icon-button.delete:hover{background:url(history-buttons.png) no-repeat 0px -130px;} \ No newline at end of file +.icon-button.delete:hover{background:url(history-buttons.png) no-repeat 0px -130px;} +.icon-button.tag{background-image:url(/static/images/tag-label.png);background-repeat:no-repeat;background-position:center;padding: 0px 0px 0px 0px;} +.icon-button.annotate{background-image:url(/static/images/sticky-note-text.png);background-repeat:no-repeat;background-position:center;padding: 0px 0px 0px 0px;} +.tooltip {position: relative; cursor: pointer} +.tooltip span.tip{display: none;} +.tooltip:hover span.tip{font-size: 90%; display: block;position: absolute;right:2em;top:-1.75em; width: inherit; background-color: black;color: white;text-align: center;padding: 0.25em 0.5em;} +.editable-text{cursor:pointer} +.editable-text:hover{background-image:url();background-repeat:no-repeat;background-position:right} \ No newline at end of file diff -r 7163a2128267 -r 9e2ba4cf4494 static/scripts/galaxy.base.js --- a/static/scripts/galaxy.base.js Fri Feb 05 11:53:06 2010 -0500 +++ b/static/scripts/galaxy.base.js Fri Feb 05 14:18:37 2010 -0500 @@ -211,14 +211,21 @@ // // Edit and save text asynchronously. // -function async_save_text(click_to_edit_elt, text_elt_id, save_url, text_parm_name, use_textarea, num_rows, on_start, on_finish) +function async_save_text(click_to_edit_elt, text_elt_id, save_url, text_parm_name, num_cols, use_textarea, num_rows, on_start, on_finish) { + // Set defaults if necessary. + if (num_cols == null) + num_cols = 30; + if (num_rows == null) + num_rows = 4 + + // Set up input element. $("#" + click_to_edit_elt).click( function() { var old_text = $("#" + text_elt_id).text() if (use_textarea) - var t = $("<textarea rows='" + num_rows + "'>" + old_text + "</textarea>" ); + var t = $("<textarea rows='" + num_rows + "' cols='" + num_cols + "'>" + old_text + "</textarea>" ); else - var t = $("<input type='text' value='" + old_text + "'></input>" ); + var t = $("<input type='text' value='" + old_text + "' size='" + num_cols + "'></input>" ); t.blur( function() { $(this).remove(); $("#" + text_elt_id).show(); diff -r 7163a2128267 -r 9e2ba4cf4494 static/scripts/packed/galaxy.base.js --- a/static/scripts/packed/galaxy.base.js Fri Feb 05 11:53:06 2010 -0500 +++ b/static/scripts/packed/galaxy.base.js Fri Feb 05 14:18:37 2010 -0500 @@ -1,1 +1,1 @@ -$.fn.makeAbsolute=function(a){return this.each(function(){var b=$(this);var c=b.position();b.css({position:"absolute",marginLeft:0,marginTop:0,top:c.top,left:c.left,right:$(window).width()-(c.left+b.width())});if(a){b.remove().appendTo("body")}})};jQuery(document).ready(function(){jQuery("a[confirm]").click(function(){return confirm(jQuery(this).attr("confirm"))});make_popup_menus()});function make_popup_menus(){jQuery("div[popupmenu]").each(function(){var c={};$(this).find("a").each(function(){var b=$(this).attr("confirm"),d=$(this).attr("href"),e=$(this).attr("target");c[$(this).text()]=function(){if(!b||confirm(b)){var g=window;if(e=="_parent"){g=window.parent}else{if(e=="_top"){g=window.top}}g.location=d}}});var a=$("#"+$(this).attr("popupmenu"));make_popupmenu(a,c);$(this).remove();a.addClass("popup").show()})}function ensure_popup_helper(){if($("#popup-helper").length==0){$("<div id='popup-helper'/>").css({background:"white",opacity:0,zIndex:15000,position:"absolute",t op:0,left:0,width:"100%",height:"100%"}).appendTo("body").hide()}}function make_popupmenu(d,c){ensure_popup_helper();var a=$(d);var b=$("<ul id='"+d.attr("id")+"-menu'></ul>");$.each(c,function(g,f){if(f){$("<li/>").html(g).click(f).appendTo(b)}else{$("<li class='head'/>").html(g).appendTo(b)}});var e=$("<div class='popmenu-wrapper'>");e.append(b).append("<div class='overlay-border'>").css("position","absolute").appendTo("body").hide();attach_popupmenu(d,e)}function attach_popupmenu(b,d){var a=function(){d.unbind().hide();$("#popup-helper").unbind("click.popupmenu").hide()};var c=function(g){var h=$(b).offset();$("#popup-helper").bind("click.popupmenu",a).show();d.click(a).css({left:0,top:-1000}).show();var f=g.pageX-d.width()/2;f=Math.min(f,$(document).scrollLeft()+$(window).width()-$(d).width()-20);f=Math.max(f,$(document).scrollLeft()+20);d.css({top:g.pageY-5,left:f});return false};$(b).click(c)}var array_length=function(a){if(a.length){return a.length}var b=0;for(element in a){b++}return b};var replace_dbkey_select=function(){var c=$("select[name=dbkey]");var d=c.attr("value");if(c.length!=0){var e=$("<input id='dbkey-input' type='text'></input>");e.attr("size",40);e.attr("name",c.attr("name"));e.click(function(){var g=$(this).attr("value");$(this).attr("value","Loading...");$(this).showAllInCache();$(this).attr("value",g);$(this).select()});var b=new Array();var a=new Object();c.children("option").each(function(){var h=$(this).text();var g=$(this).attr("value");if(g=="?"){return}b.push(h);a[h]=g;if(g==d){e.attr("value",h)}});if(e.attr("value")==""){e.attr("value","Click to Search or Select Build")}var f={selectFirst:false,autoFill:false,mustMatch:false,matchContains:true,max:1000,minChars:0,hideForLessThanMinChars:false};e.autocomplete(b,f);c.replaceWith(e);$("form").submit(function(){var i=$("#dbkey-input");if(i.length!=0){var h=i.attr("value");var g=a[h];if(g!=null&&g!=undefined){i.attr("value",g)}else{if(d!=""){i.attr("value",d)}else{i. attr("value","?")}}}})}};function async_save_text(d,c,a,e,f,b){$("#"+d).click(function(){var h=$("#"+c).text();if(f){var g=$("<textarea rows='"+b+"'>"+h+"</textarea>")}else{var g=$("<input type='text' value='"+h+"'></input>")}g.blur(function(){$(this).remove();$("#"+c).show()});g.keyup(function(j){if(j.keyCode==27){$(this).trigger("blur")}else{if(j.keyCode==13){new_text=this.value;$(this).trigger("blur");var i=new Object();i[e]=new_text;$.ajax({url:a,data:i,error:function(){alert("Text editing for elt "+c+" failed")},success:function(){$("#"+c).text(new_text)}})}}});$("#"+c).hide();g.insertAfter($("#"+c));g.focus();g.select();return false})}; \ No newline at end of file +$.fn.makeAbsolute=function(a){return this.each(function(){var b=$(this);var c=b.position();b.css({position:"absolute",marginLeft:0,marginTop:0,top:c.top,left:c.left,right:$(window).width()-(c.left+b.width())});if(a){b.remove().appendTo("body")}})};jQuery(document).ready(function(){jQuery("a[confirm]").click(function(){return confirm(jQuery(this).attr("confirm"))});make_popup_menus()});function make_popup_menus(){jQuery("div[popupmenu]").each(function(){var c={};$(this).find("a").each(function(){var b=$(this).attr("confirm"),d=$(this).attr("href"),e=$(this).attr("target");c[$(this).text()]=function(){if(!b||confirm(b)){var g=window;if(e=="_parent"){g=window.parent}else{if(e=="_top"){g=window.top}}g.location=d}}});var a=$("#"+$(this).attr("popupmenu"));make_popupmenu(a,c);$(this).remove();a.addClass("popup").show()})}function ensure_popup_helper(){if($("#popup-helper").length==0){$("<div id='popup-helper'/>").css({background:"white",opacity:0,zIndex:15000,position:"absolute",t op:0,left:0,width:"100%",height:"100%"}).appendTo("body").hide()}}function make_popupmenu(d,c){ensure_popup_helper();var a=$(d);var b=$("<ul id='"+d.attr("id")+"-menu'></ul>");$.each(c,function(g,f){if(f){$("<li/>").html(g).click(f).appendTo(b)}else{$("<li class='head'/>").html(g).appendTo(b)}});var e=$("<div class='popmenu-wrapper'>");e.append(b).append("<div class='overlay-border'>").css("position","absolute").appendTo("body").hide();attach_popupmenu(d,e)}function attach_popupmenu(b,d){var a=function(){d.unbind().hide();$("#popup-helper").unbind("click.popupmenu").hide()};var c=function(g){var h=$(b).offset();$("#popup-helper").bind("click.popupmenu",a).show();d.click(a).css({left:0,top:-1000}).show();var f=g.pageX-d.width()/2;f=Math.min(f,$(document).scrollLeft()+$(window).width()-$(d).width()-20);f=Math.max(f,$(document).scrollLeft()+20);d.css({top:g.pageY-5,left:f});return false};$(b).click(c)}var array_length=function(a){if(a.length){return a.length}var b=0;for(element in a){b++}return b};var replace_dbkey_select=function(){var c=$("select[name=dbkey]");var d=c.attr("value");if(c.length!=0){var e=$("<input id='dbkey-input' type='text'></input>");e.attr("size",40);e.attr("name",c.attr("name"));e.click(function(){var g=$(this).attr("value");$(this).attr("value","Loading...");$(this).showAllInCache();$(this).attr("value",g);$(this).select()});var b=new Array();var a=new Object();c.children("option").each(function(){var h=$(this).text();var g=$(this).attr("value");if(g=="?"){return}b.push(h);a[h]=g;if(g==d){e.attr("value",h)}});if(e.attr("value")==""){e.attr("value","Click to Search or Select Build")}var f={selectFirst:false,autoFill:false,mustMatch:false,matchContains:true,max:1000,minChars:0,hideForLessThanMinChars:false};e.autocomplete(b,f);c.replaceWith(e);$("form").submit(function(){var i=$("#dbkey-input");if(i.length!=0){var h=i.attr("value");var g=a[h];if(g!=null&&g!=undefined){i.attr("value",g)}else{if(d!=""){i.attr("value",d)}else{i. attr("value","?")}}}})}};function async_save_text(d,f,e,a,c,h,i,g,b){if(c==null){c=30}if(i==null){i=4}$("#"+d).click(function(){var k=$("#"+f).text();if(h){var j=$("<textarea rows='"+i+"' cols='"+c+"'>"+k+"</textarea>")}else{var j=$("<input type='text' value='"+k+"' size='"+c+"'></input>")}j.blur(function(){$(this).remove();$("#"+f).show();if(b!=null){b(j)}});j.keyup(function(m){if(m.keyCode==27){$(this).trigger("blur")}else{if(m.keyCode==13){new_text=this.value;$(this).trigger("blur");var l=new Object();l[a]=new_text;$.ajax({url:e,data:l,error:function(){alert("Text editing for elt "+f+" failed")},success:function(){$("#"+f).text(new_text);if(b!=null){b(j)}}})}}});if(g!=null){g(j)}$("#"+f).hide();j.insertAfter($("#"+f));j.focus();j.select();return false})}; \ No newline at end of file diff -r 7163a2128267 -r 9e2ba4cf4494 templates/root/history.mako --- a/templates/root/history.mako Fri Feb 05 11:53:06 2010 -0500 +++ b/templates/root/history.mako Fri Feb 05 14:18:37 2010 -0500 @@ -42,19 +42,22 @@ $.jStore.remove("history_expand_state"); })); - // Rename async. - async_save_text("history-rename", "history-name", "${h.url_for( controller="/history", action="rename_async", id=trans.security.encode_id(history.id) )}", "new_name"); + // Rename management. + async_save_text("history-name", "history-name", "${h.url_for( controller="/history", action="rename_async", id=trans.security.encode_id(history.id) )}", "new_name", 18); - // Annotation async. - // Tag async. Simply have the workflow tag element generate a click on the tag element to activate tagging. - $('#workflow-tag').click( function() + // Tag management. + $('#history-tag').click( function() { - $('.tag-area').click(); + $('#history-tag-area').toggle("fast"); return false; }); - - // Annotate async. - async_save_text("history-annotate", "history-annotation", "${h.url_for( controller="/history", action="annotate_async", id=trans.security.encode_id(history.id) )}", "new_annotation", true, 4); + + // Annotation management. + $('#history-annotate').click( function() { + $('#history-annotation-area').toggle("fast"); + return false; + }); + async_save_text("history-annotation", "history-annotation", "${h.url_for( controller="/history", action="annotate_async", id=trans.security.encode_id(history.id) )}", "new_annotation", 18, true, 4); // Updater updater({ @@ -273,10 +276,24 @@ | <a href="${h.url_for('history', show_deleted=False)}">${_('hide deleted')}</a> %endif </div> - + <div id="history-name-area" class="historyLinks" style="color: gray; font-weight: bold;"> - <div style="float: right"><a id="history-rename" title="Rename" class="icon-button edit" target="galaxy_main" href="${h.url_for( controller='history', action='rename' )}"></a></div> - <div id="history-name">${history.get_display_name() | h}</div> + <table width="100%" cellpadding="0" cellspacing="0"> + <tr> + <td align="left"> + <div id="history-name-container" class="editable-text tooltip"> + <span id="history-name">${history.get_display_name() | h}</span> + <span class="tip">Click to edit</span></a> + </div> + </td> + <td align="right"> + <div style="float: right"> + <a id="history-tag" title="Tag" class="icon-button tag tooltip" target="galaxy_main" href="${h.url_for( controller='history', action='tag' )}"></a> + <a id="history-annotate" title="Annotate" class="icon-button annotate" target="galaxy_main" href="${h.url_for( controller='history', action='annotate' )}"></a> + </div> + </td> + </tr> + </table> </div> %if history.deleted: @@ -291,33 +308,30 @@ %if trans.get_user() is not None: <div style="margin: 0px 0px 5px 10px"> - <a href="#" onclick="$('#tags-and-annotation').toggle('fast')">Edit Tags and Annotation/Notes</a> - <div id="tags-and-annotation" style="display: none"> - ## Tagging elt. - <div class="form-row"> - <label>Tags:</label> - <div style="float: right"><a id="workflow-tag" title="Tag" class="icon-button edit" target="galaxy_main" href="${h.url_for( controller='workflow', action='annotate_async' )}"></a></div> - <style> - .tag-area { - border: none; - } - </style> - ${render_individual_tagging_element(user=trans.get_user(), tagged_item=history, elt_context="history.mako", use_toggle_link=False, input_size="20", render_add_tag_button=False)} - <div style="clear: both"></div> - </div> - - ## Annotation elt. - <div id="history-annotation-area" class="form-row"> - <label>Annotation / Notes:</label> - <div style="float: right"><a id="history-annotate" title="Annotate" class="icon-button edit" target="galaxy_main" href="${h.url_for( controller='history', action='annotate_async' )}"></a></div> - %if annotation: - <div id="history-annotation">${annotation | h}</div> - %else: - <div id="history-annotation"></div> - %endif - <div style="clear: both"></div> + ## Tagging elt. + <div id="history-tag-area" class="form-row" style="display: none"> + <label>Tags:</label> + <style> + .tag-area { + border: none; + } + </style> + ${render_individual_tagging_element(user=trans.get_user(), tagged_item=history, elt_context="history.mako", use_toggle_link=False, input_size="20")} + </div> + + ## Annotation elt. + <div id="history-annotation-area" class="form-row" style="display: none"> + <label>Annotation / Notes:</label> + <div class="tooltip"> + %if annotation: + <span id="history-annotation">${annotation | h}</span> + %else: + <span id="history-annotation">None</span> + %endif + <span class="tip">Click to edit annotation</span> </div> </div> + </div> %endif diff -r 7163a2128267 -r 9e2ba4cf4494 templates/tagging_common.mako --- a/templates/tagging_common.mako Fri Feb 05 11:53:06 2010 -0500 +++ b/templates/tagging_common.mako Fri Feb 05 14:18:37 2010 -0500 @@ -72,17 +72,20 @@ %endfor ## Add tag input field. If element is in form, tag input is a textarea; otherwise element is a input type=text. - %if editable: - %if in_form: - <textarea class="tag-input" rows='1' cols='${input_size}'></textarea> - %else: - <input class="tag-input" type='text' size='${input_size}'/> + <div class="tooltip"> + %if editable: + %if in_form: + <textarea class="tag-input" rows='1' cols='${input_size}'></textarea> + %else: + <input class="tag-input" type='text' size='${input_size}'/> + %endif + ## Add "add tag" button. + %if render_add_tag_button: + <img src='${h.url_for('/static/images/add_icon.png')}' rollover='${h.url_for('/static/images/add_icon_dark.png')}' class="add-tag-button"/> + %endif %endif - ## Add "add tag" button. - %if render_add_tag_button: - <img src='${h.url_for('/static/images/add_icon.png')}' rollover='${h.url_for('/static/images/add_icon_dark.png')}' class="add-tag-button"/> - %endif - %endif + <span class="tip">Click to add tags</span> + </div> </div> </div> </%def>
1
0
0
0
[hg] galaxy 3338: Have sam2interval provide a (partial) header s...
by Greg Von Kuster
09 Feb '10
09 Feb '10
details:
http://www.bx.psu.edu/hg/galaxy/rev/7163a2128267
changeset: 3338:7163a2128267 user: Dan Blankenberg <dan(a)bx.psu.edu> date: Fri Feb 05 11:53:06 2010 -0500 description: Have sam2interval provide a (partial) header so that strand is automatically set in metadata. diffstat: test-data/sam2interval_noprintAll.dat | 1 + test-data/sam2interval_printAll.dat | 1 + tools/samtools/sam2interval.py | 2 ++ 3 files changed, 4 insertions(+), 0 deletions(-) diffs (28 lines): diff -r 8b3c1f064bef -r 7163a2128267 test-data/sam2interval_noprintAll.dat --- a/test-data/sam2interval_noprintAll.dat Fri Feb 05 11:49:51 2010 -0500 +++ b/test-data/sam2interval_noprintAll.dat Fri Feb 05 11:53:06 2010 -0500 @@ -1,3 +1,4 @@ +#chrom start end strand ref 6 22 + ref 8 19 + ref 8 14 + diff -r 8b3c1f064bef -r 7163a2128267 test-data/sam2interval_printAll.dat --- a/test-data/sam2interval_printAll.dat Fri Feb 05 11:49:51 2010 -0500 +++ b/test-data/sam2interval_printAll.dat Fri Feb 05 11:53:06 2010 -0500 @@ -1,3 +1,4 @@ +#chrom start end strand ref 6 22 + r001 163 ref 7 30 8M2I4M1D3M = 37 39 TTAGATAAAGGATACTA * ref 8 19 + r002 0 ref 9 30 3S6M1P1I4M * 0 0 AAAAGATAAGGATA * ref 8 14 + r003 0 ref 9 30 5H6M * 0 0 AGCTAA * NM:i:1 diff -r 8b3c1f064bef -r 7163a2128267 tools/samtools/sam2interval.py --- a/tools/samtools/sam2interval.py Fri Feb 05 11:49:51 2010 -0500 +++ b/tools/samtools/sam2interval.py Fri Feb 05 11:53:06 2010 -0500 @@ -76,6 +76,8 @@ cigar = re.compile( '\d+M|\d+N|\d+D|\d+P' ) + print '#chrom\tstart\tend\tstrand' # provide a (partial) header so that strand is automatically set in metadata + for line in infile: line = line.rstrip( '\r\n' ) if line and not line.startswith( '#' ) and not line.startswith( '@' ) :
1
0
0
0
[hg] galaxy 3337: Fix Twill Test Framework: diffs were no longer...
by Greg Von Kuster
09 Feb '10
09 Feb '10
details:
http://www.bx.psu.edu/hg/galaxy/rev/8b3c1f064bef
changeset: 3337:8b3c1f064bef user: Dan Blankenberg <dan(a)bx.psu.edu> date: Fri Feb 05 11:49:51 2010 -0500 description: Fix Twill Test Framework: diffs were no longer being reported (all functional tests not writing to stderr were passing regardless of failure). diffstat: test/base/twilltestcase.py | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (11 lines): diff -r 22c1284782fb -r 8b3c1f064bef test/base/twilltestcase.py --- a/test/base/twilltestcase.py Fri Feb 05 11:20:13 2010 -0500 +++ b/test/base/twilltestcase.py Fri Feb 05 11:49:51 2010 -0500 @@ -82,6 +82,7 @@ for char in line: if ord( char ) > 128: raise AssertionError( "Binary data detected, not displaying diff" ) + raise AssertionError( "".join( diff_slice ) ) def get_filename( self, filename ): full = os.path.join( self.file_dir, filename)
1
0
0
0
[hg] galaxy 3336: upgrading pexpect to v2.4
by Greg Von Kuster
09 Feb '10
09 Feb '10
details:
http://www.bx.psu.edu/hg/galaxy/rev/22c1284782fb
changeset: 3336:22c1284782fb user: rc date: Fri Feb 05 11:20:13 2010 -0500 description: upgrading pexpect to v2.4 diffstat: eggs.ini | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff -r b4ba343d3540 -r 22c1284782fb eggs.ini --- a/eggs.ini Fri Feb 05 10:04:04 2010 -0500 +++ b/eggs.ini Fri Feb 05 11:20:13 2010 -0500 @@ -40,7 +40,7 @@ Paste = 1.6 PasteDeploy = 1.3.3 PasteScript = 1.7.3 -pexpect = 2.3 +pexpect = 2.4 Routes = 1.11 simplejson = 1.5 SQLAlchemy = 0.5.6 @@ -73,7 +73,7 @@ DRMAA_python =
http://gridengine.sunsource.net/files/documents/7/36/DRMAA-python-0.2.tar.gz
MySQL_python =
http://superb-west.dl.sourceforge.net/sourceforge/mysql-python/MySQL-python…
http://downloads.mysql.com/archives/mysql-5.0/mysql-5.0.67.tar.gz
pbs_python =
http://ftp.sara.nl/pub/outgoing/pbs_python-2.9.4.tar.gz
-pexpect =
http://pexpect.sourceforge.net/pexpect-2.3.tar.gz
+pexpect =
http://pypi.python.org/packages/source/p/pexpect/pexpect-2.4.tar.gz
psycopg2 =
http://initd.org/pub/software/psycopg/PSYCOPG-2-0/psycopg2-2.0.6.tar.gz
ftp://ftp-archives.postgresql.org/pub/source/v8.2.6/postgresql-8.2.6.tar.bz2
pycrypto =
http://www.amk.ca/files/python/crypto/pycrypto-2.0.1.tar.gz
pysam =
http://bitbucket.org/kanwei/kanwei-pysam/get/e3c601a062fd.gz
1
0
0
0
[hg] galaxy 3335: Add (most of) Assaf Gordon's patch for allowin...
by Greg Von Kuster
09 Feb '10
09 Feb '10
details:
http://www.bx.psu.edu/hg/galaxy/rev/b4ba343d3540
changeset: 3335:b4ba343d3540 user: Nate Coraor <nate(a)bx.psu.edu> date: Fri Feb 05 10:04:04 2010 -0500 description: Add (most of) Assaf Gordon's patch for allowing SGE options in the runner url, and add the same support to PBS. Please note that this should be considered a temporary implementation, and will be removed in the future. diffstat: lib/galaxy/jobs/__init__.py | 9 +++++ lib/galaxy/jobs/runners/pbs.py | 69 +++++++++++++++++++++++++---------------- lib/galaxy/jobs/runners/sge.py | 35 +++++++++++++++++---- 3 files changed, 79 insertions(+), 34 deletions(-) diffs (188 lines): diff -r 51a1369fdf96 -r b4ba343d3540 lib/galaxy/jobs/__init__.py --- a/lib/galaxy/jobs/__init__.py Fri Feb 05 09:23:19 2010 -0500 +++ b/lib/galaxy/jobs/__init__.py Fri Feb 05 10:04:04 2010 -0500 @@ -719,6 +719,7 @@ for outfile in [ str( o ) for o in output_paths ]: sizes.append( ( outfile, os.stat( outfile ).st_size ) ) return sizes + def setup_external_metadata( self, exec_dir = None, tmp_dir = None, dataset_files_path = None, config_root = None, datatypes_config = None, set_extension = True, **kwds ): # extension could still be 'auto' if this is the upload tool. job = self.sa_session.query( model.Job ).get( self.job_id ) @@ -747,6 +748,14 @@ job_metadata = os.path.join( self.working_directory, TOOL_PROVIDED_JOB_METADATA_FILE ), **kwds ) + @property + def user( self ): + job = self.sa_session.query( model.Job ).get( self.job_id ) + if job.history.user is None: + return 'anonymous@' + job.galaxy_session.remote_addr.split()[-1] + else: + return job.history.user.email + class DefaultJobDispatcher( object ): def __init__( self, app ): self.app = app diff -r 51a1369fdf96 -r b4ba343d3540 lib/galaxy/jobs/runners/pbs.py --- a/lib/galaxy/jobs/runners/pbs.py Fri Feb 05 09:23:19 2010 -0500 +++ b/lib/galaxy/jobs/runners/pbs.py Fri Feb 05 10:04:04 2010 -0500 @@ -124,12 +124,27 @@ def determine_pbs_queue( self, url ): """Determine what PBS queue we are submitting to""" - url_split = url.split("/") - queue = url_split[3] - if queue == "": - # None == server's default queue - queue = None - return queue + try: + return url.split('/')[3] or None + except: + return None + + def determine_pbs_options( self, url ): + try: + opts = url.split('/')[4].strip().lstrip('-').split(' -') + assert opts != [''] + except: + return [] + rval = [] + for opt in opts: + name, value = opt.split( None, 1 ) + if name == 'l': + resource_attrs = value.split(',') + for j, ( res, val ) in enumerate( [ a.split('=', 1) for a in resource_attrs ] ): + rval.append( dict( name = pbs.ATTR_l, value = val, resource = res ) ) + else: + rval.append( dict( name = getattr( pbs, 'ATTR_' + name ), value = value ) ) + return rval def run_next( self ): """ @@ -175,6 +190,7 @@ ( pbs_server_name, runner_url ) = self.determine_pbs_server( runner_url, rewrite = True ) pbs_queue_name = self.determine_pbs_queue( runner_url ) + pbs_options = self.determine_pbs_options( runner_url ) c = pbs.pbs_connect( pbs_server_name ) if c <= 0: job_wrapper.fail( "Unable to queue job for execution. Resubmitting the job may succeed." ) @@ -185,7 +201,6 @@ ofile = "%s/%s.o" % (self.app.config.cluster_files_directory, job_wrapper.job_id) efile = "%s/%s.e" % (self.app.config.cluster_files_directory, job_wrapper.job_id) - output_fnames = job_wrapper.get_output_fnames() # If an application server is set, we're staging @@ -195,28 +210,28 @@ output_files = [ str( o ) for o in output_fnames ] stagein = self.get_stage_in_out( job_wrapper.get_input_fnames() + output_files, symlink=True ) stageout = self.get_stage_in_out( output_files ) - job_attrs = pbs.new_attropl(5) - job_attrs[0].name = pbs.ATTR_o - job_attrs[0].value = pbs_ofile - job_attrs[1].name = pbs.ATTR_e - job_attrs[1].value = pbs_efile - job_attrs[2].name = pbs.ATTR_stagein - job_attrs[2].value = stagein - job_attrs[3].name = pbs.ATTR_stageout - job_attrs[3].value = stageout - job_attrs[4].name = pbs.ATTR_N - job_attrs[4].value = "%s_%s" % ( job_wrapper.job_id, job_wrapper.tool.id ) - exec_dir = os.path.abspath( job_wrapper.working_directory ) + attrs = [ + dict( name = pbs.ATTR_o, value = pbs_ofile ), + dict( name = pbs.ATTR_e, value = pbs_efile ), + dict( name = pbs.ATTR_stagein, value = stagein ), + dict( name = pbs.ATTR_stageout, value = stageout ), + ] # If not, we're using NFS else: - job_attrs = pbs.new_attropl(3) - job_attrs[0].name = pbs.ATTR_o - job_attrs[0].value = ofile - job_attrs[1].name = pbs.ATTR_e - job_attrs[1].value = efile - job_attrs[2].name = pbs.ATTR_N - job_attrs[2].value = "%s_%s" % ( job_wrapper.job_id, job_wrapper.tool.id ) - exec_dir = os.path.abspath( job_wrapper.working_directory ) + attrs = [ + dict( name = pbs.ATTR_o, value = ofile ), + dict( name = pbs.ATTR_e, value = efile ), + ] + + # define PBS job options + attrs.append( dict( name = pbs.ATTR_N, value = str( "%s_%s_%s" % ( job_wrapper.job_id, job_wrapper.tool.id, job_wrapper.user ) ) ) ) + job_attrs = pbs.new_attropl( len( attrs ) + len( pbs_options ) ) + for i, attr in enumerate( attrs + pbs_options ): + job_attrs[i].name = attr['name'] + job_attrs[i].value = attr['value'] + if 'resource' in attr: + job_attrs[i].resource = attr['resource'] + exec_dir = os.path.abspath( job_wrapper.working_directory ) # write the job script if self.app.config.pbs_stage_path != '': diff -r 51a1369fdf96 -r b4ba343d3540 lib/galaxy/jobs/runners/sge.py --- a/lib/galaxy/jobs/runners/sge.py Fri Feb 05 09:23:19 2010 -0500 +++ b/lib/galaxy/jobs/runners/sge.py Fri Feb 05 10:04:04 2010 -0500 @@ -94,12 +94,24 @@ def determine_sge_queue( self, url ): """Determine what SGE queue we are submitting to""" - url_split = url.split("/") - queue = url_split[3] - if queue == "": - # None == server's default queue - queue = None - return queue + try: + return url.split('/')[3] or None + except: + return None + + def determine_sge_project( self, url ): + """Determine what SGE project we are submitting to""" + try: + return url.split('/')[4] or None + except: + return None + + def determine_sge_tool_parameters( self, url ): + """Determine what are the tool's specific paramters""" + try: + return url.split('/')[5] or None + except: + return None def queue_job( self, job_wrapper ): """Create SGE script for a job and submit it to the SGE queue""" @@ -132,6 +144,8 @@ # TODO: support multiple cells log.warning( "(%s) Using multiple SGE cells is not supported. This job will be submitted to the default cell." % job_wrapper.job_id ) sge_queue_name = self.determine_sge_queue( runner_url ) + sge_project_name = self.determine_sge_project( runner_url ) + sge_extra_params = self.determine_sge_tool_parameters ( runner_url ) # define job attributes ofile = "%s/database/pbs/%s.o" % (os.getcwd(), job_wrapper.job_id) @@ -140,8 +154,15 @@ jt.remoteCommand = "%s/database/pbs/galaxy_%s.sh" % (os.getcwd(), job_wrapper.job_id) jt.outputPath = ":%s" % ofile jt.errorPath = ":%s" % efile + nativeSpec = [] if sge_queue_name is not None: - jt.setNativeSpecification( "-q %s" % sge_queue_name ) + nativeSpec.append( "-q '%s'" % sge_queue_name ) + if sge_project_name is not None: + nativeSpec.append( "-P '%s'" % sge_project_name) + if sge_extra_params is not None: + nativeSpec.append( sge_extra_params ) + if len(nativeSpec)>0: + jt.nativeSpecification = ' '.join(nativeSpec) script = sge_template % (job_wrapper.galaxy_lib_dir, os.path.abspath( job_wrapper.working_directory ), command_line) fh = file( jt.remoteCommand, "w" )
1
0
0
0
[hg] galaxy 3334: Update GeneTrack to provide tool_id as part of...
by Greg Von Kuster
09 Feb '10
09 Feb '10
details:
http://www.bx.psu.edu/hg/galaxy/rev/51a1369fdf96
changeset: 3334:51a1369fdf96 user: Dan Blankenberg <dan(a)bx.psu.edu> date: Fri Feb 05 09:23:19 2010 -0500 description: Update GeneTrack to provide tool_id as part of GALAXY_URL and rename provided 'id' to destination name of 'input'. diffstat: lib/galaxy/datatypes/tracks.py | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diffs (33 lines): diff -r 7af418485514 -r 51a1369fdf96 lib/galaxy/datatypes/tracks.py --- a/lib/galaxy/datatypes/tracks.py Thu Feb 04 17:00:46 2010 -0500 +++ b/lib/galaxy/datatypes/tracks.py Fri Feb 05 09:23:19 2010 -0500 @@ -6,7 +6,7 @@ from galaxy import util from galaxy.web import url_for from galaxy.util.hash_util import hmac_new -import urllib +from urllib import quote_plus log = logging.getLogger(__name__) @@ -23,15 +23,14 @@ if hda.has_data: # Get the disk file name and data id file_name = hda.dataset.get_file_name() - data_id = urllib.quote_plus( str( hda.id ) ) #can we name this 'input' in the passed params instead of 'id' to prevent GT from having to map 'id' to 'input'? - galaxy_url = urllib.quote_plus( "%s%s" % ( base_url, url_for( controller = 'tool_runner' ) ) ) - tool_id = urllib.quote_plus( 'predict2genetrack' ) + data_id = quote_plus( str( hda.id ) ) + galaxy_url = quote_plus( "%s%s" % ( base_url, url_for( controller = 'tool_runner', tool_id='predict2genetrack' ) ) ) # Make it secure - hashkey = urllib.quote_plus( hmac_new( app.config.tool_secret, file_name ) ) - encoded = urllib.quote_plus( binascii.hexlify( file_name ) ) + hashkey = quote_plus( hmac_new( app.config.tool_secret, file_name ) ) + encoded = quote_plus( binascii.hexlify( file_name ) ) for name, url in util.get_genetrack_sites(): if name.lower() in app.config.genetrack_display_sites: # send both parameters filename and hashkey - link = "%s?filename=%s&hashkey=%s&id=%s&GALAXY_URL=%s&tool_id=%s" % ( url, encoded, hashkey, data_id, galaxy_url, tool_id ) + link = "%s?filename=%s&hashkey=%s&input=%s&GALAXY_URL=%s" % ( url, encoded, hashkey, data_id, galaxy_url ) ret_val.append( ( name, link ) ) return ret_val
1
0
0
0
[hg] galaxy 3333: LIMS data acquisition: now the data transfer u...
by Greg Von Kuster
09 Feb '10
09 Feb '10
details:
http://www.bx.psu.edu/hg/galaxy/rev/7af418485514
changeset: 3333:7af418485514 user: rc date: Thu Feb 04 17:00:46 2010 -0500 description: LIMS data acquisition: now the data transfer user logs out after the transfer is complete diffstat: lib/galaxy/web/controllers/requests_admin.py | 13 +++++++++-- scripts/galaxy_messaging/server/data_transfer.py | 26 +++++++++++++++++------ templates/admin/requests/show_request.mako | 2 +- 3 files changed, 30 insertions(+), 11 deletions(-) diffs (104 lines): diff -r ef0622415211 -r 7af418485514 lib/galaxy/web/controllers/requests_admin.py --- a/lib/galaxy/web/controllers/requests_admin.py Thu Feb 04 16:23:32 2010 -0500 +++ b/lib/galaxy/web/controllers/requests_admin.py Thu Feb 04 17:00:46 2010 -0500 @@ -1449,8 +1449,14 @@ dataset_files=sample.dataset_files) elif params.get( 'start_transfer_button', False ): for f in files_list: - sample.dataset_files.append([os.path.join(folder_path, f), - sample.transfer_status.NOT_STARTED]) + if f[-1] == os.sep: + # the selected item is a folder so transfer all the + # folder contents + sample.dataset_files.append([os.path.join(folder_path, f), + sample.transfer_status.NOT_STARTED]) + else: + sample.dataset_files.append([os.path.join(folder_path, f), + sample.transfer_status.NOT_STARTED]) trans.sa_session.add( sample ) trans.sa_session.flush() return self.__start_datatx(trans, sample) @@ -1547,7 +1553,8 @@ trans.sa_session.flush() return trans.response.send_redirect( web.url_for( controller='requests_admin', action='show_datatx_page', - sample_id=trans.security.encode_id(sample.id))) + sample_id=trans.security.encode_id(sample.id), + folder_path=os.path.dirname(dfile))) diff -r ef0622415211 -r 7af418485514 scripts/galaxy_messaging/server/data_transfer.py --- a/scripts/galaxy_messaging/server/data_transfer.py Thu Feb 04 16:23:32 2010 -0500 +++ b/scripts/galaxy_messaging/server/data_transfer.py Thu Feb 04 17:00:46 2010 -0500 @@ -44,6 +44,13 @@ logging.basicConfig(filename=logfile, level=logging.DEBUG, format="%(asctime)s [%(levelname)s] %(message)s") +class DataTransferException(Exception): + def __init__(self, value): + self.msg = value + def __str__(self): + return repr(self.msg) + + class DataTransfer(object): def __init__(self, host, username, password, remote_file, sample_id, @@ -102,14 +109,14 @@ self.error_and_exit() - def error_and_exit(self): + def error_and_exit(self, msg=''): ''' This method is called any exception is raised. This prints the traceback and terminates this script ''' logging.error(traceback.format_exc()) - logging.error('FATAL ERROR') - self.update_status('Error') + logging.error('FATAL ERROR.'+msg) + self.update_status('Error.'+msg) sys.exit(1) def transfer_file(self): @@ -159,7 +166,7 @@ url = "%s/user/create?email=%s&username=%s&password=%s&confirm=%s&create_user_button=Submit" % ( base_url, email, email, password, password ) f = opener.open(url) if f.read().find("Now logged in as "+email) == -1: - raise Exception + raise DataTransferException("The "+email+" user could not login to Galaxy") # after login, add dataset to the library params = urllib.urlencode(dict( cntrller='library_admin', tool_id='upload1', @@ -177,9 +184,14 @@ logging.debug(url) logging.debug(params) f = opener.open(url, params) - #print f.read() - except: - self.error_and_exit() + if f.read().find("Data Library") == -1: + raise DataTransferException("Dataset could not be uploaded to the data library") + # finally logout + f = opener.open(base_url+'/user/logout') + if f.read().find("You are no longer logged in.") == -1: + raise DataTransferException("The "+email+" user could not logout of Galaxy") + except DataTransferException, (e): + self.error_and_exit(e.msg) def update_status(self, status): ''' diff -r ef0622415211 -r 7af418485514 templates/admin/requests/show_request.mako --- a/templates/admin/requests/show_request.mako Thu Feb 04 16:23:32 2010 -0500 +++ b/templates/admin/requests/show_request.mako Thu Feb 04 17:00:46 2010 -0500 @@ -43,7 +43,7 @@ </script> <style type="text/css"> .msg_head { - padding: 15px 0px; + padding: 10px 0px; cursor: pointer; }
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
18
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Results per page:
10
25
50
100
200