commit/galaxy-central: dan: Allow gatk_wrapper.py to run in versions of python<2.6.
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/4904586054cc/ changeset: r5544:4904586054cc user: dan date: 2011-05-11 22:02:06 summary: Allow gatk_wrapper.py to run in versions of python<2.6. affected #: 2 files (171 bytes) --- a/tools/gatk/count_covariates.xml Wed May 11 15:43:33 2011 -0400 +++ b/tools/gatk/count_covariates.xml Wed May 11 16:02:06 2011 -0400 @@ -356,7 +356,6 @@ <test><param name="reference_source_selector" value="history" /><param name="ref_file" value="phiX.fasta" ftype="fasta" /> - <param name="target_intervals" value="gatk/gatk_realigner_target_creator/gatk_realigner_target_creator_out_1.gatk_interval" ftype="gatk_interval" /><param name="input_bam" value="gatk/gatk_indel_realigner/gatk_indel_realigner_out_1.bam" ftype="bam" /><param name="input_dbsnp_rod" /><param name="rod_bind_type_selector" value="snps" /> --- a/tools/gatk/gatk_wrapper.py Wed May 11 15:43:33 2011 -0400 +++ b/tools/gatk/gatk_wrapper.py Wed May 11 16:02:06 2011 -0400 @@ -8,8 +8,6 @@ import sys, optparse, os, tempfile, subprocess, shutil from string import Template -assert sys.version_info[:2] >= ( 2, 6 ) - GALAXY_EXT_TO_GATK_EXT = { 'gatk_interval':'intervals', 'bam_index':'bam.bai', 'gatk_dbsnp':'dbsnp', 'picard_interval_list':'interval_list' } #items not listed here, will use the galaxy extension as-is GALAXY_EXT_TO_GATK_FILE_TYPE = GALAXY_EXT_TO_GATK_EXT #for now, these are the same, but could be different if needed DEFAULT_GATK_PREFIX = "gatk_file" @@ -69,7 +67,9 @@ stderr = open_file_from_option( options.stderr, mode = 'wb' ) #if no stderr file is specified, we'll use our own if stderr is None: - stderr = tempfile.NamedTemporaryFile( dir=tmp_dir, delete=False ) + stderr = tempfile.NamedTemporaryFile( dir=tmp_dir ) + stderr.close() + stderr = open( stderr.name, 'w+b' ) proc = subprocess.Popen( args=cmd, stdout=stdout, stderr=stderr, shell=True, cwd=tmp_dir ) return_code = proc.wait() Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket