Better approach to altering initial content of output dataset if necessary. The upload tool will now call the data type's groom_output_dataset() method ( a better name than before_setting_metadata since it is not related to metadata ). This will now also run on the cluster.

This commit is contained in:
Greg Von Kuster
2009-12-08 11:46:13 -05:00
parent 7051ce7dd5
commit cf83cecb0b
20 changed files with 38 additions and 224 deletions
-1
View File
@@ -46,7 +46,6 @@ def exec_after_process(app, inp_data, out_data, param_dict, tool=None, stdout=No
fp.close()
#Set meta data, format file to be valid interval type
if isinstance(data.datatype, datatypes.interval.Interval):
data.datatype.before_setting_metadata( data )
data.set_meta(first_line_is_header=True)
#check for missing meta data, if all there, comment first line and process file
if not data.missing_meta():
+4
View File
@@ -10,6 +10,7 @@ from galaxy import eggs
import galaxy.model
from galaxy.datatypes import sniff
from galaxy.datatypes.binary import *
from galaxy.datatypes.registry import Registry
from galaxy import util
from galaxy.util.json import *
@@ -264,6 +265,9 @@ def add_file( dataset, json_file, output_path ):
name = dataset.name,
line_count = line_count )
json_file.write( to_json_string( info ) + "\n" )
# Groom the dataset content if necessary
datatype = Registry().get_datatype_by_extension( ext )
datatype.groom_dataset_content( output_path )
def add_composite_file( dataset, json_file, output_path, files_path ):
if dataset.composite_files: