Mercurial > repos > iuc > multigps
diff multigps.xml @ 6:7dc47046b54c draft
Uploaded
| author | iuc |
|---|---|
| date | Tue, 04 Apr 2017 10:29:15 -0400 |
| parents | d7c4baf43c13 |
| children | 6d6ceda98d94 |
line wrap: on
line diff
--- a/multigps.xml Tue Apr 04 10:02:01 2017 -0400 +++ b/multigps.xml Tue Apr 04 10:29:15 2017 -0400 @@ -10,6 +10,7 @@ <![CDATA[ #set output_dir = $output_html.files_path mkdir -p $output_dir && + python '$design_file_script' '$inputs' && multigps ## General options #set single_or_multi_expt = $single_or_multi_expt_cond.single_or_multi_expt @@ -182,6 +183,36 @@ && mv $output_dir/*.table.txt '$all_events_table' ]]> </command> + <configfiles> + <inputs name="inputs"/> + <configfile name="design_file_script"> +<![CDATA[ +import sys +import json + +input_json_path = sys.argv[1] +params = json.load(open(input_json_path, "r")) + +if params['single_or_multi_expt_cond']['single_or_multi_expt'] == 'multi': + input_items = params['single_or_multi_expt_cond']['input_items'] + design_file = open('design.tabular', 'w') + for item in input_items: + experiment_file_name, control_file_name, label, file_format, condition_name, replicate_name, experiment_type, fixed_read_count = item + if control_file_name not in ['None', None, '']: + control_file_names.append(control_file_name) + file_format = file_format.upper() + items = [experiment_file_name, label, file_format, condition_name] + if replicate_name not in ['None', None, '']: + items.append(replicate_name) + if experiment_type not in ['None', None, '']: + items.append(experiment_type) + if fixed_read_count not in ['None', None, '']: + items.append(fixed_read_count) + design_file.write('%s\n' % '\t'.join(items)) + design_file.close() +]]> + </configfile> + </configfiles> <inputs> <conditional name="single_or_multi_expt_cond"> <param name="single_or_multi_expt" type="select" label="Run MultiGPS on single or multiple inputs?">
