[hg] galaxy 1513: Quick 'n easy solution to the EMBOSS stage in/...

classic Classic list List threaded Threaded
1 message Options
| Threaded
Open this post in threaded view
|

[hg] galaxy 1513: Quick 'n easy solution to the EMBOSS stage in/...

greg
details:   http://www.bx.psu.edu/hg/galaxy/rev/cf17b5a16eff
changeset: 1513:cf17b5a16eff
user:      Nate Coraor <[hidden email]>
date:      Wed Sep 17 10:45:20 2008 -0400
description:
Quick 'n easy solution to the EMBOSS stage in/out problem: read the
outputs from the "real" galaxy path instead of the temp stage path.

1 file(s) affected in this change:

lib/galaxy/jobs/runners/pbs.py

diffs (31 lines):

diff -r 1e408bab8941 -r cf17b5a16eff lib/galaxy/jobs/runners/pbs.py
--- a/lib/galaxy/jobs/runners/pbs.py Tue Sep 16 15:23:23 2008 -0400
+++ b/lib/galaxy/jobs/runners/pbs.py Wed Sep 17 10:45:20 2008 -0400
@@ -146,7 +146,7 @@
         if self.app.config.pbs_application_server:
             pbs_ofile = self.app.config.pbs_application_server + ':' + ofile
             pbs_efile = self.app.config.pbs_application_server + ':' + efile
-            stagein = self.get_stage_in_out( job_wrapper.get_input_fnames() + job_wrapper.get_output_fnames() )
+            stagein = self.get_stage_in_out( job_wrapper.get_input_fnames() + job_wrapper.get_output_fnames(), symlink=True )
             stageout = self.get_stage_in_out( job_wrapper.get_output_fnames() )
             job_attrs = pbs.new_attropl(5)
             job_attrs[0].name = pbs.ATTR_o
@@ -372,15 +372,15 @@
         self.queue.put( self.STOP_SIGNAL )
         log.info( "pbs job runner stopped" )
 
-    def get_stage_in_out( self, fnames ):
+    def get_stage_in_out( self, fnames, symlink=False ):
         """Convenience function to create a stagein/stageout list"""
         stage = ''
         for fname in fnames:
             if os.access(fname, os.R_OK):
-                if stage != '':
+                if stage:
                     stage += ','
                 # pathnames are now absolute
-                if self.app.config.pbs_stage_path != '':
+                if symlink and self.app.config.pbs_stage_path:
                     stage_name = os.path.join(self.app.config.pbs_stage_path, os.path.split(fname)[1])
                 else:
                     stage_name = fname