comparison wrapper.sh @ 23:81453585dfc3 draft

Uploaded
author davidvanzessen
date Thu, 01 Dec 2016 09:32:06 -0500
parents c281993e515b
children ce25fb581ca3
comparison
equal deleted inserted replaced
22:0bea8c187a90 23:81453585dfc3
228 228
229 echo "---------------- main tables ----------------" 229 echo "---------------- main tables ----------------"
230 echo "---------------- main tables ----------------<br />" >> $log 230 echo "---------------- main tables ----------------<br />" >> $log
231 231
232 echo "<div class='tabber'>" >> $output 232 echo "<div class='tabber'>" >> $output
233 echo "<div class='tabbertab' title='SHM Overview'>" >> $output 233 echo "<div class='tabbertab' title='SHM Overview' style='width: 3000px;'>" >> $output
234 234
235 for func in ${funcs[@]} 235 for func in ${funcs[@]}
236 do 236 do
237 237
238 echo "---------------- $func table ----------------" 238 echo "---------------- $func table ----------------"
241 cat $outdir/mutations_${func}.txt $outdir/hotspot_analysis_${func}.txt > $outdir/data_${func}.txt 241 cat $outdir/mutations_${func}.txt $outdir/hotspot_analysis_${func}.txt > $outdir/data_${func}.txt
242 242
243 echo "---------------- pattern_plots.r ----------------" 243 echo "---------------- pattern_plots.r ----------------"
244 echo "---------------- pattern_plots.r ----------------<br />" >> $log 244 echo "---------------- pattern_plots.r ----------------<br />" >> $log
245 245
246 Rscript $dir/pattern_plots.r $outdir/data_${func}.txt $outdir/plot1 $outdir/plot2 $outdir/plot3 2>&1 246 Rscript $dir/pattern_plots.r $outdir/data_${func}.txt $outdir/plot1 $outdir/plot2 $outdir/plot3 $outdir/shm_overview.txt 2>&1
247 247
248 echo "<table class='pure-table pure-table-striped'>" >> $output 248 echo "<table class='pure-table pure-table-striped'>" >> $output
249 echo "<thead><tr><th>info</th>" >> $output 249 echo "<thead><tr><th>info</th>" >> $output
250 250
251 if [ "${class_filter}" != "101_101" ] ; then 251 if [ "${class_filter}" != "101_101" ] ; then
299 echo "</div>" >> $output #SHM overview tab end 299 echo "</div>" >> $output #SHM overview tab end
300 300
301 echo "---------------- images ----------------" 301 echo "---------------- images ----------------"
302 echo "---------------- images ----------------<br />" >> $log 302 echo "---------------- images ----------------<br />" >> $log
303 303
304 echo "<div class='tabbertab' title='SHM Frequency'>" >> $output 304 echo "<div class='tabbertab' title='SHM Frequency' style='width: 3000px;'>" >> $output
305 305
306 if [ -a $outdir/scatter.png ] 306 if [ -a $outdir/scatter.png ]
307 then 307 then
308 echo "<img src='scatter.png'/><br />" >> $output 308 echo "<img src='scatter.png'/><br />" >> $output
309 fi 309 fi
312 echo "<img src='frequency_ranges.png'/><br />" >> $output 312 echo "<img src='frequency_ranges.png'/><br />" >> $output
313 fi 313 fi
314 314
315 echo "</div>" >> $output #SHM frequency tab end 315 echo "</div>" >> $output #SHM frequency tab end
316 316
317 echo "<div class='tabbertab' title='Transition tables'>" >> $output 317 echo "<div class='tabbertab' title='Transition tables' style='width: 3000px;'>" >> $output
318 318
319 echo "<table border='0'>" >> $output 319 echo "<table border='0'>" >> $output
320 320
321 for gene in ${genes[@]} 321 for gene in ${genes[@]}
322 do 322 do
323 echo "<tr>" >> $output 323 echo "<tr>" >> $output
324 echo "<td><h1>${gene}</h1></td>" >> $output 324 echo "<td><h1>${gene}</h1></td>" >> $output
325 echo "<td><img src='transitions_heatmap_${gene}.png' /></td>" >> $output 325
326 echo "<td><img src='transitions_stacked_${gene}.png' /></td>" >> $output 326 if [ -e $outdir/transitions_heatmap_${gene}.png ]
327 then
328 echo "<td><img src='transitions_heatmap_${gene}.png' /></td>" >> $output
329 else
330 echo "<td></td>" >> $output
331 fi
332
333 if [ -e $outdir/transitions_stacked_${gene}.png ]
334 then
335 echo "<td><img src='transitions_stacked_${gene}.png' /></td>" >> $output
336 else
337 echo "<td></td>" >> $output
338 fi
339
327 echo "<td><table style='border-left-width: 1;' class='pure-table transition-table pure-table-bordered'>" >> $output 340 echo "<td><table style='border-left-width: 1;' class='pure-table transition-table pure-table-bordered'>" >> $output
328 echo "<tr><td></td><td colspan="5"><center>To</center></td></tr>" >> $output 341 echo "<tr><td></td><td colspan="5"><center>To</center></td></tr>" >> $output
329 first="true" 342 first="true"
330 while IFS=, read from a c g t 343 while IFS=, read from a c g t
331 do 344 do
365 378
366 echo "</div>" >> $output #transition tables tab end 379 echo "</div>" >> $output #transition tables tab end
367 380
368 echo "<div class='tabbertab' title='Antigen Selection'>" >> $output 381 echo "<div class='tabbertab' title='Antigen Selection'>" >> $output
369 382
370 if [ -a $outdir/aa_histogram.png ] 383 if [ -e $outdir/aa_histogram.png ]
371 then 384 then
372 echo "<img src='aa_histogram.png'/><br />" >> $output 385 echo "<img src='aa_histogram.png'/><br />" >> $output
386 fi
387
388 if [ -e $outdir/aa_histogram_IGA.png ]
389 then
373 echo "<img src='aa_histogram_IGA.png'/><br />" >> $output 390 echo "<img src='aa_histogram_IGA.png'/><br />" >> $output
391 fi
392
393 if [ -e $outdir/aa_histogram_IGG.png ]
394 then
374 echo "<img src='aa_histogram_IGG.png'/><br />" >> $output 395 echo "<img src='aa_histogram_IGG.png'/><br />" >> $output
396 fi
397
398 if [ -e $outdir/aa_histogram_IGM.png ]
399 then
375 echo "<img src='aa_histogram_IGM.png'/><br />" >> $output 400 echo "<img src='aa_histogram_IGM.png'/><br />" >> $output
401 fi
402
403 if [ -e $outdir/aa_histogram_IGE.png ]
404 then
376 echo "<img src='aa_histogram_IGE.png'/><br />" >> $output 405 echo "<img src='aa_histogram_IGE.png'/><br />" >> $output
377 fi 406 fi
378 407
379 echo "<embed src='baseline.pdf' width='700px' height='1000px'>" >> $output 408
380 echo "<embed src='baseline_IGA.pdf' width='700px' height='1000px'>" >> $output 409 if [ -e $outdir/baseline.png ]
381 echo "<embed src='baseline_IGG.pdf' width='700px' height='1000px'>" >> $output 410 then
382 echo "<embed src='baseline_IGM.pdf' width='700px' height='1000px'>" >> $output 411 echo "<embed src='baseline.pdf' width='700px' height='1000px'>" >> $output
383 echo "<embed src='baseline_IGE.pdf' width='700px' height='1000px'>" >> $output 412 fi
413
414 if [ -e $outdir/baseline_IGA.png ]
415 then
416 echo "<embed src='baseline_IGA.pdf' width='700px' height='1000px'>" >> $output
417 fi
418
419 if [ -e $outdir/baseline_IGG.png ]
420 then
421 echo "<embed src='baseline_IGG.pdf' width='700px' height='1000px'>" >> $output
422 fi
423
424 if [ -e $outdir/baseline_IGM.png ]
425 then
426 echo "<embed src='baseline_IGM.pdf' width='700px' height='1000px'>" >> $output
427 fi
428
429 if [ -e $outdir/baseline_IGE.png ]
430 then
431 echo "<embed src='baseline_IGE.pdf' width='700px' height='1000px'>" >> $output
432 fi
384 433
385 echo "</div>" >> $output #antigen selection tab end 434 echo "</div>" >> $output #antigen selection tab end
386 435
387 echo "<div class='tabbertab' title='CSR'>" >> $output #CSR tab 436 echo "<div class='tabbertab' title='CSR'>" >> $output #CSR tab
388 437
389 if [ -a $outdir/IGA.png ] 438 if [ -e $outdir/IGA.png ]
390 then 439 then
391 echo "<img src='IGA.png'/><br />" >> $output 440 echo "<img src='IGA.png'/><br />" >> $output
392 fi 441 fi
393 if [ -a $outdir/IGG.png ] 442 if [ -e $outdir/IGG.png ]
394 then 443 then
395 echo "<img src='IGG.png'/><br />" >> $output 444 echo "<img src='IGG.png'/><br />" >> $output
396 fi 445 fi
397 446
398 echo "</div>" >> $output #CSR tab end 447 echo "</div>" >> $output #CSR tab end
490 539
491 echo "<div class='tabbertab' title='IGE'>" >> $output 540 echo "<div class='tabbertab' title='IGE'>" >> $output
492 clonality_table $outdir/change_o/change-o-defined_clones-summary-IGM.txt $output 541 clonality_table $outdir/change_o/change-o-defined_clones-summary-IGM.txt $output
493 echo "</div>" >> $output 542 echo "</div>" >> $output
494 543
495 echo "<div class='tabbertab' title='Overview'>" >> $output 544 echo "<div class='tabbertab' title='Overlap'>" >> $output
496 cat "$outdir/sequence_overview/index.html" >> $output 545 cat "$outdir/sequence_overview/index.html" >> $output
497 echo "</div>" >> $output 546 echo "</div>" >> $output
498 547
499 548
500 echo "</div>" >> $output #clonality tabber end 549 echo "</div>" >> $output #clonality tabber end
510 echo "<tr><td>The complete dataset</td><td><a href='merged.txt' download='merged.txt' >Download</a></td></tr>" >> $output 559 echo "<tr><td>The complete dataset</td><td><a href='merged.txt' download='merged.txt' >Download</a></td></tr>" >> $output
511 echo "<tr><td>The filtered dataset</td><td><a href='filtered.txt' download='filtered.txt' >Download</a></td></tr>" >> $output 560 echo "<tr><td>The filtered dataset</td><td><a href='filtered.txt' download='filtered.txt' >Download</a></td></tr>" >> $output
512 echo "<tr><td>The alignment info on the unmatched sequences</td><td><a href='unmatched.txt' download='unmatched.txt' >Download</a></td></tr>" >> $output 561 echo "<tr><td>The alignment info on the unmatched sequences</td><td><a href='unmatched.txt' download='unmatched.txt' >Download</a></td></tr>" >> $output
513 562
514 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>SHM Overview</td></tr>" >> $output 563 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>SHM Overview</td></tr>" >> $output
515 echo "<tr><td>The SHM Overview table as a dataset</td><td><a href='data_sum.txt' download='data_sum.txt' >Download</a></td></tr>" >> $output 564 echo "<tr><td>The SHM Overview table as a dataset</td><td><a href='shm_overview.txt' download='shm_overview.txt' >Download</a></td></tr>" >> $output
516 echo "<tr><td>Motif data per sequence ID</td><td><a href='motif_per_seq.txt' download='motif_per_seq.txt' >Download</a></td></tr>" >> $output 565 echo "<tr><td>Motif data per sequence ID</td><td><a href='motif_per_seq.txt' download='motif_per_seq.txt' >Download</a></td></tr>" >> $output
517 echo "<tr><td>Mutation data per sequence ID</td><td><a href='mutation_by_id.txt' download='mutation_by_id.txt' >Download</a></td></tr>" >> $output 566 echo "<tr><td>Mutation data per sequence ID</td><td><a href='mutation_by_id.txt' download='mutation_by_id.txt' >Download</a></td></tr>" >> $output
518 echo "<tr><td>Base count for every sequence</td><td><a href='base_overview.html'>View</a></td></tr>" >> $output 567 echo "<tr><td>Base count for every sequence</td><td><a href='base_overview.html'>View</a></td></tr>" >> $output
519 echo "<tr><td>The data used to generate the RGYW/WRCY and TW/WA plot</td><td><a href='plot1.txt' download='plot1.txt' >Download</a></td></tr>" >> $output 568 echo "<tr><td>The data used to generate the RGYW/WRCY and TW/WA plot</td><td><a href='plot1.txt' download='plot1.txt' >Download</a></td></tr>" >> $output
520 echo "<tr><td>The data used to generate the relative transition and transversion plot</td><td><a href='plot2.txt' download='plot2.txt' >Download</a></td></tr>" >> $output 569 echo "<tr><td>The data used to generate the relative transition and transversion plot</td><td><a href='plot2.txt' download='plot2.txt' >Download</a></td></tr>" >> $output
524 echo "<tr><td>The data generate the frequency scatter plot</td><td><a href='scatter.txt' download='scatter.txt' >Download</a></td></tr>" >> $output 573 echo "<tr><td>The data generate the frequency scatter plot</td><td><a href='scatter.txt' download='scatter.txt' >Download</a></td></tr>" >> $output
525 echo "<tr><td>The data used to generate the frequency by class plot</td><td><a href='frequency_ranges_classes.txt' download='frequency_ranges_classes.txt' >Download</a></td></tr>" >> $output 574 echo "<tr><td>The data used to generate the frequency by class plot</td><td><a href='frequency_ranges_classes.txt' download='frequency_ranges_classes.txt' >Download</a></td></tr>" >> $output
526 echo "<tr><td>The data for frequency by subclass</td><td><a href='frequency_ranges_subclasses.txt' download='frequency_ranges_subclasses.txt' >Download</a></td></tr>" >> $output 575 echo "<tr><td>The data for frequency by subclass</td><td><a href='frequency_ranges_subclasses.txt' download='frequency_ranges_subclasses.txt' >Download</a></td></tr>" >> $output
527 576
528 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>Transition Tables</td></tr>" >> $output 577 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>Transition Tables</td></tr>" >> $output
529 echo "<tr><td>The data for the 'all' transition plot</td><td><a href='transition_all_sum.txt' download='transition_all_sum.txt' >Download</a></td></tr>" >> $output 578 echo "<tr><td>The data for the 'all' transition plot</td><td><a href='transitions_all_sum.txt' download='transitions_all_sum.txt' >Download</a></td></tr>" >> $output
530 echo "<tr><td>The data for the 'IGA' transition plot</td><td><a href='transition_IGA_sum.txt' download='transition_all_sum.txt' >Download</a></td></tr>" >> $output 579 echo "<tr><td>The data for the 'IGA' transition plot</td><td><a href='transitions_IGA_sum.txt' download='transitions_all_sum.txt' >Download</a></td></tr>" >> $output
531 echo "<tr><td>The data for the 'IGA1' transition plot</td><td><a href='transition_IGA1_sum.txt' download='transition_IGA1_sum.txt' >Download</a></td></tr>" >> $output 580 echo "<tr><td>The data for the 'IGA1' transition plot</td><td><a href='transitions_IGA1_sum.txt' download='transitions_IGA1_sum.txt' >Download</a></td></tr>" >> $output
532 echo "<tr><td>The data for the 'IGA1' transition plot</td><td><a href='transition_IGA1_sum.txt' download='transition_IGA1_sum.txt' >Download</a></td></tr>" >> $output 581 echo "<tr><td>The data for the 'IGA1' transition plot</td><td><a href='transitions_IGA1_sum.txt' download='transitions_IGA1_sum.txt' >Download</a></td></tr>" >> $output
533 echo "<tr><td>The data for the 'IGG' transition plot</td><td><a href='transition_IGG_sum.txt' download='transition_IGG_sum.txt' >Download</a></td></tr>" >> $output 582 echo "<tr><td>The data for the 'IGG' transition plot</td><td><a href='transitions_IGG_sum.txt' download='transitions_IGG_sum.txt' >Download</a></td></tr>" >> $output
534 echo "<tr><td>The data for the 'IGG1' transition plot</td><td><a href='transition_IGG1_sum.txt' download='transition_IGG1_sum.txt' >Download</a></td></tr>" >> $output 583 echo "<tr><td>The data for the 'IGG1' transition plot</td><td><a href='transitions_IGG1_sum.txt' download='transitions_IGG1_sum.txt' >Download</a></td></tr>" >> $output
535 echo "<tr><td>The data for the 'IGG2' transition plot</td><td><a href='transition_IGG2_sum.txt' download='transition_IGG2_sum.txt' >Download</a></td></tr>" >> $output 584 echo "<tr><td>The data for the 'IGG2' transition plot</td><td><a href='transitions_IGG2_sum.txt' download='transitions_IGG2_sum.txt' >Download</a></td></tr>" >> $output
536 echo "<tr><td>The data for the 'IGG3' transition plot</td><td><a href='transition_IGG3_sum.txt' download='transition_IGG3_sum.txt' >Download</a></td></tr>" >> $output 585 echo "<tr><td>The data for the 'IGG3' transition plot</td><td><a href='transitions_IGG3_sum.txt' download='transitions_IGG3_sum.txt' >Download</a></td></tr>" >> $output
537 echo "<tr><td>The data for the 'IGG4' transition plot</td><td><a href='transition_IGG4_sum.txt' download='transition_IGG4_sum.txt' >Download</a></td></tr>" >> $output 586 echo "<tr><td>The data for the 'IGG4' transition plot</td><td><a href='transitions_IGG4_sum.txt' download='transitions_IGG4_sum.txt' >Download</a></td></tr>" >> $output
538 echo "<tr><td>The data for the 'IGM' transition plot</td><td><a href='transition_IGM_sum.txt' download='transition_IGM_sum.txt' >Download</a></td></tr>" >> $output 587 echo "<tr><td>The data for the 'IGM' transition plot</td><td><a href='transitions_IGM_sum.txt' download='transitions_IGM_sum.txt' >Download</a></td></tr>" >> $output
539 echo "<tr><td>The data for the 'IGE' transition plot</td><td><a href='transition_IGE_sum.txt' download='transition_IGE_sum.txt' >Download</a></td></tr>" >> $output 588 echo "<tr><td>The data for the 'IGE' transition plot</td><td><a href='transitions_IGE_sum.txt' download='transitions_IGE_sum.txt' >Download</a></td></tr>" >> $output
540 589
541 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>Antigen Selection</td></tr>" >> $output 590 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>Antigen Selection</td></tr>" >> $output
542 echo "<tr><td>AA mutation data per sequence ID</td><td><a href='aa_id_mutations.txt' download='aa_id_mutations.txt' >Download</a></td></tr>" >> $output 591 echo "<tr><td>AA mutation data per sequence ID</td><td><a href='aa_id_mutations.txt' download='aa_id_mutations.txt' >Download</a></td></tr>" >> $output
543 echo "<tr><td>Absent AA location data per sequence ID</td><td><a href='absent_aa_id.txt' download='absent_aa_id.txt' >Download</a></td></tr>" >> $output 592 echo "<tr><td>Absent AA location data per sequence ID</td><td><a href='absent_aa_id.txt' download='absent_aa_id.txt' >Download</a></td></tr>" >> $output
544 593