comparison ideas_preprocessor.xml @ 8:860b59cae5df draft

Uploaded
author greg
date Wed, 24 Jan 2018 10:16:04 -0500
parents 6fe65d1379a8
children 26eb979cf8d9
comparison
equal deleted inserted replaced
7:92bb33490bb4 8:860b59cae5df
9 </requirements> 9 </requirements>
10 <command detect_errors="exit_code"><![CDATA[ 10 <command detect_errors="exit_code"><![CDATA[
11 #set tmp_dir = "tmp" 11 #set tmp_dir = "tmp"
12 #set ideaspre_input_config = "ideaspre_input_config.txt" 12 #set ideaspre_input_config = "ideaspre_input_config.txt"
13 #set ideas_input_config = "IDEAS_input_config.txt" 13 #set ideas_input_config = "IDEAS_input_config.txt"
14 #set specify_chrom_window = $specify_chrom_window_cond.specify_chrom_window 14 #set specify_genomic_window = $specify_genomic_window_cond.specify_genomic_window
15 mkdir $tmp_dir && 15 mkdir $tmp_dir &&
16 mkdir $output.files_path && 16 mkdir $output.files_path &&
17 #if str($specify_chrom_window) == "yes": 17 #if str($specify_genomic_window) == "yes":
18 ############################################## 18 ##############################################
19 ## Using a genomic window bed file, so categorize 19 ## Using a genomic window bed file, so categorize
20 ## the window positions by chromosome to enable 20 ## the window positions by chromosome to enable
21 ## the IDEAS -inv option. 21 ## the IDEAS -inv option.
22 ############################################## 22 ##############################################
28 ############################################## 28 ##############################################
29 cp '$gen_ideaspre_input_config' $ideaspre_input_config && 29 cp '$gen_ideaspre_input_config' $ideaspre_input_config &&
30 sort $ideaspre_input_config -o $ideaspre_input_config && 30 sort $ideaspre_input_config -o $ideaspre_input_config &&
31 Rscript '$__tool_directory__/ideas_preprocessor.R' 31 Rscript '$__tool_directory__/ideas_preprocessor.R'
32 --ideaspre_input_config '$ideaspre_input_config' 32 --ideaspre_input_config '$ideaspre_input_config'
33 #if str($specify_chrom_window) == "yes": 33 #if str($specify_genomic_window) == "yes":
34 --chrom_bed_input '$specify_chrom_window_cond.chrom_bed_input' 34 --ideas_input_config '$ideas_input_config'
35 --chromosome_windows '$chromosome_windows' 35 --chromosome_windows '$chromosome_windows'
36 --ideas_input_config '$ideas_input_config' 36 #end if
37 #if str($specify_genomic_window) == "yes":
38 --bed_input '$specify_genomic_window_cond.bed_input'
37 #else: 39 #else:
38 --chrom_len_file '$chromInfo' 40 --chrom_len_file '$chromInfo'
39 --window_size $specify_chrom_window_cond.window_size 41 --window_size $specify_genomic_window_cond.window_size
40 #set restrict_chromosomes = $specify_chrom_window_cond.restrict_chromosomes_cond.restrict_chromosomes 42 #set restrict_chromosomes = $specify_genomic_window_cond.restrict_chromosomes_cond.restrict_chromosomes
41 #if str($restrict_chromosomes) == "yes": 43 #if str($restrict_chromosomes) == "yes":
42 #set chroms = [] 44 #set chroms = []
43 #set chrom_repeat = $specify_chrom_window_cond.restrict_chromosomes_cond.chrom_repeat 45 #set chrom_repeat = $specify_genomic_window_cond.restrict_chromosomes_cond.chrom_repeat
44 #for $i in $chrom_repeat.chrom 46 #for $i in $chrom_repeat.chrom
45 $chroms.append($i) 47 $chroms.append($i)
46 #end for 48 #end for
47 --restrict_to_chroms ",".join(chroms) 49 --restrict_to_chroms ",".join(chroms)
48 #end if 50 #end if
82 #else: 84 #else:
83 #for $input_items in $cell_type_epigenetic_factor_cond.input_repeat: 85 #for $input_items in $cell_type_epigenetic_factor_cond.input_repeat:
84 ${input_items.cell_type_name} ${input_items.epigenetic_factor_name} ${input_items.input} ${file_name} ${input_items.input.ext} 86 ${input_items.cell_type_name} ${input_items.epigenetic_factor_name} ${input_items.input} ${file_name} ${input_items.input.ext}
85 #end for 87 #end for
86 #end if]]></configfile> 88 #end if]]></configfile>
87 <configfile name="gen_chromosome_windows"><![CDATA[#if str($specify_chrom_window_cond.specify_chrom_window) == "yes": 89 <configfile name="gen_chromosome_windows"><![CDATA[#if str($specify_genomic_window_cond.specify_genomic_window) == "yes":
88 #import collections 90 #import collections
89 #set window_positions_by_chroms_odict = $collections.OrderedDict() 91 #set window_positions_by_chroms_odict = $collections.OrderedDict()
90 #for count, line in enumerate(open($specify_chrom_window_cond.chrom_bed_input.file_name, 'r')): 92 #for count, line in enumerate(open($specify_genomic_window_cond.bed_input.file_name, 'r')):
91 #set $line = $line.strip() 93 #set $line = $line.strip()
92 #if not $line or $line.startswith('#'): 94 #if not $line or $line.startswith('#'):
93 #continue 95 #continue
94 #end if 96 #end if
95 #set items = $line.split('\t') 97 #set items = $line.split('\t')
135 <validator type="unspecified_build"/> 137 <validator type="unspecified_build"/>
136 </param> 138 </param>
137 </repeat> 139 </repeat>
138 </when> 140 </when>
139 </conditional> 141 </conditional>
140 <conditional name="specify_chrom_window_cond"> 142 <conditional name="specify_genomic_window_cond">
141 <param name="specify_chrom_window" type="select" label="Specify window positions using a bed file?"> 143 <param name="specify_genomic_window" type="select" label="Select Bed file that defines genomic windows on which to process the data">
142 <option value="no" selected="true">No</option> 144 <option value="no" selected="true">No</option>
143 <option value="yes">Yes</option> 145 <option value="yes">Yes</option>
144 </param> 146 </param>
145 <when value="no"> 147 <when value="no">
146 <param name="window_size" type="integer" value="200" label="Window size in base pairs"/> 148 <param name="window_size" type="integer" value="200" label="Window size in base pairs"/>
156 </repeat> 158 </repeat>
157 </when> 159 </when>
158 </conditional> 160 </conditional>
159 </when> 161 </when>
160 <when value="yes"> 162 <when value="yes">
161 <param name="chrom_bed_input" type="data" format="bed" label="Bed file specifying the window positions"/> 163 <param name="bed_input" type="data" format="bed" label="Bed file specifying the genomic windows"/>
162 </when> 164 </when>
163 </conditional> 165 </conditional>
164 <param argument="--bychr" type="boolean" truevalue="true" falsevalue="" checked="False" label="Output chromosomes in separate files"/> 166 <param argument="--bychr" type="boolean" truevalue="true" falsevalue="" checked="False" label="Output chromosomes in separate files"/>
165 <param name="reads_per_bp" type="select" display="radio" label="Calculate the signal in each genomic window using"> 167 <param name="reads_per_bp" type="select" display="radio" label="Calculate the signal in each genomic window using">
166 <option value="6" selected="true">mean</option> 168 <option value="6" selected="true">mean</option>