details: http://www.bx.psu.edu/hg/galaxy/rev/695f28311b36 changeset: 2813:695f28311b36 user: Kelly Vincent <kpvincent@bx.psu.edu> date: Thu Oct 01 13:16:43 2009 -0400 description: Updated BWA and Bowtie wrapper tools so that the dbkey of the output is correctly assigned 4 file(s) affected in this change: tools/sr_mapping/bowtie_wrapper.xml tools/sr_mapping/bowtie_wrapper_code.py tools/sr_mapping/bwa_wrapper.xml tools/sr_mapping/bwa_wrapper_code.py diffs (69 lines): diff -r d31ab50dc8e0 -r 695f28311b36 tools/sr_mapping/bowtie_wrapper.xml --- a/tools/sr_mapping/bowtie_wrapper.xml Thu Oct 01 12:35:41 2009 -0400 +++ b/tools/sr_mapping/bowtie_wrapper.xml Thu Oct 01 13:16:43 2009 -0400 @@ -152,7 +152,6 @@ <options from_file="bowtie_indices.loc"> <column name="value" index="1" /> <column name="name" index="0" /> - <filter type="sort_by" column="0" /> </options> </param> </when> @@ -540,4 +539,5 @@ --seed <int> Random seed. Use <int> as the seed for the pseudo-random number generator. [off] </help> + <code file="bowtie_wrapper_code.py" /> </tool> diff -r d31ab50dc8e0 -r 695f28311b36 tools/sr_mapping/bowtie_wrapper_code.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/sr_mapping/bowtie_wrapper_code.py Thu Oct 01 13:16:43 2009 -0400 @@ -0,0 +1,15 @@ +import os + +def exec_before_job(app, inp_data, out_data, param_dict, tool): + try: + refFile = param_dict['refGenomeSource']['indices'].value + dbkey = os.path.split(refFile)[1].split('.')[0] + # deal with the one odd case + if dbkey.find('chrM') >= 0: + dbkey = 'equCab2' + out_data['output'].set_dbkey(dbkey) + except: + try: + refFile = param_dict['refGenomeSource']['ownFile'].dbkey + except: + out_data['output'].set_dbkey('?') diff -r d31ab50dc8e0 -r 695f28311b36 tools/sr_mapping/bwa_wrapper.xml --- a/tools/sr_mapping/bwa_wrapper.xml Thu Oct 01 12:35:41 2009 -0400 +++ b/tools/sr_mapping/bwa_wrapper.xml Thu Oct 01 13:16:43 2009 -0400 @@ -80,7 +80,6 @@ <options from_file="sequence_index_color.loc"> <column name="value" index="1" /> <column name="name" index="0" /> - <filter type="sort_by" column="0" /> </options> </param> </when> @@ -100,7 +99,6 @@ <options from_file="sequence_index_base.loc"> <column name="value" index="1" /> <column name="name" index="0" /> - <filter type="sort_by" column="0" /> </options> </param> </when> diff -r d31ab50dc8e0 -r 695f28311b36 tools/sr_mapping/bwa_wrapper_code.py --- a/tools/sr_mapping/bwa_wrapper_code.py Thu Oct 01 12:35:41 2009 -0400 +++ b/tools/sr_mapping/bwa_wrapper_code.py Thu Oct 01 13:16:43 2009 -0400 @@ -4,5 +4,8 @@ try: refFile = param_dict['solidOrSolexa']['solidRefGenomeSource']['indices'].value out_data['output'].set_dbkey(os.path.split(refFile)[1].split('.')[0]) - except Exception, eq: - out_data['output'].set_dbkey(param_dict['dbkey']) + except: + try: + refFile = param_dict['solidOrSolexa']['solidRefGenomeSource']['ownFile'].dbkey + except: + out_data['output'].set_dbkey('?')