[hg] galaxy 3760: Add external metadata to SGE
details: http://www.bx.psu.edu/hg/galaxy/rev/f53d06cf2f93 changeset: 3760:f53d06cf2f93 user: Nate Coraor <nate@bx.psu.edu> date: Mon May 10 11:13:51 2010 -0400 description: Add external metadata to SGE diffstat: lib/galaxy/jobs/runners/sge.py | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diffs (19 lines): diff -r 6aa1379d35e0 -r f53d06cf2f93 lib/galaxy/jobs/runners/sge.py --- a/lib/galaxy/jobs/runners/sge.py Mon May 10 10:17:11 2010 -0400 +++ b/lib/galaxy/jobs/runners/sge.py Mon May 10 11:13:51 2010 -0400 @@ -165,6 +165,15 @@ jt.nativeSpecification = ' '.join(nativeSpec) script = sge_template % (job_wrapper.galaxy_lib_dir, os.path.abspath( job_wrapper.working_directory ), command_line) + if self.app.config.set_metadata_externally: + output_fnames = [ str( o ) for o in job_wrapper.get_output_fnames() ] + script += "cd %s\n" % os.path.abspath( os.getcwd() ) + script += "%s\n" % job_wrapper.setup_external_metadata( exec_dir = os.path.abspath( os.getcwd() ), + tmp_dir = self.app.config.new_file_path, + dataset_files_path = self.app.model.Dataset.file_path, + output_fnames = output_fnames, + set_extension = False, + kwds = { 'overwrite' : False } ) #we don't want to overwrite metadata that was copied over in init_meta(), as per established behavior fh = file( jt.remoteCommand, "w" ) fh.write( script ) fh.close()
participants (1)
-
Nate Coraor