comparison wrapper.sh @ 23:0940835d259c draft

Uploaded
author davidvanzessen
date Tue, 24 Feb 2015 07:30:36 -0500
parents d980e2493657
children 5ab17bdf2530
comparison
equal deleted inserted replaced
22:b662fdc7eff4 23:0940835d259c
184 echo "<div class='tabbertab' title='Data frequency'>" >> "$html" 184 echo "<div class='tabbertab' title='Data frequency'>" >> "$html"
185 echo "<table><tr><td style='vertical-align:top;'>" >> "$html" 185 echo "<table><tr><td style='vertical-align:top;'>" >> "$html"
186 echo "<table border = 1 class='result_table summary_table' id='summary_table_${patient}_freq'>" >> "$html" 186 echo "<table border = 1 class='result_table summary_table' id='summary_table_${patient}_freq'>" >> "$html"
187 echo "<thead><th>Ig/TCR gene rearrangement type</th><th>Proximal gene segment</th><th>Distal gene segment</th><th>Cut off value</th><th>Number of sequences ${patient}_All</th><th>Number of sequences_$sample1</th><th>Number of sequences_$sample2</th><th>Number of sequences_$sample3</th><th>Number of sequences_${sample1}_${sample2}</th><th>Number of sequences_${sample1}_${sample3}</th><th>Number of sequences_${sample2}_${sample3}</th></thead>" >> "$html" 187 echo "<thead><th>Ig/TCR gene rearrangement type</th><th>Proximal gene segment</th><th>Distal gene segment</th><th>Cut off value</th><th>Number of sequences ${patient}_All</th><th>Number of sequences_$sample1</th><th>Number of sequences_$sample2</th><th>Number of sequences_$sample3</th><th>Number of sequences_${sample1}_${sample2}</th><th>Number of sequences_${sample1}_${sample3}</th><th>Number of sequences_${sample2}_${sample3}</th></thead>" >> "$html"
188 echo "<tbody>" >> "$html" 188 echo "<tbody>" >> "$html"
189 scatterplot_tab="<div class='tabbertab' title='Scatter Plots Frequency'>"
189 while read locus j_segment v_segment cut_off_value all one two three one_two one_three two_three 190 while read locus j_segment v_segment cut_off_value all one two three one_two one_three two_three
190 do 191 do
191 if [ "$locus" != "$oldLocus" ] ; then 192 if [ "$locus" != "$oldLocus" ] ; then
192 echo "<tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr>" >> "$html" 193 echo "<tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr>" >> "$html"
193 echo "<tr><td><b>$locus</b></td>" >> "$html" 194 echo "<tr><td><b>$locus</b></td>" >> "$html"
217 else 218 else
218 echo "<td>$three</td>" >> "$html" 219 echo "<td>$three</td>" >> "$html"
219 fi 220 fi
220 221
221 if [ "${one_two}" != "0" ] && [ "$cut_off_value" != "0" ] ; then 222 if [ "${one_two}" != "0" ] && [ "$cut_off_value" != "0" ] ; then
222 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${sample2}_${locus}_${cut_off_value}.txt\", \"$patient\", \"freq\")'>${one_two}</td>" >> "$html" 223 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${sample2}_${locus}_${cut_off_value}freq.txt\", \"$patient\", \"freq\")'>${one_two}</td>" >> "$html"
223 else 224 else
224 echo "<td>${one_two}</td>" >> "$html" 225 echo "<td>${one_two}</td>" >> "$html"
225 fi 226 fi
226 if [ "${one_three}" != "0" ] && [ "$cut_off_value" != "0" ] ; then 227 if [ "${one_three}" != "0" ] && [ "$cut_off_value" != "0" ] ; then
227 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${sample3}_${locus}_${cut_off_value}.txt\", \"$patient\", \"freq\")'>${one_three}</td>" >> "$html" 228 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${sample3}_${locus}_${cut_off_value}freq.txt\", \"$patient\", \"freq\")'>${one_three}</td>" >> "$html"
228 else 229 else
229 echo "<td>${one_three}</td>" >> "$html" 230 echo "<td>${one_three}</td>" >> "$html"
230 fi 231 fi
231 if [ "${two_three}" != "0" ] && [ "$cut_off_value" != "0" ] ; then 232 if [ "${two_three}" != "0" ] && [ "$cut_off_value" != "0" ] ; then
232 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample2}_${sample3}_${locus}_${cut_off_value}.txt\", \"$patient\", \"freq\")'>${two_three}</td>" >> "$html" 233 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample2}_${sample3}_${locus}_${cut_off_value}freq.txt\", \"$patient\", \"freq\")'>${two_three}</td>" >> "$html"
233 else 234 else
234 echo "<td>${two_three}</td>" >> "$html" 235 echo "<td>${two_three}</td>" >> "$html"
235 fi 236 fi
236 237
237 echo "</tr>" >> "$html" 238 echo "</tr>" >> "$html"
238 oldLocus="$locus" 239 oldLocus="$locus"
240 if [ "${cut_off_value}" == "0" ] ; then
241 scatterplot_tab="${scatterplot_tab}<img src='${sample1}_${sample2}_${sample3}_freq_${locus}_scatter.png' /><br />"
242 fi
239 done < tmp.txt 243 done < tmp.txt
240 echo "</tbody></table>" >> "$html" 244 echo "</tbody></table>" >> "$html"
241 echo "</td><td style='vertical-align:top;'><div id='result_div_${patient}_freq'></div></td></tr></table>" >> "$html" 245 echo "</td><td style='vertical-align:top;'><div id='result_div_${patient}_freq'></div></td></tr></table>" >> "$html"
242 echo "</div>" >> "$html" 246 echo "</div>" >> "$html"
243 echo "<div class='tabbertab' title='Graphs frequency'>" >> "$html" 247 echo "<div class='tabbertab' title='Graphs frequency'>" >> "$html"
244 echo "<a href='${patient}_freq_total_all.png'><img src='${patient}_freq_total_all.png' width='1280' height='720' /></a><br />" >> "$html" 248 echo "<a href='${patient}_freq_total_all.png'><img src='${patient}_freq_total_all.png' width='1280' height='720' /></a><br />" >> "$html"
245 echo "<a href='${patient}_freq_indiv_all.png'><img src='${patient}_freq_indiv_all.png' width='1280' height='720' /></a><br /></div>" >> "$html" 249 echo "<a href='${patient}_freq_indiv_all.png'><img src='${patient}_freq_indiv_all.png' width='1280' height='720' /></a><br /></div>" >> "$html"
250 echo "${scatterplot_tab}</div>" >> "$html"
246 251
247 tail -n+2 ${patient}_reads.txt | sed "s/>//" > tmp.txt 252 tail -n+2 ${patient}_reads.txt | sed "s/>//" > tmp.txt
248 echo "<div class='tabbertab' title='Data reads'>" >> "$html" 253 echo "<div class='tabbertab' title='Data reads'>" >> "$html"
249 echo "<table><tr><td style='vertical-align:top;'>" >> "$html" 254 echo "<table><tr><td style='vertical-align:top;'>" >> "$html"
250 echo "<table border = 1 class='result_table summary_table' id='summary_table_${patient}_reads'>" >> "$html" 255 echo "<table border = 1 class='result_table summary_table' id='summary_table_${patient}_reads'>" >> "$html"
251 echo "<thead><th>Ig/TCR gene rearrangement type</th><th>Proximal gene segment</th><th>Distal gene segment</th><th>Cut off value</th><th>Number of sequences ${patient}_All</th><th>Number of sequences_$sample1</th><th>Number of sequences_$sample2</th><th>Number of sequences_$sample3</th><th>Number of sequences_${sample1}_${sample2}</th><th>Number of sequences_${sample1}_${sample3}</th><th>Number of sequences_${sample2}_${sample3}</th></thead>" >> "$html" 256 echo "<thead><th>Ig/TCR gene rearrangement type</th><th>Proximal gene segment</th><th>Distal gene segment</th><th>Cut off value</th><th>Number of sequences ${patient}_All</th><th>Number of sequences_$sample1</th><th>Number of sequences_$sample2</th><th>Number of sequences_$sample3</th><th>Number of sequences_${sample1}_${sample2}</th><th>Number of sequences_${sample1}_${sample3}</th><th>Number of sequences_${sample2}_${sample3}</th></thead>" >> "$html"
252 echo "<tbody>" >> "$html" 257 echo "<tbody>" >> "$html"
258 scatterplot_tab="<div class='tabbertab' title='Scatter Plots Reads'>"
253 while read locus j_segment v_segment cut_off_value all one two three one_two one_three two_three 259 while read locus j_segment v_segment cut_off_value all one two three one_two one_three two_three
254 do 260 do
255 if [ "$locus" != "$oldLocus" ] ; then 261 if [ "$locus" != "$oldLocus" ] ; then
256 echo "<tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr>" >> "$html" 262 echo "<tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr>" >> "$html"
257 echo "<tr><td><b>$locus</b></td>" >> "$html" 263 echo "<tr><td><b>$locus</b></td>" >> "$html"
281 else 287 else
282 echo "<td>$three</td>" >> "$html" 288 echo "<td>$three</td>" >> "$html"
283 fi 289 fi
284 290
285 if [ "${one_two}" != "0" ] && [ "$cut_off_value" != "0" ] ; then 291 if [ "${one_two}" != "0" ] && [ "$cut_off_value" != "0" ] ; then
286 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${sample2}_${locus}_${cut_off_value}.txt\", \"$patient\", \"reads\")'>${one_two}</td>" >> "$html" 292 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${sample2}_${locus}_${cut_off_value}reads.txt\", \"$patient\", \"reads\")'>${one_two}</td>" >> "$html"
287 else 293 else
288 echo "<td>${one_two}</td>" >> "$html" 294 echo "<td>${one_two}</td>" >> "$html"
289 fi 295 fi
290 if [ "${one_three}" != "0" ] && [ "$cut_off_value" != "0" ] ; then 296 if [ "${one_three}" != "0" ] && [ "$cut_off_value" != "0" ] ; then
291 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${sample3}_${locus}_${cut_off_value}.txt\", \"$patient\", \"reads\")'>${one_three}</td>" >> "$html" 297 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${sample3}_${locus}_${cut_off_value}reads.txt\", \"$patient\", \"reads\")'>${one_three}</td>" >> "$html"
292 else 298 else
293 echo "<td>${one_three}</td>" >> "$html" 299 echo "<td>${one_three}</td>" >> "$html"
294 fi 300 fi
295 if [ "${two_three}" != "0" ] && [ "$cut_off_value" != "0" ] ; then 301 if [ "${two_three}" != "0" ] && [ "$cut_off_value" != "0" ] ; then
296 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample2}_${sample3}_${locus}_${cut_off_value}.txt\", \"$patient\", \"reads\")'>${two_three}</td>" >> "$html" 302 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample2}_${sample3}_${locus}_${cut_off_value}reads.txt\", \"$patient\", \"reads\")'>${two_three}</td>" >> "$html"
297 else 303 else
298 echo "<td>${two_three}</td>" >> "$html" 304 echo "<td>${two_three}</td>" >> "$html"
299 fi 305 fi
300 306
301 echo "</tr>" >> "$html" 307 echo "</tr>" >> "$html"
302 oldLocus="$locus" 308 oldLocus="$locus"
309 if [ "${cut_off_value}" == "0" ] ; then
310 scatterplot_tab="${scatterplot_tab}<img src='${sample1}_${sample2}_${sample3}_reads_${locus}_scatter.png' /><br />"
311 fi
303 done < tmp.txt 312 done < tmp.txt
304 echo "</tbody></table>" >> "$html" 313 echo "</tbody></table>" >> "$html"
305 echo "</td><td style='vertical-align:top;'><div id='result_div_${patient}_reads'></div></td></tr></table>" >> "$html" 314 echo "</td><td style='vertical-align:top;'><div id='result_div_${patient}_reads'></div></td></tr></table>" >> "$html"
306 echo "</div>" >> "$html" 315 echo "</div>" >> "$html"
307 echo "<div class='tabbertab' title='Graphs reads'>" >> "$html" 316 echo "<div class='tabbertab' title='Graphs reads'>" >> "$html"
308 echo "<a href='${patient}_reads_total_all.png'><img src='${patient}_reads_total_all.png' width='1280' height='720' /></a><br />" >> "$html" 317 echo "<a href='${patient}_reads_total_all.png'><img src='${patient}_reads_total_all.png' width='1280' height='720' /></a><br />" >> "$html"
309 echo "<a href='${patient}_reads_indiv_all.png'><img src='${patient}_reads_indiv_all.png' width='1280' height='720' /></a><br /></div>" >> "$html" 318 echo "<a href='${patient}_reads_indiv_all.png'><img src='${patient}_reads_indiv_all.png' width='1280' height='720' /></a><br /></div>" >> "$html"
319 echo "${scatterplot_tab}</div>" >> "$html"
310 echo "</div>" >> "$html" 320 echo "</div>" >> "$html"
311 echo "</div>" >> "$html" 321 echo "</div>" >> "$html"
312 echo "</html>" >> "$html" 322 echo "</html>" >> "$html"
313 done < triplets.txt 323 done < triplets.txt
314 rm tmp.txt 324 rm tmp.txt
317 html="index.html" 327 html="index.html"
318 328
319 echo "</table>" >> "$html" 329 echo "</table>" >> "$html"
320 echo "</html>" >> "$html" 330 echo "</html>" >> "$html"
321 331
332