Updated BWA and Bowtie wrapper tools so that the dbkey of the output is correctly assigned

This commit is contained in:
Kelly Vincent
2009-10-01 13:16:43 -04:00
parent 5d4513b585
commit c41b730f7c
4 changed files with 21 additions and 5 deletions
+1 -1
View File
@@ -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 &lt;int&gt; Random seed. Use &lt;int&gt; as the seed for the pseudo-random number generator. [off]
</help>
<code file="bowtie_wrapper_code.py" />
</tool>
+15
View File
@@ -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('?')
-2
View File
@@ -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>
+5 -2
View File
@@ -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('?')