mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Updated BWA and Bowtie wrapper tools so that the dbkey of the output is correctly assigned
This commit is contained in:
@@ -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 @@ For aligning (bowtie)::
|
||||
--seed <int> Random seed. Use <int> as the seed for the pseudo-random number generator. [off]
|
||||
|
||||
</help>
|
||||
<code file="bowtie_wrapper_code.py" />
|
||||
</tool>
|
||||
|
||||
@@ -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('?')
|
||||
@@ -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>
|
||||
|
||||
@@ -4,5 +4,8 @@ def exec_before_job(app, inp_data, out_data, param_dict, tool):
|
||||
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('?')
|
||||
|
||||
Reference in New Issue
Block a user