1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/feb05b2ef24c/
changeset: feb05b2ef24c
user: dan
date: 2013-02-07 19:16:41
summary: Add get() method to ToolDataTableManager.
affected #: 1 file
diff -r bc309f6d4ce5e18c9d2c8eac6a50eeac06664554 -r feb05b2ef24c665e9245e554af40104a812f03a9 lib/galaxy/tools/data/__init__.py
--- a/lib/galaxy/tools/data/__init__.py
+++ b/lib/galaxy/tools/data/__init__.py
@@ -28,6 +28,11 @@
return self.data_tables.__getitem__( key )
def __contains__( self, key ):
return self.data_tables.__contains__( key )
+ def get( self, name, default=None ):
+ try:
+ return self[ name ]
+ except KeyError:
+ return default
def load_from_config_file( self, config_filename, tool_data_path, from_shed_config=False ):
"""
This method is called under 3 conditions:
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/bc309f6d4ce5/
changeset: bc309f6d4ce5
user: jgoecks
date: 2013-02-07 18:57:30
summary: Add function to query tool data tables by attribute-value pairs and expose this functionality to tool wrappers. This is needed for tool wrappers that use data tables but do not use dynamic options.
affected #: 2 files
diff -r 57bd06b6e9fa4cb1b6591216b6f4d3010b21f060 -r bc309f6d4ce5e18c9d2c8eac6a50eeac06664554 lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -2267,10 +2267,14 @@
`to_param_dict_string` method of the associated input.
"""
param_dict = dict()
+
# All parameters go into the param_dict
param_dict.update( incoming )
- # Wrap parameters as neccesary
+
def wrap_values( inputs, input_values ):
+ """
+ Wraps parameters as neccesary.
+ """
for input in inputs.itervalues():
if isinstance( input, Repeat ):
for d in input_values[ input.name ]:
@@ -2333,11 +2337,13 @@
else:
input_values[ input.name ] = InputValueWrapper(
input, input_values[ input.name ], param_dict )
+
# HACK: only wrap if check_values is not false, this deals with external
# tools where the inputs don't even get passed through. These
# tools (e.g. UCSC) should really be handled in a special way.
if self.check_values:
wrap_values( self.inputs, param_dict )
+
## FIXME: when self.check_values==True, input datasets are being wrapped
## twice (above and below, creating 2 separate
## DatasetFilenameWrapper objects - first is overwritten by
@@ -2390,6 +2396,20 @@
# failed to pass; for tool writing convienence, provide a
# NoneDataset
param_dict[ out_name ] = NoneDataset( datatypes_registry = self.app.datatypes_registry, ext = output.format )
+
+ # -- Add useful attributes/functions for use in creating command line.
+
+ # Function for querying a data table.
+ def get_data_table_entry(table_name, query_attr, query_val, return_attr):
+ """
+ Queries and returns an entry in a data table.
+ """
+
+ if table_name in self.app.tool_data_tables:
+ return self.app.tool_data_tables[ table_name ].get_entry( query_attr, query_val, return_attr )
+
+ param_dict['__get_data_table_entry__'] = get_data_table_entry
+
# We add access to app here, this allows access to app.config, etc
param_dict['__app__'] = RawObjectWrapper( self.app )
# More convienent access to app.config.new_file_path; we don't need to
diff -r 57bd06b6e9fa4cb1b6591216b6f4d3010b21f060 -r bc309f6d4ce5e18c9d2c8eac6a50eeac06664554 lib/galaxy/tools/data/__init__.py
--- a/lib/galaxy/tools/data/__init__.py
+++ b/lib/galaxy/tools/data/__init__.py
@@ -240,7 +240,26 @@
fields = line.split( self.separator )
if self.largest_index < len( fields ):
rval.append( fields )
- return rval
+ return rval
+
+ def get_entry( self, query_attr, query_val, return_attr ):
+ """
+ Returns table entry associated with a col/val pair.
+ """
+ query_col = self.columns.get( query_attr, None )
+ if not query_col:
+ return None
+ return_col = self.columns.get( return_attr, None )
+ if not return_col:
+ return None
+
+ # Look for table entry.
+ for fields in self.data:
+ if fields[ query_col ] == query_val:
+ rval = fields[ return_col ]
+ break
+
+ return rval
# Registry of tool data types by type_key
tool_data_table_types = dict( [ ( cls.type_key, cls ) for cls in [ TabularToolDataTable ] ] )
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/b8ead26aaf2b/
changeset: b8ead26aaf2b
user: joachimjacob
date: 2013-01-23 11:08:03
summary: Adjusted subtract_query.py to accomodate for empty fields at end of lines.
affected #: 1 file
diff -r 3c752f2d4d958f34f085f2cc707c503693b4680d -r b8ead26aaf2b3e82334a2b071ad5221b54316e8d tools/new_operations/subtract_query.py
--- a/tools/new_operations/subtract_query.py
+++ b/tools/new_operations/subtract_query.py
@@ -29,9 +29,12 @@
try:
line = line.split('\t')
line = '\t'.join([line[j] for j in range(begin_col-1, end_col)])
+ # removing empty fields, we do not compare empty fields at the end of a line.
+ line = line.rstrip()
lines.add( line )
except: pass
else:
+ line = line.rstrip()
lines.add( line )
if i: return (i+1, lines)
else: return (i, lines)
https://bitbucket.org/galaxy/galaxy-central/commits/57bd06b6e9fa/
changeset: 57bd06b6e9fa
user: jgoecks
date: 2013-02-07 15:38:56
summary: Merged in joachimjacob/galaxy-central-subtract_query_change (pull request #111)
Adjusted subtract_query.py to accomodate for empty fields at end of lines.
affected #: 1 file
diff -r 14733d29e6dda03a49e5fe67e222480235f1901c -r 57bd06b6e9fa4cb1b6591216b6f4d3010b21f060 tools/new_operations/subtract_query.py
--- a/tools/new_operations/subtract_query.py
+++ b/tools/new_operations/subtract_query.py
@@ -29,9 +29,12 @@
try:
line = line.split('\t')
line = '\t'.join([line[j] for j in range(begin_col-1, end_col)])
+ # removing empty fields, we do not compare empty fields at the end of a line.
+ line = line.rstrip()
lines.add( line )
except: pass
else:
+ line = line.rstrip()
lines.add( line )
if i: return (i+1, lines)
else: return (i, lines)
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/8ada40b18414/
changeset: 8ada40b18414
user: dan
date: 2013-02-06 20:59:46
summary: Add a confirm dialog when deprecating repositories in the Tool Shed.
affected #: 2 files
diff -r b3a7c8da804caa2330b393ddb2a1fcfefad4e41e -r 8ada40b184144447c5949bbbac3e2ec65cfaac58 lib/galaxy/webapps/community/controllers/repository.py
--- a/lib/galaxy/webapps/community/controllers/repository.py
+++ b/lib/galaxy/webapps/community/controllers/repository.py
@@ -248,7 +248,8 @@
operations = [ grids.GridOperation( "Mark as deprecated",
allow_multiple=False,
condition=( lambda item: not item.deleted and not item.deprecated ),
- async_compatible=False ),
+ async_compatible=False,
+ confirm="Are you sure that you want to deprecate this repository?" ),
grids.GridOperation( "Mark as not deprecated",
allow_multiple=False,
condition=( lambda item: not item.deleted and item.deprecated ),
diff -r b3a7c8da804caa2330b393ddb2a1fcfefad4e41e -r 8ada40b184144447c5949bbbac3e2ec65cfaac58 templates/webapps/community/repository/manage_repository.mako
--- a/templates/webapps/community/repository/manage_repository.mako
+++ b/templates/webapps/community/repository/manage_repository.mako
@@ -97,7 +97,7 @@
<a class="action-button" href="${h.url_for( controller='repository', action='reset_all_metadata', id=trans.security.encode_id( repository.id ) )}">Reset all repository metadata</a>
%endif
%if can_deprecate:
- <a class="action-button" href="${h.url_for( controller='repository', action='deprecate', id=trans.security.encode_id( repository.id ), mark_deprecated=True )}">Mark repository as deprecated</a>
+ <a class="action-button" href="${h.url_for( controller='repository', action='deprecate', id=trans.security.encode_id( repository.id ), mark_deprecated=True )}" confirm="Are you sure that you want to deprecate this repository?">Mark repository as deprecated</a>
%endif
%if can_undeprecate:
<a class="action-button" href="${h.url_for( controller='repository', action='deprecate', id=trans.security.encode_id( repository.id ), mark_deprecated=False )}">Mark repository as not deprecated</a>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/b3a7c8da804c/
changeset: b3a7c8da804c
user: carlfeberhard
date: 2013-02-06 18:05:56
summary: history panel: fix to hda update logging typo
affected #: 1 file
diff -r ae446180fd11e74cfdcb25bf26d23b05889ab798 -r b3a7c8da804caa2330b393ddb2a1fcfefad4e41e static/scripts/mvc/history/history-model.js
--- a/static/scripts/mvc/history/history-model.js
+++ b/static/scripts/mvc/history/history-model.js
@@ -230,7 +230,7 @@
} else {
var msg = _l( 'ERROR updating hdas from api history contents' ) + ': ';
- history.log( msg, hdaIds, xhr, status, error, errorJSON );
+ history.log( msg, hdaIds, xhr, status, error, errorJson );
alert( msg + hdaIds.join(',') );
}
},
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/ae446180fd11/
changeset: ae446180fd11
user: dannon
date: 2013-02-06 16:57:11
summary: Fix MarkupSafe import issue introduced in 7461:5f2db4a18d3d.
affected #: 1 file
diff -r a9913124b727dff41801c83fd74f06c6721a4f57 -r ae446180fd11e74cfdcb25bf26d23b05889ab798 lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -4,6 +4,7 @@
import pkg_resources
pkg_resources.require( "simplejson" )
+pkg_resources.require( "MarkupSafe" ) #MarkupSafe must load before mako
pkg_resources.require( "Mako" )
import logging, os, string, sys, tempfile, glob, shutil, types, urllib, subprocess, random, math, traceback, re
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/a9913124b727/
changeset: a9913124b727
user: carlfeberhard
date: 2013-02-06 16:51:18
summary: Remove 'error' language from debug statement in GalaxyWebTransaction, get_history
affected #: 1 file
diff -r 3a0e3ef5414a06bc7ada75c3acb28affab7c916c -r a9913124b727dff41801c83fd74f06c6721a4f57 lib/galaxy/web/framework/__init__.py
--- a/lib/galaxy/web/framework/__init__.py
+++ b/lib/galaxy/web/framework/__init__.py
@@ -729,7 +729,7 @@
history = self.new_history()
else:
# Perhaps a bot is running a tool without having logged in to get a history
- log.debug( "Error: this request returned None from get_history(): %s" % self.request.browser_url )
+ log.debug( "This request returned None from get_history(): %s" % self.request.browser_url )
return None
return history
def set_history( self, history ):
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.