Mercurial > repos > greg > ideas
comparison ideas.xml @ 149:a80b76535243 draft
Uploaded
author | greg |
---|---|
date | Fri, 12 Jan 2018 11:24:30 -0500 |
parents | 8cfcf32c4282 |
children | 9d34f7e6d80c |
comparison
equal
deleted
inserted
replaced
148:0ba72d5ca209 | 149:a80b76535243 |
---|---|
12 #set output_pdf_dir = "output_pdf_dir" | 12 #set output_pdf_dir = "output_pdf_dir" |
13 #set output_txt_dir = "output_txt_dir" | 13 #set output_txt_dir = "output_txt_dir" |
14 #set tmp_dir = "tmp" | 14 #set tmp_dir = "tmp" |
15 #set prep_input_config = "prep_input_config.txt" | 15 #set prep_input_config = "prep_input_config.txt" |
16 #set prep_output_config = "prep_output_config.txt" | 16 #set prep_output_config = "prep_output_config.txt" |
17 #set specify_genomic_window = $specify_genomic_window_cond.specify_genomic_window | |
18 #set perform_training = $perform_training_cond.perform_training | |
17 ############################################## | 19 ############################################## |
18 ## Create the config file and prepare the data | 20 ## Create the config file and prepare the data |
19 ############################################## | 21 ############################################## |
20 #set specify_genomic_window = $specify_genomic_window_cond.specify_genomic_window | |
21 #if str($output_heatmaps) == "yes": | 22 #if str($output_heatmaps) == "yes": |
22 mkdir '$output_pdf_dir' && | 23 mkdir '$output_pdf_dir' && |
23 #end if | 24 #end if |
24 mkdir '$output_txt_dir' && | 25 mkdir '$output_txt_dir' && |
25 cp '$gen_prep_input_config' $prep_input_config && | 26 cp '$gen_prep_input_config' $prep_input_config && |
80 #else: | 81 #else: |
81 #set $window_positions_by_chroms[$items[0]] = [$count, $count+1] | 82 #set $window_positions_by_chroms[$items[0]] = [$count, $count+1] |
82 #end if | 83 #end if |
83 #end for | 84 #end for |
84 #for chrom, tup in $window_positions_by_chroms.items(): | 85 #for chrom, tup in $window_positions_by_chroms.items(): |
85 && ideas | 86 && Rscript '$__tool_directory__/ideas.R' |
86 '$prep_output_config' | 87 #if str($perform_training) == "yes": |
87 '$specify_genomic_window_cond.bed_input' | 88 --training_iterations $perform_training_cond.training_iterations |
88 $hp | 89 --training_windows $perform_training_cond.training_windows |
89 -inv $tup[0] $tup[1] | 90 #end if |
91 --prep_output_config '$prep_output_config' | |
92 --windows_bed '$specify_genomic_window_cond.bed_input' | |
93 --hp $hp | |
94 --window_start $tup[0] | |
95 --window_end $tup[1] | |
90 #if str($log2) != "0.0": | 96 #if str($log2) != "0.0": |
91 -log2 $log2 | 97 --log2 $log2 |
92 #end if | 98 #end if |
93 #if str($max_states) != "0.0": | 99 #if str($max_states) != "0.0": |
94 -G $max_states | 100 --max_states $max_states |
95 #end if | 101 #end if |
96 #if str($initial_states) != "0": | 102 #if str($initial_states) != "0": |
97 -C $initial_states | 103 --initial_states $initial_states |
98 #end if | 104 #end if |
99 #if str($max_position_classes) != "0": | 105 #if str($max_position_classes) != "0": |
100 -P $max_position_classes | 106 --max_position_classes $max_position_classes |
101 #end if | 107 #end if |
102 #if str($max_cell_type_clusters) != "0": | 108 #if str($max_cell_type_clusters) != "0": |
103 -K $max_cell_type_clusters | 109 --max_cell_type_clusters $max_cell_type_clusters |
104 #end if | 110 #end if |
105 #if str($prior_concentration) != "0.0": | 111 #if str($prior_concentration) != "0.0": |
106 -A $prior_concentration | 112 --prior_concentration $prior_concentration |
107 #end if | 113 #end if |
108 -sample $burnin_num $mcmc_num | 114 --burnin_num $burnin_num |
115 --mcmc_num $mcmc_num | |
109 #if str($minerr) != "0.0": | 116 #if str($minerr) != "0.0": |
110 -minerr $minerr | 117 --minerr $minerr |
111 #end if | 118 #end if |
112 #if str($maxerr) != "0.0": | 119 #if str($maxerr) != "0.0": |
113 -maxerr $maxerr | 120 --maxerr $maxerr |
114 #end if | 121 #end if |
115 -rseed $rseed | 122 --rseed $rseed |
116 -thread \${GALAXY_SLOTS:-4} | 123 --thread \${GALAXY_SLOTS:-4} |
117 -o '$project_name.$chrom' | 124 --project_name '$project_name.$chrom' |
125 --save_ideas_log $save_ideas_log | |
118 #if str($save_ideas_log) == "yes": | 126 #if str($save_ideas_log) == "yes": |
119 &>>'$output_log'; | 127 --output_log '$output_log' |
120 if [[ $? -ne 0 ]]; then | |
121 exit 1; | |
122 fi | |
123 #else: | |
124 &>>ideas_log.txt; | |
125 if [[ $? -ne 0 ]]; then | |
126 cp ideas_log.txt '$output_txt_dir' | |
127 exit 1; | |
128 fi | |
129 #end if | 128 #end if |
130 #end for | 129 #end for |
131 #else: | 130 #else: |
132 ############################################## | 131 ############################################## |
133 ## Not using a genomic window bed file. | 132 ## Not using a genomic window bed file. |
134 ############################################## | 133 ############################################## |
135 && ideas | 134 && Rscript '$__tool_directory__/ideas.R' |
136 '$prep_output_config' | 135 #if str($perform_training) == "yes": |
137 $tmp_dir/*.bed | 136 --training_iterations $perform_training_cond.training_iterations |
138 $hp | 137 --training_windows $perform_training_cond.training_windows |
138 #end if | |
139 --prep_output_config '$prep_output_config' | |
140 --windows_bed $tmp_dir/*.bed | |
141 --hp $hp | |
139 #if str($log2) != "0.0": | 142 #if str($log2) != "0.0": |
140 -log2 $log2 | 143 --log2 $log2 |
141 #end if | 144 #end if |
142 #if str($max_states) != "0.0": | 145 #if str($max_states) != "0.0": |
143 -G $max_states | 146 --max_states $max_states |
144 #end if | 147 #end if |
145 #if str($initial_states) != "0": | 148 #if str($initial_states) != "0": |
146 -C $initial_states | 149 --initial_states $initial_states |
147 #end if | 150 #end if |
148 #if str($max_position_classes) != "0": | 151 #if str($max_position_classes) != "0": |
149 -P $max_position_classes | 152 --max_position_classes $max_position_classes |
150 #end if | 153 #end if |
151 #if str($max_cell_type_clusters) != "0": | 154 #if str($max_cell_type_clusters) != "0": |
152 -K $max_cell_type_clusters | 155 --max_cell_type_clusters $max_cell_type_clusters |
153 #end if | 156 #end if |
154 #if str($prior_concentration) != "0.0": | 157 #if str($prior_concentration) != "0.0": |
155 -A $prior_concentration | 158 --prior_concentration $prior_concentration |
156 #end if | 159 #end if |
157 -sample $burnin_num $mcmc_num | 160 --burnin_num $burnin_num |
161 --mcmc_num $mcmc_num | |
158 #if str($minerr) != "0.0": | 162 #if str($minerr) != "0.0": |
159 -minerr $minerr | 163 --minerr $minerr |
160 #end if | 164 #end if |
161 #if str($maxerr) != "0.0": | 165 #if str($maxerr) != "0.0": |
162 -maxerr $maxerr | 166 --maxerr $maxerr |
163 #end if | 167 #end if |
164 -rseed $rseed | 168 --rseed $rseed |
165 -thread \${GALAXY_SLOTS:-4} | 169 --thread \${GALAXY_SLOTS:-4} |
166 -o '$project_name' | 170 --project_name '$project_name' |
171 --save_ideas_log $save_ideas_log | |
167 #if str($save_ideas_log) == "yes": | 172 #if str($save_ideas_log) == "yes": |
168 &>'$output_log'; | 173 --output_log '$output_log' |
169 if [[ $? -ne 0 ]]; then | |
170 exit 1; | |
171 fi | |
172 #else: | |
173 &>ideas_log.txt; | |
174 if [[ $? -ne 0 ]]; then | |
175 cp ideas_log.txt '$output_txt_dir' | |
176 exit 1; | |
177 fi | |
178 #end if | 174 #end if |
179 #end if | 175 #end if |
180 && mv ./*.cluster '$output_txt_dir' | 176 && mv ./*.cluster '$output_txt_dir' |
181 && mv ./*.para '$output_txt_dir' | 177 && mv ./*.para '$output_txt_dir' |
182 && mv ./*.profile '$output_txt_dir' | 178 && mv ./*.profile '$output_txt_dir' |
212 ${input_items.cell_type_name} ${input_items.epigenetic_factor_name} ${input_items.input} | 208 ${input_items.cell_type_name} ${input_items.epigenetic_factor_name} ${input_items.input} |
213 #end for | 209 #end for |
214 #end if]]></configfile> | 210 #end if]]></configfile> |
215 </configfiles> | 211 </configfiles> |
216 <inputs> | 212 <inputs> |
213 <conditional name="perform_training_cond"> | |
214 <param name="perform_training" type="select" label="Perform training?"> | |
215 <option value="yes" selected="true">Yes</option> | |
216 <option value="no">No</option> | |
217 </param> | |
218 <when value="yes"> | |
219 <param name="training_iterations" type="integer" value="20" min="1" label="Number of training iterations"/> | |
220 <param name="training_windows" type="integer" value="10000" min="1" label="Number of randomly selected windows for training"/> | |
221 </when> | |
222 <when value="no"/> | |
223 </conditional> | |
217 <conditional name="cell_type_epigenetic_factor_cond"> | 224 <conditional name="cell_type_epigenetic_factor_cond"> |
218 <param name="cell_type_epigenetic_factor" type="select" label="Set cell type and epigenetic factor names by"> | 225 <param name="cell_type_epigenetic_factor" type="select" label="Set cell type and epigenetic factor names by"> |
219 <option value="extract" selected="true">extracting them from the selected input file names</option> | 226 <option value="extract" selected="true">extracting them from the selected input file names</option> |
220 <option value="manual">manually setting them for each selected input</option> | 227 <option value="manual">manually setting them for each selected input</option> |
221 </param> | 228 </param> |
245 </when> | 252 </when> |
246 </conditional> | 253 </conditional> |
247 <param name="project_name" type="text" value="myProject" label="Project name" help="Outputs will have this base name"> | 254 <param name="project_name" type="text" value="myProject" label="Project name" help="Outputs will have this base name"> |
248 <validator type="empty_field"/> | 255 <validator type="empty_field"/> |
249 </param> | 256 </param> |
250 <param argument="-rseed" type="integer" value="1234" min="0" max="1000000" label="Seed for IDEAS model initialization" help="Zero value generates a random seed, and this seed will be different for each job run."/> | 257 <param name="rseed" type="integer" value="1234" min="0" max="1000000" label="Seed for IDEAS model initialization" help="Zero value generates a random seed, and this seed will be different for each job run."/> |
251 <conditional name="specify_genomic_window_cond"> | 258 <conditional name="specify_genomic_window_cond"> |
252 <param name="specify_genomic_window" type="select" label="Select Bed file that defines genomic windows on which to process the data"> | 259 <param name="specify_genomic_window" type="select" label="Select Bed file that defines genomic windows on which to process the data"> |
253 <option value="no" selected="true">No</option> | 260 <option value="no" selected="true">No</option> |
254 <option value="yes">Yes</option> | 261 <option value="yes">Yes</option> |
255 </param> | 262 </param> |
270 </when> | 277 </when> |
271 <when value="yes"> | 278 <when value="yes"> |
272 <param name="bed_input" type="data" format="bed" label="Bed file specifying the genomic windows"/> | 279 <param name="bed_input" type="data" format="bed" label="Bed file specifying the genomic windows"/> |
273 </when> | 280 </when> |
274 </conditional> | 281 </conditional> |
275 <param argument="-bychr" type="boolean" truevalue="-bychr" falsevalue="" checked="False" label="Output chromosomes in separate files"/> | 282 <param name="bychr" type="boolean" truevalue="true" falsevalue="" checked="False" label="Output chromosomes in separate files"/> |
276 <param name="reads_per_bp" type="select" display="radio" label="Calculate the signal in each genomic window using"> | 283 <param name="reads_per_bp" type="select" display="radio" label="Calculate the signal in each genomic window using"> |
277 <option value="6" selected="true">mean</option> | 284 <option value="6" selected="true">mean</option> |
278 <option value="8">max</option> | 285 <option value="8">max</option> |
279 </param> | 286 </param> |
280 <param name="blacklist_input" type="data" format="bed" optional="True" multiple="True" label="Select file(s) containing regions to exclude"/> | 287 <param name="blacklist_input" type="data" format="bed" optional="True" multiple="True" label="Select file(s) containing regions to exclude"/> |
281 <param argument="-norm" type="boolean" truevalue="-norm" falsevalue="" checked="False" label="Standardize all datasets"/> | 288 <param name="norm" type="boolean" truevalue="true" falsevalue="" checked="False" label="Standardize all datasets"/> |
282 <param argument="-hp" type="boolean" truevalue="-hp" falsevalue="" checked="False" label="Discourage state transition across chromosomes"/> | 289 <param name="hp" type="boolean" truevalue="true" falsevalue="" checked="False" label="Discourage state transition across chromosomes"/> |
283 <param name="log2" type="float" value="0" min="0" label="Use log2(x+number) transformation" help="Zero means no log2 transformation"/> | 290 <param name="log2" type="float" value="0" min="0" label="Use log2(x+number) transformation" help="Zero means no log2 transformation"/> |
284 <param name="max_states" type="float" value="0" min="0" label="Maximum number of states to be inferred" help="Zero sets the maximum to a large number"/> | 291 <param name="max_states" type="float" value="0" min="0" label="Maximum number of states to be inferred" help="Zero sets the maximum to a large number"/> |
285 <param name="initial_states" type="integer" value="20" min="0" label="Initial number of states" help="Positive integer"/> | 292 <param name="initial_states" type="integer" value="20" min="0" label="Initial number of states" help="Positive integer"/> |
286 <param name="max_position_classes" type="integer" value="0" min="0" label="Maximum number of position classes to be inferred" help="Zero sets the maximum to a large number"/> | 293 <param name="max_position_classes" type="integer" value="0" min="0" label="Maximum number of position classes to be inferred" help="Zero sets the maximum to a large number"/> |
287 <param name="max_cell_type_clusters" type="integer" value="0" min="0" label="Maximum number of cell type clusters allowed" help="Zero sets the maximum to a large number"/> | 294 <param name="max_cell_type_clusters" type="integer" value="0" min="0" label="Maximum number of cell type clusters allowed" help="Zero sets the maximum to a large number"/> |
289 <param name="burnin_num" type="integer" value="20" min="1" label="Number of burnin steps"/> | 296 <param name="burnin_num" type="integer" value="20" min="1" label="Number of burnin steps"/> |
290 <param name="mcmc_num" type="integer" value="20" min="1" label="Number of maximization steps"/> | 297 <param name="mcmc_num" type="integer" value="20" min="1" label="Number of maximization steps"/> |
291 <param name="minerr" type="float" value="0.5" min="0" label="Minimum standard deviation for the emission Gaussian distribution" help="Zero value results in the default: 0.5"/> | 298 <param name="minerr" type="float" value="0.5" min="0" label="Minimum standard deviation for the emission Gaussian distribution" help="Zero value results in the default: 0.5"/> |
292 <param name="maxerr" type="float" value="1000000" min="0" label="Maximum standard deviation for the emission Gaussian distribution" help="Zero sets the maximum to a large number"/> | 299 <param name="maxerr" type="float" value="1000000" min="0" label="Maximum standard deviation for the emission Gaussian distribution" help="Zero sets the maximum to a large number"/> |
293 <param name="output_heatmaps" type="select" display="radio" label="Output heatmaps?"> | 300 <param name="output_heatmaps" type="select" display="radio" label="Output heatmaps?"> |
294 <option value="no" selected="true">No</option> | 301 <option value="yes" selected="true">Yes</option> |
295 <option value="yes">Yes</option> | 302 <option value="no">No</option> |
296 </param> | 303 </param> |
297 <param name="save_ideas_log" type="select" display="radio" label="Save IDEAS log in an additional history item"> | 304 <param name="save_ideas_log" type="select" display="radio" label="Save IDEAS log in an additional history item"> |
298 <option value="no" selected="true">No</option> | 305 <option value="no" selected="true">No</option> |
299 <option value="yes">Yes</option> | 306 <option value="yes">Yes</option> |
300 </param> | 307 </param> |