comparison wrapper.sh @ 42:1cf60ae234b4 draft

Uploaded
author davidvanzessen
date Tue, 28 Mar 2017 08:25:36 -0400
parents b8ac74723ab0
children 77a7ac76c7b9
comparison
equal deleted inserted replaced
41:b8ac74723ab0 42:1cf60ae234b4
185 echo "---------------- aa_histogram.r ----------------<br />" >> $log 185 echo "---------------- aa_histogram.r ----------------<br />" >> $log
186 186
187 Rscript $dir/aa_histogram.r $outdir/aa_id_mutations.txt $outdir/absent_aa_id.txt "IGA,IGG,IGM,IGE" $outdir/ 2>&1 187 Rscript $dir/aa_histogram.r $outdir/aa_id_mutations.txt $outdir/absent_aa_id.txt "IGA,IGG,IGM,IGE" $outdir/ 2>&1
188 if [ -e "$outdir/aa_histogram_.png" ]; then 188 if [ -e "$outdir/aa_histogram_.png" ]; then
189 mv $outdir/aa_histogram_.png $outdir/aa_histogram.png 189 mv $outdir/aa_histogram_.png $outdir/aa_histogram.png
190 mv $outdir/aa_histogram_.pdf $outdir/aa_histogram.pdf
190 mv $outdir/aa_histogram_.txt $outdir/aa_histogram.txt 191 mv $outdir/aa_histogram_.txt $outdir/aa_histogram.txt
191 mv $outdir/aa_histogram_absent_.txt $outdir/aa_histogram_absent.txt 192 mv $outdir/aa_histogram_absent_.txt $outdir/aa_histogram_absent.txt
192 mv $outdir/aa_histogram_count_.txt $outdir/aa_histogram_count.txt 193 mv $outdir/aa_histogram_count_.txt $outdir/aa_histogram_count.txt
193 mv $outdir/aa_histogram_sum_.txt $outdir/aa_histogram_sum.txt 194 mv $outdir/aa_histogram_sum_.txt $outdir/aa_histogram_sum.txt
194 fi 195 fi
295 fi 296 fi
296 echo "</table>" >> $output 297 echo "</table>" >> $output
297 #echo "<a href='data_${func}.txt'>Download data</a>" >> $output 298 #echo "<a href='data_${func}.txt'>Download data</a>" >> $output
298 done 299 done
299 300
300 echo "<img src='aid_motives.png' /><br />" >> $output 301 echo "<a href='aid_motives.pdf'><img src='aid_motives.png' /></a><br />" >> $output
301 echo "<img src='relative_mutations.png' /><br />" >> $output 302 echo "<a href='relative_mutations.pdf'><img src='relative_mutations.png' /></a><br />" >> $output
302 echo "<img src='abolute_mutations.png' /><br />" >> $output 303 echo "<a href='abolute_mutations.pdf'><img src='abolute_mutations.png' /></a><br />" >> $output
303 echo "<br />" >> $output 304 echo "<br />" >> $output
304 cat $dir/shm_overview.htm >> $output 305 cat $dir/shm_overview.htm >> $output
305 echo "</div>" >> $output #SHM overview tab end 306 echo "</div>" >> $output #SHM overview tab end
306 307
307 echo "---------------- images ----------------" 308 echo "---------------- images ----------------"
308 echo "---------------- images ----------------<br />" >> $log 309 echo "---------------- images ----------------<br />" >> $log
309 310
310 echo "<div class='tabbertab' title='SHM Frequency' style='width: 3000px;'>" >> $output 311 echo "<div class='tabbertab' title='SHM Frequency' style='width: 3000px;'></a>" >> $output
311 312
312 if [ -a $outdir/scatter.png ] 313 if [ -a $outdir/scatter.png ]
313 then 314 then
314 echo "<img src='scatter.png'/><br />" >> $output 315 echo "<a href='scatter.pdf'><img src='scatter.png'/><br />" >> $output
315 fi 316 fi
316 if [ -a $outdir/frequency_ranges.png ] 317 if [ -a $outdir/frequency_ranges.png ]
317 then 318 then
318 echo "<img src='frequency_ranges.png'/><br />" >> $output 319 echo "<a href='frequency_ranges.pdf'><img src='frequency_ranges.png'/></a><br />" >> $output
319 fi 320 fi
320 321
321 echo "<br />" >> $output 322 echo "<br />" >> $output
322 cat $dir/shm_frequency.htm >> $output 323 cat $dir/shm_frequency.htm >> $output
323 324
332 echo "<tr>" >> $output 333 echo "<tr>" >> $output
333 echo "<td><h1>${gene}</h1></td>" >> $output 334 echo "<td><h1>${gene}</h1></td>" >> $output
334 335
335 if [ -e $outdir/transitions_heatmap_${gene}.png ] 336 if [ -e $outdir/transitions_heatmap_${gene}.png ]
336 then 337 then
337 echo "<td><img src='transitions_heatmap_${gene}.png' /></td>" >> $output 338 echo "<td><a href='transitions_heatmap_${gene}.pdf'><img src='transitions_heatmap_${gene}.png' /></a></td>" >> $output
338 else 339 else
339 echo "<td></td>" >> $output 340 echo "<td></td>" >> $output
340 fi 341 fi
341 342
342 if [ -e $outdir/transitions_stacked_${gene}.png ] 343 if [ -e $outdir/transitions_stacked_${gene}.png ]
343 then 344 then
344 echo "<td><img src='transitions_stacked_${gene}.png' /></td>" >> $output 345 echo "<td><a href='transitions_stacked_${gene}.pdf'><img src='transitions_stacked_${gene}.png' /></a></td>" >> $output
345 else 346 else
346 echo "<td></td>" >> $output 347 echo "<td></td>" >> $output
347 fi 348 fi
348 349
349 echo "<td><table style='border-left-width: 1;' class='pure-table transition-table pure-table-bordered'>" >> $output 350 echo "<td><table style='border-left-width: 1;' class='pure-table transition-table pure-table-bordered'>" >> $output
363 echo "</tr>" >> $output 364 echo "</tr>" >> $output
364 done 365 done
365 366
366 echo "<tr>" >> $output 367 echo "<tr>" >> $output
367 echo "<td><h1>All</h1></td>" >> $output 368 echo "<td><h1>All</h1></td>" >> $output
368 echo "<td><img src='transitions_heatmap_all.png' /></td>" >> $output 369 echo "<td><a href='transitions_heatmap_all.pdf'><img src='transitions_heatmap_all.png' /></a></td>" >> $output
369 echo "<td><img src='transitions_stacked_all.png' /></td>" >> $output 370 echo "<td><a href='transitions_stacked_all.pdf'><img src='transitions_stacked_all.png' /></a></td>" >> $output
370 echo "<td><table style='border-left-width: 1;' class='pure-table transition-table pure-table-bordered'>" >> $output 371 echo "<td><table style='border-left-width: 1;' class='pure-table transition-table pure-table-bordered'>" >> $output
371 echo "<tr><td></td><td colspan="5"><center>To</center></td></tr>" >> $output 372 echo "<tr><td></td><td colspan="5"><center>To</center></td></tr>" >> $output
372 first="true" 373 first="true"
373 while IFS=, read from a c g t 374 while IFS=, read from a c g t
374 do 375 do
392 393
393 echo "<div class='tabbertab' title='Antigen Selection'>" >> $output 394 echo "<div class='tabbertab' title='Antigen Selection'>" >> $output
394 395
395 if [ -e $outdir/aa_histogram.png ] 396 if [ -e $outdir/aa_histogram.png ]
396 then 397 then
397 echo "<img src='aa_histogram.png'/><br />" >> $output 398 echo "<a href='aa_histogram.pdf'><img src='aa_histogram.png'/></a><br />" >> $output
398 fi 399 fi
399 400
400 if [ -e $outdir/aa_histogram_IGA.png ] 401 if [ -e $outdir/aa_histogram_IGA.png ]
401 then 402 then
402 echo "<img src='aa_histogram_IGA.png'/><br />" >> $output 403 echo "<a href='aa_histogram_IGA.pdf'><img src='aa_histogram_IGA.png'/></a><br />" >> $output
403 fi 404 fi
404 405
405 if [ -e $outdir/aa_histogram_IGG.png ] 406 if [ -e $outdir/aa_histogram_IGG.png ]
406 then 407 then
407 echo "<img src='aa_histogram_IGG.png'/><br />" >> $output 408 echo "<a href='aa_histogram_IGG.pdf'><img src='aa_histogram_IGG.png'/></a><br />" >> $output
408 fi 409 fi
409 410
410 if [ -e $outdir/aa_histogram_IGM.png ] 411 if [ -e $outdir/aa_histogram_IGM.png ]
411 then 412 then
412 echo "<img src='aa_histogram_IGM.png'/><br />" >> $output 413 echo "<a href='aa_histogram_IGM.pdf'><img src='aa_histogram_IGM.png'/></a><br />" >> $output
413 fi 414 fi
414 415
415 if [ -e $outdir/aa_histogram_IGE.png ] 416 if [ -e $outdir/aa_histogram_IGE.png ]
416 then 417 then
417 echo "<img src='aa_histogram_IGE.png'/><br />" >> $output 418 echo "<a href='aa_histogram_IGE.pdf'><img src='aa_histogram_IGE.png'/></a><br />" >> $output
418 fi 419 fi
419 420
420 421
421 422
422 if [[ "$fast" == "no" ]] ; then 423 if [[ "$fast" == "no" ]] ; then
519 520
520 echo "<div class='tabbertab' title='CSR'>" >> $output #CSR tab 521 echo "<div class='tabbertab' title='CSR'>" >> $output #CSR tab
521 522
522 if [ -e $outdir/IGA.png ] 523 if [ -e $outdir/IGA.png ]
523 then 524 then
524 echo "<img src='IGA.png'/><br />" >> $output 525 echo "<a href='IGA.pdf'><img src='IGA.png'/></a><br />" >> $output
525 fi 526 fi
526 if [ -e $outdir/IGG.png ] 527 if [ -e $outdir/IGG.png ]
527 then 528 then
528 echo "<img src='IGG.png'/><br />" >> $output 529 echo "<a href='IGG.pdf'><img src='IGG.png'/></a><br />" >> $output
529 fi 530 fi
530 531
531 echo "<br />" >> $output 532 echo "<br />" >> $output
532 cat $dir/shm_csr.htm >> $output 533 cat $dir/shm_csr.htm >> $output
533 534