diff --git a/lib/galaxy/jobs/__init__.py b/lib/galaxy/jobs/__init__.py
index d6879e36e69..f673c7e519e 100644
--- a/lib/galaxy/jobs/__init__.py
+++ b/lib/galaxy/jobs/__init__.py
@@ -256,11 +256,10 @@ class JobWrapper( object ):
incoming = self.tool.params_from_strings( incoming, self.app )
# Do any validation that could not be done at job creation
self.tool.handle_unvalidated_param_values( incoming, self.app )
- # Resore input / output data lists
+ # Restore 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 ] )
- # add some useful session info to param_dict via incoming - ross august 2007
- # these can be passed on the commandline if wanted as $userId $userEmail
+ # These can be passed on the command line if wanted as $userId $userEmail
if job.history.user: # check for anonymous user!
userId = '%d' % job.history.user.id
userEmail = str(job.history.user.email)
@@ -271,10 +270,7 @@ class JobWrapper( object ):
incoming['userEmail'] = userEmail
# Build params, done before hook so hook can use
param_dict = self.tool.build_param_dict( incoming, inp_data, out_data )
- # Run the before queue ("exec_before_job") hook "trans" is no
- # longer available to this hook, and has been replaced with
- # app - 5/31/2007, by INS
- # job added so we can get at the user if needed 14/august/2007 ross
+ # Run the before queue ("exec_before_job") hook
self.tool.call_hook( 'exec_before_job', self.queue.app, inp_data=inp_data,
out_data=out_data, tool=self.tool, param_dict=incoming)
mapping.context.current.flush()
@@ -287,8 +283,8 @@ class JobWrapper( object ):
# FIXME: for now, tools get Galaxy's lib dir in their path
if self.command_line and self.command_line.startswith( 'python' ):
self.galaxy_lib_dir = os.path.abspath( "lib" ) # cwd = galaxy root
- # command_line won't actually be set in the db until finish unless you do it here
- # We need it in the db to be able to restart jobs -ndc
+ # We need command_line persisted to the db in order for Galaxy to re-queue the job
+ # if the server was stopped and restarted before the job finished
job.command_line = self.command_line
job.flush()
# Return list of all extra files
diff --git a/lib/galaxy/tools/__init__.py b/lib/galaxy/tools/__init__.py
index 2e3d3dda6b0..9a7f9a26781 100644
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -282,9 +282,6 @@ class Tool:
self.parse_inputs( root )
# Parse tool help
self.parse_help( root )
- # FIXME: This is not used anywhere, what does it do?
- # url redirection to ougoings
- self.redir_url = root.find("url")
# Description of outputs produced by an invocation of the tool
self.outputs = {}
out_elem = root.find("outputs")
@@ -1040,7 +1037,7 @@ class Tool:
return
try:
# Substituting parameters into the command
- command_line = fill_template( self.command, context=param_dict )
+ command_line = fill_template( self.command, context=param_dict )
# Remove newlines from command line
command_line = command_line.replace( "\n", " " ).replace( "\r", " " )
except Exception, e:
diff --git a/lib/galaxy/tools/actions/__init__.py b/lib/galaxy/tools/actions/__init__.py
index 595997b9719..f2bb0cd8185 100644
--- a/lib/galaxy/tools/actions/__init__.py
+++ b/lib/galaxy/tools/actions/__init__.py
@@ -64,21 +64,13 @@ class DefaultToolAction( object ):
return input_datasets
def execute(self, tool, trans, incoming={}, set_output_hid = True ):
- out_data = {}
-
+ out_data = {}
# Collect any input datasets from the incoming parameters
inp_data = self.collect_input_datasets( tool, incoming, trans )
-
- # Deal with input metadata, 'dbkey', names, and types
-
- # FIXME: does this need to modify 'incoming' or should this be
- # moved into 'build_param_dict'? Is this just about getting the
- # metadata into the command line?
- # NEED TO FIX THIS SOON.
+ # Deal with input dataset names, 'dbkey' and types
input_names = []
input_ext = 'data'
input_dbkey = incoming.get( "dbkey", "?" )
- input_meta = Bunch()
for name, data in inp_data.items():
if data:
input_names.append( 'data %s' % data.hid )
@@ -87,15 +79,6 @@ class DefaultToolAction( object ):
data = NoneDataset( datatypes_registry = trans.app.datatypes_registry )
if data.dbkey not in [None, '?']:
input_dbkey = data.dbkey
- for meta_key, meta_value in data.metadata.items():
- if meta_value is not None:
- meta_value = str(data.datatype.metadata_spec[meta_key].wrap(meta_value, data))
- meta_key = '%s_%s' % (name, meta_key)
- incoming[meta_key] = meta_value
- else:
- incoming_key = '%s_%s' % (name, meta_key)
- incoming[incoming_key] = data.datatype.metadata_spec[meta_key].no_value
-
# Build name for output datasets based on tool name and input names
if len( input_names ) == 1:
on_text = input_names[0]
@@ -186,16 +169,13 @@ class DefaultToolAction( object ):
# Create the job object
job = trans.app.model.Job()
job.session_id = trans.get_galaxy_session( create=True ).id
- if trans.get_history() is not None:
- job.history_id = trans.get_history().id
+ job.history_id = trans.history.id
job.tool_id = tool.id
try:
- # For backward compatability, some tools may not have versions yet.
+ # For backward compatibility, some tools may not have versions yet.
job.tool_version = tool.version
except:
job.tool_version = "1.0.0"
- ## job.command_line = command_line
- ## job.param_filename = param_filename
# FIXME: Don't need all of incoming here, just the defined parameters
# from the tool. We need to deal with tools that pass all post
# parameters to the command as a special case.
@@ -212,6 +192,5 @@ class DefaultToolAction( object ):
# Queue the job for execution
trans.app.job_queue.put( job.id, tool )
- # IMPORTANT: keep the following event as is - we parse it for our session activity reports
trans.log_event( "Added job to the job queue, id: %s" % str(job.id), tool_id=job.tool_id )
return out_data
diff --git a/test/base/twilltestcase.py b/test/base/twilltestcase.py
index 51cc2c57e49..29b0ff303a7 100644
--- a/test/base/twilltestcase.py
+++ b/test/base/twilltestcase.py
@@ -216,7 +216,7 @@ class TwillTestCase( unittest.TestCase ):
def _assert_dataset_state( self, elem, state ):
if elem.get( 'state' ) != state:
- errmsg = "Expecting dataset state '%s' but is '%s'. Dataset blurb: %s\n\n" % ( state, elem.get('state'), elem.text.strip() )
+ errmsg = "Expecting dataset state '%s', but state is '%s'. Dataset blurb: %s\n\n" % ( state, elem.get('state'), elem.text.strip() )
errmsg += "---------------------- >> begin tool stderr << -----------------------\n"
errmsg += self.get_job_stderr( elem.get( 'id' ) ) + "\n"
errmsg += "----------------------- >> end tool stderr << ------------------------\n"
diff --git a/tool_conf.xml.main b/tool_conf.xml.main
index 33021b0698e..ad26f1f0d65 100644
--- a/tool_conf.xml.main
+++ b/tool_conf.xml.main
@@ -85,9 +85,9 @@
+
diff --git a/tools/annotation_profiler/annotation_profiler.xml b/tools/annotation_profiler/annotation_profiler.xml
index e297902ac63..a848feb8193 100644
--- a/tools/annotation_profiler/annotation_profiler.xml
+++ b/tools/annotation_profiler/annotation_profiler.xml
@@ -1,6 +1,6 @@
for a set of genomic intervals
- annotation_profiler_for_interval.py -i $input1 -c $input1_chromCol -s $input1_startCol -e $input1_endCol -o $out_file1 $keep_empty -p /depot/data2/galaxy/annotation_profiler/$dbkey $summary -l ${GALAXY_DATA_INDEX_DIR}/shared/ucsc/chrom/${dbkey}.len -b 3 -t $table_names
+ annotation_profiler_for_interval.py -i $input1 -c ${input1.metadata.chromCol} -s ${input1.metadata.startCol} -e ${input1.metadata.endCol} -o $out_file1 $keep_empty -p /depot/data2/galaxy/annotation_profiler/$dbkey $summary -l ${GALAXY_DATA_INDEX_DIR}/shared/ucsc/chrom/${dbkey}.len -b 3 -t $table_names
diff --git a/tools/encode/gencode_partition.xml b/tools/encode/gencode_partition.xml
index a85282f49a3..415ae8a7b6c 100755
--- a/tools/encode/gencode_partition.xml
+++ b/tools/encode/gencode_partition.xml
@@ -1,6 +1,6 @@
an interval file
- split_by_partitions.py /home/universe/encode_feature_partitions/partition_list.txt $input1 $out_file1 $input1_chromCol $input1_startCol $input1_endCol $input1_strandCol
+ split_by_partitions.py /home/universe/encode_feature_partitions/partition_list.txt $input1 $out_file1 ${input1.metadata.chromCol} ${input1.metadata.startCol} ${input1.metadata.endCol} ${input1.metadata.strandCol}
diff --git a/tools/encode/random_intervals.xml b/tools/encode/random_intervals.xml
index f3a383b6bc8..a4846e0ff97 100644
--- a/tools/encode/random_intervals.xml
+++ b/tools/encode/random_intervals.xml
@@ -1,6 +1,6 @@
create a random set of intervals
- random_intervals_no_bits.py $regions $input2 $input1 $out_file1 $input2_chromCol $input2_startCol $input2_endCol $input1_chromCol $input1_startCol $input1_endCol $input1_strandCol $use_mask $strand_overlaps ${GALAXY_DATA_INDEX_DIR}
+ random_intervals_no_bits.py $regions $input2 $input1 $out_file1 ${input2.metadata.chromCol} ${input2.metadata.startCol} ${input2.metadata.endCol} ${input1.metadata.chromCol} ${input1.metadata.startCol} ${input1.metadata.endCol} ${input1.metadata.strandCol} $use_mask $strand_overlaps ${GALAXY_DATA_INDEX_DIR}
@@ -21,6 +21,7 @@
+
@@ -31,7 +32,7 @@
.. class:: warningmark
-This tool currently only works with data from genome builds hg16 or hg17.
+This tool currently only works with ENCODE data from genome builds hg16 or hg17.
-----
diff --git a/tools/encode/split_by_partitions.py b/tools/encode/split_by_partitions.py
index 2e2a0065867..7bfd6650665 100755
--- a/tools/encode/split_by_partitions.py
+++ b/tools/encode/split_by_partitions.py
@@ -57,7 +57,7 @@ def main():
try:
strandCol = int( sys.argv[7] )-1
except:
- stop_err( "Bad strand column: %s" % ( str( sys.argv[7] ) ) )
+ strandCol = -1
line_count = 0
skipped_lines = 0
diff --git a/tools/extract/extract_genomic_dna.py b/tools/extract/extract_genomic_dna.py
index 6477c2f4d76..4bb2209dd96 100644
--- a/tools/extract/extract_genomic_dna.py
+++ b/tools/extract/extract_genomic_dna.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
"""
-usage: extract_genomic_dna.py $input $out_file1 $input_chromCol $input_startCol $input_endCol $input_strandCol $dbkey $out_format GALAXY_DATA_INDEX_DIR
+usage: extract_genomic_dna.py $input $out_file1 ${input.metadata.chromCol} ${input.metadata.startCol} ${input.metadata.endCol} ${input.metadata.strandCol} $dbkey $out_format GALAXY_DATA_INDEX_DIR
by Wen-Yu Chung
"""
from galaxy import eggs
diff --git a/tools/extract/extract_genomic_dna.xml b/tools/extract/extract_genomic_dna.xml
index dad00536b53..f2deb9ef93a 100644
--- a/tools/extract/extract_genomic_dna.xml
+++ b/tools/extract/extract_genomic_dna.xml
@@ -1,6 +1,6 @@