Mercurial > repos > greg > ideas
comparison ideas.xml @ 25:0169856fe7bb draft
Uploaded
author | greg |
---|---|
date | Fri, 11 Aug 2017 13:24:23 -0400 |
parents | 28201e1f1633 |
children | 53891e4e4c63 |
comparison
equal
deleted
inserted
replaced
24:28201e1f1633 | 25:0169856fe7bb |
---|---|
10 </requirements> | 10 </requirements> |
11 <command><![CDATA[ | 11 <command><![CDATA[ |
12 #import os | 12 #import os |
13 #set tmp_dir = 'tmp' | 13 #set tmp_dir = 'tmp' |
14 #set prep_output_dir = 'prep_output' | 14 #set prep_output_dir = 'prep_output' |
15 #set prep_output_config = 'prep_output_config.txt' | |
15 #set ideas_input_dir = 'ideas_input' | 16 #set ideas_input_dir = 'ideas_input' |
16 #set ideas_matrix_input_file = $os.path.join($ideas_input_dir, 'r_matrix.txt') | 17 #set ideas_matrix_input_file = $os.path.join($ideas_input_dir, 'r_matrix.txt') |
17 mkdir -p $prep_output_dir && | 18 mkdir -p $prep_output_dir && |
18 mkdir -p $ideas_input_dir && | 19 mkdir -p $ideas_input_dir && |
19 ############################################## | 20 ############################################## |
20 ## Create the config file and prepare the data | 21 ## Create the config file and prepare the data |
21 ############################################## | 22 ############################################## |
22 #set input_type = $input_type_cond.input_type | 23 #set input_type = $input_type_cond.input_type |
23 cp '$build_config_file' 'config_file.txt' && | 24 cp '$prep_input_config' 'prep_input_config.txt' && |
24 prepMat | 25 prepMat |
25 #if str($input_type) == 'datasets': | 26 #if str($input_type) == 'datasets': |
26 '$build_config_file' | 27 '$prep_input_config' |
27 #set specify_genomic_window_cond = $input_type_cond.specify_genomic_window_cond | 28 #set specify_genomic_window_cond = $input_type_cond.specify_genomic_window_cond |
28 #set specify_genomic_window = $specify_genomic_window_cond.specify_genomic_window | 29 #set specify_genomic_window = $specify_genomic_window_cond.specify_genomic_window |
29 #if str($specify_genomic_window) == 'yes': | 30 #if str($specify_genomic_window) == 'yes': |
30 -bed '$bed_input' | 31 -bed '$bed_input' |
31 #else: | 32 #else: |
56 -norm | 57 -norm |
57 #end if | 58 #end if |
58 ############################################## | 59 ############################################## |
59 ## Build the R matrix from the prepMat output | 60 ## Build the R matrix from the prepMat output |
60 ############################################## | 61 ############################################## |
61 && Rscript '$__tool_directory__/build_matrix.R' | 62 ##&& Rscript '$__tool_directory__/build_matrix.R' |
62 -i $tmp_dir/*.bed.gz | 63 ##-i $tmp_dir/*.bed.gz |
63 -o $ideas_matrix_input_file | 64 ##-o $ideas_matrix_input_file |
64 -w $ideas_input_dir | 65 ##-w $ideas_input_dir |
66 && cut -d' ' $prep_input_config -f1,2 > file1.txt | |
67 && ls -p tmp/ | grep ".bed.gz" > file2.txt | |
68 && paste <(cat file1.txt) <(cat file2.txt) > $prep_output_config | |
65 ############################################## | 69 ############################################## |
66 ## Run IDEAS on the R matrix | 70 ## Run IDEAS on the R matrix |
67 ############################################## | 71 ############################################## |
68 && ideas | 72 && ideas |
69 '$build_config_file' | 73 '$prep_output_config' |
70 #set smoother_annotation = $smoother_annotation_cond.smoother_annotation | 74 #set smoother_annotation = $smoother_annotation_cond.smoother_annotation |
71 #if str($smoother_annotation) == 'yes': | 75 #if str($smoother_annotation) == 'yes': |
72 -hp | 76 -hp |
73 #end if | 77 #end if |
74 #set smoother_annotation = $smoother_annotation_cond.smoother_annotation | 78 #set smoother_annotation = $smoother_annotation_cond.smoother_annotation |
121 && mv $prep_output_dir/*.state $output_state | 125 && mv $prep_output_dir/*.state $output_state |
122 && mv $prep_output_dir/*.para $output_para | 126 && mv $prep_output_dir/*.para $output_para |
123 && mv $prep_output_dir/*cluster $output_cluster | 127 && mv $prep_output_dir/*cluster $output_cluster |
124 ]]></command> | 128 ]]></command> |
125 <configfiles> | 129 <configfiles> |
126 <configfile name="build_config_file"><![CDATA[#for $input_items in $input_type_cond.input_repeat: | 130 <configfile name="prep_input_config"><![CDATA[#for $input_items in $input_type_cond.input_repeat: |
127 ${input_items.cell_type_name} ${input_items.epigenetic_factor_name} ${input_items.input} | 131 ${input_items.cell_type_name} ${input_items.epigenetic_factor_name} ${input_items.input} |
128 #end for ]]></configfile> | 132 #end for ]]></configfile> |
129 </configfiles> | 133 </configfiles> |
130 <inputs> | 134 <inputs> |
131 <conditional name="input_type_cond"> | 135 <conditional name="input_type_cond"> |