comparison ideas.xml @ 48:c9c90bfbeb20 draft

Uploaded
author greg
date Wed, 23 Aug 2017 14:07:10 -0400
parents 3a4697f71a05
children af8bf2b76697
comparison
equal deleted inserted replaced
47:3a4697f71a05 48:c9c90bfbeb20
17 ##mkdir -p $ideas_input_dir && 17 ##mkdir -p $ideas_input_dir &&
18 ############################################## 18 ##############################################
19 ## Create the config file and prepare the data 19 ## Create the config file and prepare the data
20 ############################################## 20 ##############################################
21 #set input_type = $input_type_cond.input_type 21 #set input_type = $input_type_cond.input_type
22 cp '$prep_input_config' 'prep_input_config.txt' &&
23 prepMat 22 prepMat
24 #if str($input_type) == 'datasets': 23 #if str($input_type) == 'datasets':
25 '$prep_input_config' 24 #set cell_type_epigenetic_factor_cond = $input_type_cond.cell_type_epigenetic_factor_cond
25 #set cell_type_epigenetic_factor = $cell_type_epigenetic_factor_cond.cell_type_epigenetic_factor
26 #if str($cell_type_epigenetic_factor) == 'extract':
27 '$extract_prep_input_config'
28 #else:
29 '$manual_prep_input_config'
30 #end if
26 #set specify_genomic_window_cond = $input_type_cond.specify_genomic_window_cond 31 #set specify_genomic_window_cond = $input_type_cond.specify_genomic_window_cond
27 #set specify_genomic_window = $specify_genomic_window_cond.specify_genomic_window 32 #set specify_genomic_window = $specify_genomic_window_cond.specify_genomic_window
28 #if str($specify_genomic_window) == 'yes': 33 #if str($specify_genomic_window) == 'yes':
29 -bed '$specify_genomic_window_cond.bed_input' 34 -bed '$specify_genomic_window_cond.bed_input'
30 #else: 35 #else:
49 $norm 54 $norm
50 ############################################## 55 ##############################################
51 ## Coerce the prepMat config output to the 56 ## Coerce the prepMat config output to the
52 ## format expected by the R matrix builder. 57 ## format expected by the R matrix builder.
53 ############################################## 58 ##############################################
54 && cut -d' ' $prep_input_config -f1,2 > file1.txt 59 && cut -d' ' $manual_prep_input_config -f1,2 > file1.txt
55 && ls tmp/*.bed.gz > file2.txt 60 && ls tmp/*.bed.gz > file2.txt
56 && paste <(cat file1.txt) <(cat file2.txt) > $prep_output_config 61 && paste <(cat file1.txt) <(cat file2.txt) > $prep_output_config
57 ############################################## 62 ##############################################
58 ## Build the R matrix from the prepMat output 63 ## Build the R matrix from the prepMat output
59 ############################################## 64 ##############################################
109 && mv ./*.para $output_para 114 && mv ./*.para $output_para
110 && mv ./*.profile $output_profile 115 && mv ./*.profile $output_profile
111 && mv ./*.state $output_state 116 && mv ./*.state $output_state
112 ]]></command> 117 ]]></command>
113 <configfiles> 118 <configfiles>
114 <configfile name="prep_input_config"><![CDATA[#for $input_items in $input_type_cond.input_repeat: 119 <configfile name="manual_prep_input_config"><![CDATA[
120 #for $input_items in $input_type_cond.input_repeat:
115 ${input_items.cell_type_name} ${input_items.epigenetic_factor_name} ${input_items.input} 121 ${input_items.cell_type_name} ${input_items.epigenetic_factor_name} ${input_items.input}
116 #end for ]]></configfile> 122 #end for]]></configfile>
123 <configfile name="extract_prep_input_config"><![CDATA[
124 #!/bin/bash
125 #set $cell_type_epigenetic_factor_cond=$input_type_cond.cell_type_epigenetic_factor_cond
126 #set $input_name_positions=$cell_type_epigenetic_factor_cond.input_name_positions
127 #for $i in $cell_type_epigenetic_factor_cond.input:
128 #set $file_path=$i.file_path
129 #set $file_name_with_ext="${file_path##*/}"
130 #set $file_name="${file_name_with_ext%%.*}"
131 #if $input_name_positions == "cell_first":
132 #set $cell_type_name="${file_name%-*}"
133 #set $epigenetic_factor_name="${file_name#*-}"
134 #else:
135 #set $cell_type_name="${file_name#*-}"
136 #set $epigenetic_factor_name="${file_name%-*}"
137 #end if
138 ${cell_type_name} ${epigenetic_factor_name} ${i}
139 #end for]]></configfile>
117 </configfiles> 140 </configfiles>
118 <inputs> 141 <inputs>
119 <conditional name="input_type_cond"> 142 <conditional name="input_type_cond">
120 <param name="input_type" type="select" label="Select input type"> 143 <param name="input_type" type="select" label="Select input type">
121 <option value="datasets" selected="true">Bam, BigWig files</option> 144 <option value="datasets" selected="true">Bam, BigWig files</option>
122 <option value="data_matrix">Data matrix</option> 145 <option value="data_matrix">Data matrix</option>
123 </param> 146 </param>
124 <when value="datasets"> 147 <when value="datasets">
125 <repeat name="input_repeat" title="Cell type, Epigenetic factor and Input" min="1"> 148 <conditional name="cell_type_epigenetic_factor_cond">
126 <param name="cell_type_name" type="text" value="" label="Cell type name"> 149 <param name="cell_type_epigenetic_factor" type="select" label="Set cell type and epigenetic factor names by">
127 <validator type="empty_field"/> 150 <option value="extract" selected="true">extracting them from the selected input file names</option>
151 <option value="manual">manually setting them for each selected input</option>
128 </param> 152 </param>
129 <param name="epigenetic_factor_name" type="text" value="" label="Epigenetic factor name"> 153 <when value="extract">
130 <validator type="empty_field"/> 154 <param name="input" type="data" format="bigwig,bam" multiple="True" label="BAM or BigWig file">
131 </param> 155 <validator type="empty_field"/>
132 <param name="input" type="data" format="bigwig,bam" label="BAM or BigWig file"> 156 <validator type="unspecified_build"/>
133 <validator type="empty_field"/> 157 </param>
134 <validator type="unspecified_build"/> 158 <param name="input_name_positions" type="select" display="radio" label="Selected input file name pattern is" help="A '-' character must separate cell type and epigenetic factor names within the selected input file names">
135 </param> 159 <option value="cell_first" selected="true">Cell type name - Epigenetic factor name</option>
136 </repeat> 160 <option value="cell_last">Epigenetic factor name - Cell type name</option>
161 </param>
162 </when>
163 <when value="manual">
164 <repeat name="input_repeat" title="Cell type, Epigenetic factor and Input" min="1">
165 <param name="cell_type_name" type="text" value="" label="Cell type name">
166 <validator type="empty_field"/>
167 </param>
168 <param name="epigenetic_factor_name" type="text" value="" label="Epigenetic factor name">
169 <validator type="empty_field"/>
170 </param>
171 <param name="input" type="data" format="bigwig,bam" label="BAM or BigWig file">
172 <validator type="empty_field"/>
173 <validator type="unspecified_build"/>
174 </param>
175 </repeat>
176 </when>
177 </conditional>
137 <conditional name="specify_genomic_window_cond"> 178 <conditional name="specify_genomic_window_cond">
138 <param name="specify_genomic_window" type="select" label="Select Bed file that defines genomic windows on which to process the data"> 179 <param name="specify_genomic_window" type="select" label="Select Bed file that defines genomic windows on which to process the data">
139 <option value="no" selected="true">No</option> 180 <option value="no" selected="true">No</option>
140 <option value="yes">Yes</option> 181 <option value="yes">Yes</option>
141 </param> 182 </param>