commit/galaxy-central: dan: Better handling of JexlExpressions in stratification expressions for GATK VariantEval.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/4ce50b22caba/ changeset: 4ce50b22caba user: dan date: 2012-01-11 14:33:48 summary: Better handling of JexlExpressions in stratification expressions for GATK VariantEval. affected #: 2 files diff -r 82115950072cf4114619fe1e9c693c83d8e4c9ed -r 4ce50b22cabaf7257c774eb5ae4bb171a731bb7f tools/gatk/gatk_wrapper.py --- a/tools/gatk/gatk_wrapper.py +++ b/tools/gatk/gatk_wrapper.py @@ -6,6 +6,7 @@ """ import sys, optparse, os, tempfile, subprocess, shutil +from binascii import unhexlify from string import Template 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 @@ -46,6 +47,7 @@ #Parse Command Line parser = optparse.OptionParser() parser.add_option( '-p', '--pass_through', dest='pass_through_options', action='append', type="string", help='These options are passed through directly to GATK, without any modification.' ) + parser.add_option( '-o', '--pass_through_options', dest='pass_through_options_encoded', action='append', type="string", help='These options are passed through directly to GATK, with decoding from binascii.unhexlify.' ) parser.add_option( '-d', '--dataset', dest='datasets', action='append', type="string", nargs=4, help='"-argument" "original_filename" "galaxy_filetype" "name_prefix"' ) parser.add_option( '', '--max_jvm_heap', dest='max_jvm_heap', action='store', type="string", default=None, help='If specified, the maximum java virtual machine heap size will be set to the provide value.' ) parser.add_option( '', '--max_jvm_heap_fraction', dest='max_jvm_heap_fraction', action='store', type="int", default=None, help='If specified, the maximum java virtual machine heap size will be set to the provide value as a fraction of total physical memory.' ) @@ -59,6 +61,8 @@ cmd = ' '.join( options.pass_through_options ) else: cmd = '' + if options.pass_through_options_encoded: + cmd = '%s %s' % ( cmd, ' '.join( map( unhexlify, options.pass_through_options_encoded ) ) ) if options.max_jvm_heap is not None: cmd = cmd.replace( 'java ', 'java -Xmx%s ' % ( options.max_jvm_heap ), 1 ) elif options.max_jvm_heap_fraction is not None: diff -r 82115950072cf4114619fe1e9c693c83d8e4c9ed -r 4ce50b22cabaf7257c774eb5ae4bb171a731bb7f tools/gatk/variant_eval.xml --- a/tools/gatk/variant_eval.xml +++ b/tools/gatk/variant_eval.xml @@ -1,9 +1,10 @@ -<tool id="gatk_variant_eval" name="Eval Variants" version="0.0.3"> +<tool id="gatk_variant_eval" name="Eval Variants" version="0.0.4"><description></description><requirements><requirement type="package" version="1.3">gatk</requirement></requirements><command interpreter="python">gatk_wrapper.py + #from binascii import hexlify --max_jvm_heap_fraction "1" --stdout "${output_log}" #for $var_count, $variant in enumerate( $reference_source.variants ): @@ -95,10 +96,11 @@ ##start analysis specific options #if $analysis_param_type.analysis_param_type_selector == "advanced": + #for $stratification in $analysis_param_type.stratifications: + #set $select_string = "--select_exps '%s' --select_names '%s'" % ( str( $stratification.select_exps ), str( $stratification.select_name ) ) + -o '${ hexlify( $select_string ) }' + #end for -p ' - #for $stratification in $analysis_param_type.stratifications: - --select_exps "${stratification.select_exps}" --select_names "${stratification.select_name}" - #end for #for $sample in $analysis_param_type.samples: --sample "${sample.sample}" @@ -326,7 +328,13 @@ </when><when value="advanced"><repeat name="stratifications" title="Stratification"> - <param name="select_exps" value="" type="text" label="Stratification Expression"/> + <param name="select_exps" value="" type="text" label="Stratification Expression"> + <sanitizer> + <valid> + <add value="""/> + </valid> + </sanitizer> + </param><param name="select_name" value="" type="text" label="Name"/></repeat> 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