1- <tool id =" bwameth_index_builder_data_manager" name =" bwa-meth index" tool_type =" manage_data" version =" 1.0.0.2 " profile =" 18.09 " >
1+ <tool id =" bwameth_index_builder_data_manager" name =" bwa-meth index" tool_type =" manage_data" version =" 1.0.0.3 " profile =" 24.2 " >
22 <description >builder</description >
33 <macros >
44 <token name =" @TOOL_VERSION@" >0.2.2</token >
77 <requirement type =" package" version =" @TOOL_VERSION@" >bwameth</requirement >
88 </requirements >
99 <command detect_errors =" aggressive" ><![CDATA[
10- #if str($sequence_id).strip():
11- #set $dbkey = $sequence_id
12- #else:
13- #set $dbkey = $all_fasta_source.fields.dbkey
14- #end if
15-
16- #if str($sequence_name).strip():
17- #set $name = $sequence_name
18- #else:
19- #set $name = $all_fasta_source.fields.name
20- #end if
21-
22- python '$__tool_directory__/bwameth_index_builder.py' --output '${out_file}'
23- --fasta_filename '${all_fasta_source.fields.path}'
24- --dbkey '${dbkey}'
25- --name '${name}'
26- --data_table_name bwameth_indexes
10+ #import os.path
11+ #set basename=os.path.basename($all_fasta_source.fields.path)
12+ #set sym_linked_fasta_filename = os.path.join($out_file.extra_files_path, $basename)
13+ mkdir -p '$out_file.extra_files_path' &&
14+ ln -s '${all_fasta_source.fields.path}' '$sym_linked_fasta_filename' &&
15+ bwameth.py index '$sym_linked_fasta_filename' &&
16+ cp '$dmjson' '$out_file'
2717 ]]> </command >
18+ <configfiles >
19+ <configfile name =" dmjson" ><![CDATA[ #slurp
20+ #import os.path
21+ #set basename=os.path.basename($all_fasta_source.fields.path)
22+ #set sym_linked_fasta_filename = os.path.join($out_file.extra_files_path, $basename)
23+ #set $value = $sequence_id or $all_fasta_source.fields.dbkey
24+ #set $name = $sequence_name or $all_fasta_source.fields.name
25+ {
26+ "data_tables":{
27+ "bwameth_indexes":[
28+ {
29+ "value": "${value}",
30+ "dbkey": "${all_fasta_source.fields.dbkey}",
31+ "name": "${name}",
32+ "path": "$basename"
33+ }
34+ ]
35+ }
36+ }
37+ ]]> </configfile >
38+ </configfiles >
2839 <inputs >
2940 <param name =" all_fasta_source" type =" select" label =" Source FASTA Sequence" >
3041 <options from_data_table =" all_fasta" />
@@ -38,7 +49,14 @@ python '$__tool_directory__/bwameth_index_builder.py' --output '${out_file}'
3849 <tests >
3950 <test >
4051 <param name =" all_fasta_source" value =" phiX174" />
41- <output name =" out_file" value =" bwameth_data_manager.json" compare =" re_match" />
52+ <output name =" out_file" >
53+ <assert_contents >
54+ <has_text text =" bwameth_indexes" />
55+ <has_json_property_with_text property =" dbkey" text =" phiX174" />
56+ <has_json_property_with_text property =" name" text =" phiX 174" />
57+ <has_json_property_with_text property =" value" text =" phiX174" />
58+ </assert_contents >
59+ </output >
4260 </test >
4361 </tests >
4462 <help ><![CDATA[
0 commit comments