mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
I eliminated the conditional on calling Tabular.set_meta() from the ColumnList parameter.
This should correct metadata attributes that may have been previoulsy improperly set. Since it is called only when tools that use the ColumnList parameter are loaded, it should not result in concurrent update issues in the database. Keep an eye on the daily job errors, if you see several per day that have an error state with null stderr and traceback values, this may be the culprit. I doubt this will happen though. I also added the customtrack and gbrowsetrack types to Tabular.set_meta() since htey are interval types.
This commit is contained in:
@@ -95,8 +95,9 @@ class Tabular( data.Text ):
|
||||
if elems[0].lower().startswith(str):
|
||||
proceed = True
|
||||
break
|
||||
elif format =='tabular' and i > 1:
|
||||
elif ( format =='tabular' or format == "customtrack" or format == 'gbrowsetrack' ) and i > 1:
|
||||
proceed = True
|
||||
|
||||
if proceed:
|
||||
"""Set the columns metadata attribute"""
|
||||
if elems_len != dataset.metadata.columns:
|
||||
|
||||
@@ -218,22 +218,6 @@ class JobWrapper( object ):
|
||||
job = model.Job.get( self.job_id )
|
||||
incoming = dict( [ ( p.name, p.value ) for p in job.parameters ] )
|
||||
incoming = self.tool.params_from_strings( incoming, self.app )
|
||||
"""
|
||||
Call set_meta on each tabular input dataset if metadata is missing. This
|
||||
is a temporary work-around to ensure columns metadata attribute is set.
|
||||
This code will be eliminated soon...
|
||||
"""
|
||||
"""
|
||||
gvk: commented out on 9/6/2007 - This code seems to be causing concurrent update problems in the database.
|
||||
At the current time, tabular datasets are missing the 'column_types' metadata attribute, which is currently
|
||||
used only for the ColumnListParameter tool parameter. To be safe, I'm calling Tabular().set_meta() there
|
||||
anyway, so we don't need this. Also, when we run Dan's script again, it will eliminate the need for this.
|
||||
|
||||
for dataset_assoc in job.input_datasets:
|
||||
dataset = dataset_assoc.dataset
|
||||
if issubclass(type(dataset.datatype), type(self.app.datatypes_registry.get_datatype_by_extension('tabular'))) and dataset.missing_meta():
|
||||
Tabular().set_meta(dataset)
|
||||
"""
|
||||
# Resore input / output data lists
|
||||
inp_data = dict( [ ( da.name, da.dataset ) for da in job.input_datasets ] )
|
||||
out_data = dict( [ ( da.name, da.dataset ) for da in job.output_datasets ] )
|
||||
|
||||
@@ -584,9 +584,8 @@ class ColumnListParameter( SelectToolParameter ):
|
||||
|
||||
assert dataset is not None, "Error retrieving required dataset for ColumnListParameter"
|
||||
|
||||
if dataset.missing_meta():
|
||||
"""Just to be safe..."""
|
||||
Tabular().set_meta(dataset)
|
||||
"""Just to be safe..."""
|
||||
Tabular().set_meta(dataset)
|
||||
|
||||
if self.numerical:
|
||||
for i, col in enumerate( dataset.metadata.column_types ):
|
||||
|
||||
Reference in New Issue
Block a user