From: Diane Trout Date: Thu, 9 Aug 2012 19:53:32 +0000 (-0700) Subject: Fix some mismatches between variable names in python code and in templates X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=a17e7f21fbc053ea773f1ecefc0505f1dd1aec19 Fix some mismatches between variable names in python code and in templates --- diff --git a/htsworkflow/submission/condorfastq.py b/htsworkflow/submission/condorfastq.py index 1d425de..64eb6a1 100644 --- a/htsworkflow/submission/condorfastq.py +++ b/htsworkflow/submission/condorfastq.py @@ -51,12 +51,16 @@ class CondorFastqExtract(object): 'by_sample': 'lane_to_fastq.turtle', } + env = None + pythonpath = os.environ.get('PYTHONPATH', None) + if pythonpath is not None: + env = "PYTHONPATH=%s" % (pythonpath,) condor_entries = self.build_condor_arguments(result_map) for script_type in template_map.keys(): template = loader.get_template(template_map[script_type]) variables = {'python': sys.executable, 'logdir': self.log_path, - 'env': os.environ.get('PYTHONPATH', None), + 'env': env, 'args': condor_entries[script_type], 'root_url': self.api.root_url, } diff --git a/htsworkflow/templates/qseq.condor b/htsworkflow/templates/qseq.condor index fcdac83..68d101b 100644 --- a/htsworkflow/templates/qseq.condor +++ b/htsworkflow/templates/qseq.condor @@ -1,9 +1,9 @@ Universe=vanilla -executable={{ exe }} +executable={{ python }} error={{ logdir }}/fastq.$(process).out output={{ logdir }}/fastq.$(process).out log={{ logdir }}/fastq.log -{% if env %}environment={{ env }}{% endif %} +{% if env %}environment="{{env}}"{% endif %} {% for arg in args %} arguments="{{ arg.pyscript }} -o {{ arg.target }} {% if arg.flowcell %}-f {{ arg.flowcell }}{% endif %} {% if arg.istar %}-i{% endif %} {% for s in arg.sources %}{{ s }} {% endfor %}" diff --git a/htsworkflow/templates/split_fastq.condor b/htsworkflow/templates/split_fastq.condor index 3ea0350..127a9c0 100644 --- a/htsworkflow/templates/split_fastq.condor +++ b/htsworkflow/templates/split_fastq.condor @@ -1,11 +1,11 @@ Universe=vanilla -executable={{ exe }} +executable={{ python }} error={{ logdir }}/fastq.$(process).out output={{ logdir }}/fastq.$(process).out log={{ logdir }}/fastq.log -{% if env %}environment={{ env }}{% endif %} +{% if env %}environment="{{env}}"{% endif %} {% for arg in args %} -arguments="{{ arg.pyscript }} -o {{ arg.target }} {% for s in arg.sources %}{{ s }} {% endfor %} +arguments="{{ arg.pyscript }} -o {{ arg.target }} {% for s in arg.sources %}{{ s }} {% endfor %}" queue {% endfor %} diff --git a/htsworkflow/templates/srf.condor b/htsworkflow/templates/srf.condor index 1c8e854..4428529 100644 --- a/htsworkflow/templates/srf.condor +++ b/htsworkflow/templates/srf.condor @@ -1,9 +1,9 @@ Universe=vanilla -executable={{ exe }} +executable={{ python }} error={{ logdir }}/fastq.$(process).out output={{ logdir }}/fastq.$(process).out log={{ logdir }}/fastq.log -{% if env %}environment={{ env }}{% endif %} +{% if env %}environment="{{env}}"{% endif %} {% for arg in args %} arguments="{{ arg.pyscript }} {{ arg.sources.0 }} --verbose {% if arg.flowcell %}--flowcell {{ arg.flowcell }}{% endif %} {% if arg.ispaired %}--left {{ arg.target }} --right {{ arg.target_right }}{% else %}--single {{ arg.target }}{% endif %}"