comparison multigps.xml @ 6:7dc47046b54c draft

Uploaded
author iuc
date Tue, 04 Apr 2017 10:29:15 -0400
parents d7c4baf43c13
children 6d6ceda98d94
comparison
equal deleted inserted replaced
5:d7c4baf43c13 6:7dc47046b54c
8 </requirements> 8 </requirements>
9 <command detect_errors="aggressive"> 9 <command detect_errors="aggressive">
10 <![CDATA[ 10 <![CDATA[
11 #set output_dir = $output_html.files_path 11 #set output_dir = $output_html.files_path
12 mkdir -p $output_dir && 12 mkdir -p $output_dir &&
13 python '$design_file_script' '$inputs' &&
13 multigps 14 multigps
14 ## General options 15 ## General options
15 #set single_or_multi_expt = $single_or_multi_expt_cond.single_or_multi_expt 16 #set single_or_multi_expt = $single_or_multi_expt_cond.single_or_multi_expt
16 #if str($single_or_multi_expt) == 'multi': 17 #if str($single_or_multi_expt) == 'multi':
17 #for $i in $single_or_multi_expt_cond['input_items']: 18 #for $i in $single_or_multi_expt_cond['input_items']:
180 && mv $output_dir/*.bed '$output_bed' 181 && mv $output_dir/*.bed '$output_bed'
181 && mv $output_dir/*.html '$output_html' 182 && mv $output_dir/*.html '$output_html'
182 && mv $output_dir/*.table.txt '$all_events_table' 183 && mv $output_dir/*.table.txt '$all_events_table'
183 ]]> 184 ]]>
184 </command> 185 </command>
186 <configfiles>
187 <inputs name="inputs"/>
188 <configfile name="design_file_script">
189 <![CDATA[
190 import sys
191 import json
192
193 input_json_path = sys.argv[1]
194 params = json.load(open(input_json_path, "r"))
195
196 if params['single_or_multi_expt_cond']['single_or_multi_expt'] == 'multi':
197 input_items = params['single_or_multi_expt_cond']['input_items']
198 design_file = open('design.tabular', 'w')
199 for item in input_items:
200 experiment_file_name, control_file_name, label, file_format, condition_name, replicate_name, experiment_type, fixed_read_count = item
201 if control_file_name not in ['None', None, '']:
202 control_file_names.append(control_file_name)
203 file_format = file_format.upper()
204 items = [experiment_file_name, label, file_format, condition_name]
205 if replicate_name not in ['None', None, '']:
206 items.append(replicate_name)
207 if experiment_type not in ['None', None, '']:
208 items.append(experiment_type)
209 if fixed_read_count not in ['None', None, '']:
210 items.append(fixed_read_count)
211 design_file.write('%s\n' % '\t'.join(items))
212 design_file.close()
213 ]]>
214 </configfile>
215 </configfiles>
185 <inputs> 216 <inputs>
186 <conditional name="single_or_multi_expt_cond"> 217 <conditional name="single_or_multi_expt_cond">
187 <param name="single_or_multi_expt" type="select" label="Run MultiGPS on single or multiple inputs?"> 218 <param name="single_or_multi_expt" type="select" label="Run MultiGPS on single or multiple inputs?">
188 <option value="multi" selected="True">Multiple inputs</option> 219 <option value="multi" selected="True">Multiple inputs</option>
189 <option value="single">Single input</option> 220 <option value="single">Single input</option>