diff --git a/lib/galaxy/tools/__init__.py b/lib/galaxy/tools/__init__.py
index 02fae427386..4b3d65fabac 100644
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -1240,8 +1240,6 @@ class Tool:
def exec_before_job( self, app, inp_data, out_data, param_dict={} ):
if self.tool_type == 'data_source':
- # List for converting UCSC to Galaxy exts, if not in following dictionary, use provided datatype
- data_type_to_ext = { 'wigdata':'wig', 'tab':'interval', 'hyperlinks':'html', 'sequence':'fasta' }
dbkey = param_dict.get( 'dbkey' )
organism = param_dict.get( 'organism' )
table = param_dict.get( 'table' )
@@ -1263,12 +1261,9 @@ class Tool:
data.name = '%s on %s' % ( data.name, gb_landmark_region )
data.info = info
data.dbkey = dbkey
- try:
- data_type = data_type_to_ext[ data_type ]
- except:
- pass
- if data_type not in app.datatypes_registry.datatypes_by_extension:
- data_type = 'interval'
+ if data_type not in app.datatypes_registry.datatypes_by_extension:
+ # Setting data_type to tabular will force the data to be sniffed in exec_after_process()
+ data_type = 'tabular'
data = app.datatypes_registry.change_datatype( data, data_type )
# Store external data source's request parameters temporarily in output file.
# In case the config setting for "outputs_to_working_directory" is True, we must write to
@@ -1284,8 +1279,6 @@ class Tool:
return out_data
def exec_after_process( self, app, inp_data, out_data, param_dict ):
- # TODO: for data_source tools at least, this code can probably be handled more optimally by adding a new
- # tag set in the tool config.
if self.tool_type == 'data_source':
name, data = out_data.items()[0]
data.set_size()
@@ -1294,9 +1287,10 @@ class Tool:
data.info = param_dict.get( 'info', data.name )
data.dbkey = param_dict.get( 'dbkey', data.dbkey )
data.extension = param_dict.get( 'data_type', data.extension )
- if data.extension == 'txt':
+ if data.extension in [ 'txt', 'tabular' ]:
data_type = sniff.guess_ext( data.file_name, sniff_order=app.datatypes_registry.sniff_order )
- data = app.datatypes_registry.change_datatype( data, data_type )
+ if data.extension != data_type:
+ data = app.datatypes_registry.change_datatype( data, data_type )
elif not isinstance( data.datatype, datatypes.interval.Bed ) and isinstance( data.datatype, datatypes.interval.Interval ):
data.set_meta()
if data.missing_meta():
diff --git a/tools/data_source/biomart.xml b/tools/data_source/biomart.xml
index 8892f5b4bad..68e0e42f8b9 100644
--- a/tools/data_source/biomart.xml
+++ b/tools/data_source/biomart.xml
@@ -21,17 +21,21 @@
+
+
+
+
+
-
-
+
diff --git a/tools/data_source/biomart_test.xml b/tools/data_source/biomart_test.xml
index 9c24e745c95..cef9de51879 100644
--- a/tools/data_source/biomart_test.xml
+++ b/tools/data_source/biomart_test.xml
@@ -21,17 +21,21 @@
+
+
+
+
+
-
-
+
diff --git a/tools/data_source/ucsc_tablebrowser.xml b/tools/data_source/ucsc_tablebrowser.xml
index a8fa04c0523..fb613e00ea0 100644
--- a/tools/data_source/ucsc_tablebrowser.xml
+++ b/tools/data_source/ucsc_tablebrowser.xml
@@ -21,16 +21,20 @@
-
+
+
+
+
+
-
+
diff --git a/tools/data_source/ucsc_tablebrowser_archaea.xml b/tools/data_source/ucsc_tablebrowser_archaea.xml
index e0b0539ef6b..0b6342a957d 100644
--- a/tools/data_source/ucsc_tablebrowser_archaea.xml
+++ b/tools/data_source/ucsc_tablebrowser_archaea.xml
@@ -21,16 +21,20 @@
-
+
+
+
+
+
-
+
diff --git a/tools/data_source/ucsc_tablebrowser_test.xml b/tools/data_source/ucsc_tablebrowser_test.xml
index 54b5177a8c5..d09862dd715 100644
--- a/tools/data_source/ucsc_tablebrowser_test.xml
+++ b/tools/data_source/ucsc_tablebrowser_test.xml
@@ -21,16 +21,20 @@
-
+
+
+
+
+
-
+