Mercurial > repos > davidvanzessen > shm_csr
comparison wrapper.sh @ 6:2ddb9a21f635 draft
Uploaded
author | davidvanzessen |
---|---|
date | Tue, 01 Nov 2016 10:48:38 -0400 |
parents | 012a738edf5a |
children | ad9be244b104 |
comparison
equal
deleted
inserted
replaced
5:012a738edf5a | 6:2ddb9a21f635 |
---|---|
11 functionality=$7 | 11 functionality=$7 |
12 unique=$8 | 12 unique=$8 |
13 naive_output_ca=$9 | 13 naive_output_ca=$9 |
14 naive_output_cg=${10} | 14 naive_output_cg=${10} |
15 naive_output_cm=${11} | 15 naive_output_cm=${11} |
16 filter_unique=${12} | 16 naive_output_ce=${12} |
17 class_filter=${13} | 17 filter_unique=${13} |
18 empty_region_filter=${14} | 18 class_filter=${14} |
19 fast=${15} | 19 empty_region_filter=${15} |
20 fast=${16} | |
20 mkdir $outdir | 21 mkdir $outdir |
21 | 22 |
22 tar -xzf $dir/style.tar.gz -C $outdir | 23 tar -xzf $dir/style.tar.gz -C $outdir |
23 | 24 |
24 echo "---------------- read parameters ----------------" | 25 echo "---------------- read parameters ----------------" |
369 then | 370 then |
370 echo "<img src='aa_histogram.png'/><br />" >> $output | 371 echo "<img src='aa_histogram.png'/><br />" >> $output |
371 echo "<img src='aa_histogram_IGA.png'/><br />" >> $output | 372 echo "<img src='aa_histogram_IGA.png'/><br />" >> $output |
372 echo "<img src='aa_histogram_IGG.png'/><br />" >> $output | 373 echo "<img src='aa_histogram_IGG.png'/><br />" >> $output |
373 echo "<img src='aa_histogram_IGM.png'/><br />" >> $output | 374 echo "<img src='aa_histogram_IGM.png'/><br />" >> $output |
375 echo "<img src='aa_histogram_IGE.png'/><br />" >> $output | |
374 fi | 376 fi |
375 | 377 |
376 echo "<embed src='baseline.pdf' width='700px' height='1000px'>" >> $output | 378 echo "<embed src='baseline.pdf' width='700px' height='1000px'>" >> $output |
377 echo "<embed src='baseline_IGA.pdf' width='700px' height='1000px'>" >> $output | 379 echo "<embed src='baseline_IGA.pdf' width='700px' height='1000px'>" >> $output |
378 echo "<embed src='baseline_IGG.pdf' width='700px' height='1000px'>" >> $output | 380 echo "<embed src='baseline_IGG.pdf' width='700px' height='1000px'>" >> $output |
379 echo "<embed src='baseline_IGM.pdf' width='700px' height='1000px'>" >> $output | 381 echo "<embed src='baseline_IGM.pdf' width='700px' height='1000px'>" >> $output |
382 echo "<embed src='baseline_IGE.pdf' width='700px' height='1000px'>" >> $output | |
380 | 383 |
381 echo "</div>" >> $output #antigen selection tab end | 384 echo "</div>" >> $output #antigen selection tab end |
382 | 385 |
383 echo "<div class='tabbertab' title='CSR'>" >> $output #CSR tab | 386 echo "<div class='tabbertab' title='CSR'>" >> $output #CSR tab |
384 | 387 |
430 bash $dir/change_o/makedb.sh $outdir/new_IMGT_IGM.txz false false false $outdir/change_o/change-o-db-IGM.txt | 433 bash $dir/change_o/makedb.sh $outdir/new_IMGT_IGM.txz false false false $outdir/change_o/change-o-db-IGM.txt |
431 bash $dir/change_o/define_clones.sh bygroup $outdir/change_o/change-o-db-IGM.txt gene first ham none min complete 3.0 $outdir/change_o/change-o-db-defined_clones-IGM.txt $outdir/change_o/change-o-defined_clones-summary-IGM.txt | 434 bash $dir/change_o/define_clones.sh bygroup $outdir/change_o/change-o-db-IGM.txt gene first ham none min complete 3.0 $outdir/change_o/change-o-db-defined_clones-IGM.txt $outdir/change_o/change-o-defined_clones-summary-IGM.txt |
432 else | 435 else |
433 echo "No IGM sequences" > "$outdir/change_o/change-o-db-defined_clones-IGM.txt" | 436 echo "No IGM sequences" > "$outdir/change_o/change-o-db-defined_clones-IGM.txt" |
434 echo "No IGM sequences" > "$outdir/change_o/change-o-defined_clones-summary-IGM.txt" | 437 echo "No IGM sequences" > "$outdir/change_o/change-o-defined_clones-summary-IGM.txt" |
438 fi | |
439 | |
440 if [[ $(wc -l < $outdir/new_IMGT_IGE/1_Summary.txt) -gt "1" ]]; then | |
441 bash $dir/change_o/makedb.sh $outdir/new_IMGT_IGE.txz false false false $outdir/change_o/change-o-db-IGE.txt | |
442 bash $dir/change_o/define_clones.sh bygroup $outdir/change_o/change-o-db-IGE.txt gene first ham none min complete 3.0 $outdir/change_o/change-o-db-defined_clones-IGE.txt $outdir/change_o/change-o-defined_clones-summary-IGE.txt | |
443 else | |
444 echo "No IGE sequences" > "$outdir/change_o/change-o-db-defined_clones-IGE.txt" | |
445 echo "No IGE sequences" > "$outdir/change_o/change-o-defined_clones-summary-IGE.txt" | |
435 fi | 446 fi |
436 | 447 |
437 PWD="$tmp" | 448 PWD="$tmp" |
438 | 449 |
439 echo "<div class='tabbertab' title='Clonality'>" >> $output #clonality tab | 450 echo "<div class='tabbertab' title='Clonality'>" >> $output #clonality tab |
462 | 473 |
463 echo "<div class='tabbertab' title='All'>" >> $output | 474 echo "<div class='tabbertab' title='All'>" >> $output |
464 clonality_table $outdir/change_o/change-o-defined_clones-summary.txt $output | 475 clonality_table $outdir/change_o/change-o-defined_clones-summary.txt $output |
465 echo "</div>" >> $output | 476 echo "</div>" >> $output |
466 | 477 |
467 echo "<div class='tabbertab' title='Ca'>" >> $output | 478 echo "<div class='tabbertab' title='IGA'>" >> $output |
468 clonality_table $outdir/change_o/change-o-defined_clones-summary-IGA.txt $output | 479 clonality_table $outdir/change_o/change-o-defined_clones-summary-IGA.txt $output |
469 echo "</div>" >> $output | 480 echo "</div>" >> $output |
470 | 481 |
471 echo "<div class='tabbertab' title='Cg'>" >> $output | 482 echo "<div class='tabbertab' title='IGG'>" >> $output |
472 clonality_table $outdir/change_o/change-o-defined_clones-summary-IGG.txt $output | 483 clonality_table $outdir/change_o/change-o-defined_clones-summary-IGG.txt $output |
473 echo "</div>" >> $output | 484 echo "</div>" >> $output |
474 | 485 |
475 echo "<div class='tabbertab' title='Cm'>" >> $output | 486 echo "<div class='tabbertab' title='IGM'>" >> $output |
487 clonality_table $outdir/change_o/change-o-defined_clones-summary-IGM.txt $output | |
488 echo "</div>" >> $output | |
489 | |
490 echo "<div class='tabbertab' title='IGE'>" >> $output | |
476 clonality_table $outdir/change_o/change-o-defined_clones-summary-IGM.txt $output | 491 clonality_table $outdir/change_o/change-o-defined_clones-summary-IGM.txt $output |
477 echo "</div>" >> $output | 492 echo "</div>" >> $output |
478 | 493 |
479 echo "<div class='tabbertab' title='Overview'>" >> $output | 494 echo "<div class='tabbertab' title='Overview'>" >> $output |
480 cat "$outdir/sequence_overview/index.html" >> $output | 495 cat "$outdir/sequence_overview/index.html" >> $output |
518 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 | 533 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 |
519 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 | 534 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 |
520 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 | 535 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 |
521 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 | 536 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 |
522 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 | 537 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 |
538 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 | |
523 | 539 |
524 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>Antigen Selection</td></tr>" >> $output | 540 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>Antigen Selection</td></tr>" >> $output |
525 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 | 541 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 |
526 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 | 542 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 |
527 | 543 |
531 echo "<tr><td>Baseline IGA data</td><td><a href='baseline_IGA.txt' download='baseline_IGA.txt' >Download</a></td></tr>" >> $output | 547 echo "<tr><td>Baseline IGA data</td><td><a href='baseline_IGA.txt' download='baseline_IGA.txt' >Download</a></td></tr>" >> $output |
532 echo "<tr><td>Baseline IGG PDF</td><td><a href='baseline_IGG.pdf' download='baseline_IGG.pdf' >Download</a></td></tr>" >> $output | 548 echo "<tr><td>Baseline IGG PDF</td><td><a href='baseline_IGG.pdf' download='baseline_IGG.pdf' >Download</a></td></tr>" >> $output |
533 echo "<tr><td>Baseline IGG data</td><td><a href='baseline_IGG.txt' download='baseline_IGG.txt' >Download</a></td></tr>" >> $output | 549 echo "<tr><td>Baseline IGG data</td><td><a href='baseline_IGG.txt' download='baseline_IGG.txt' >Download</a></td></tr>" >> $output |
534 echo "<tr><td>Baseline IGM PDF</td><td><a href='baseline_IGM.pdf' download='baseline_IGM.pdf' >Download</a></td></tr>" >> $output | 550 echo "<tr><td>Baseline IGM PDF</td><td><a href='baseline_IGM.pdf' download='baseline_IGM.pdf' >Download</a></td></tr>" >> $output |
535 echo "<tr><td>Baseline IGM data</td><td><a href='baseline_IGM.txt' download='baseline_IGM.txt' >Download</a></td></tr>" >> $output | 551 echo "<tr><td>Baseline IGM data</td><td><a href='baseline_IGM.txt' download='baseline_IGM.txt' >Download</a></td></tr>" >> $output |
552 echo "<tr><td>Baseline IGE data</td><td><a href='baseline_IGE.txt' download='baseline_IGE.txt' >Download</a></td></tr>" >> $output | |
536 | 553 |
537 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>CSR</td></tr>" >> $output | 554 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>CSR</td></tr>" >> $output |
538 echo "<tr><td>The data for the CSR IGA pie plot</td><td><a href='IGA_pie.txt' download='IGA_pie.txt' >Download</a></td></tr>" >> $output | 555 echo "<tr><td>The data for the CSR IGA pie plot</td><td><a href='IGA_pie.txt' download='IGA_pie.txt' >Download</a></td></tr>" >> $output |
539 echo "<tr><td>The data for the CSR IGG pie plot</td><td><a href='IGG_pie.txt' download='IGG_pie.txt' >Download</a></td></tr>" >> $output | 556 echo "<tr><td>The data for the CSR IGG pie plot</td><td><a href='IGG_pie.txt' download='IGG_pie.txt' >Download</a></td></tr>" >> $output |
540 | 557 |
546 echo "<tr><td>The Change-O DB defined clones summary file of IGA</td><td><a href='change_o/change-o-defined_clones-summary-IGA.txt' download='change_o/change-o-defined_clones-summary-IGA.txt' >Download</a></td></tr>" >> $output | 563 echo "<tr><td>The Change-O DB defined clones summary file of IGA</td><td><a href='change_o/change-o-defined_clones-summary-IGA.txt' download='change_o/change-o-defined_clones-summary-IGA.txt' >Download</a></td></tr>" >> $output |
547 echo "<tr><td>The Change-O DB file with defined clones of IGG</td><td><a href='change_o/change-o-db-defined_clones-IGG.txt' download='change_o/change-o-db-defined_clones-IGG.txt' >Download</a></td></tr>" >> $output | 564 echo "<tr><td>The Change-O DB file with defined clones of IGG</td><td><a href='change_o/change-o-db-defined_clones-IGG.txt' download='change_o/change-o-db-defined_clones-IGG.txt' >Download</a></td></tr>" >> $output |
548 echo "<tr><td>The Change-O DB defined clones summary file of IGG</td><td><a href='change_o/change-o-defined_clones-summary-IGG.txt' download='change_o/change-o-defined_clones-summary-IGG.txt' >Download</a></td></tr>" >> $output | 565 echo "<tr><td>The Change-O DB defined clones summary file of IGG</td><td><a href='change_o/change-o-defined_clones-summary-IGG.txt' download='change_o/change-o-defined_clones-summary-IGG.txt' >Download</a></td></tr>" >> $output |
549 echo "<tr><td>The Change-O DB file with defined clones of IGM</td><td><a href='change_o/change-o-db-defined_clones-IGM.txt' download='change_o/change-o-db-defined_clones-IGM.txt' >Download</a></td></tr>" >> $output | 566 echo "<tr><td>The Change-O DB file with defined clones of IGM</td><td><a href='change_o/change-o-db-defined_clones-IGM.txt' download='change_o/change-o-db-defined_clones-IGM.txt' >Download</a></td></tr>" >> $output |
550 echo "<tr><td>The Change-O DB defined clones summary file of IGM</td><td><a href='change_o/change-o-defined_clones-summary-IGM.txt' download='change_o/change-o-defined_clones-summary-IGM.txt' >Download</a></td></tr>" >> $output | 567 echo "<tr><td>The Change-O DB defined clones summary file of IGM</td><td><a href='change_o/change-o-defined_clones-summary-IGM.txt' download='change_o/change-o-defined_clones-summary-IGM.txt' >Download</a></td></tr>" >> $output |
568 echo "<tr><td>The Change-O DB file with defined clones of IGE</td><td><a href='change_o/change-o-db-defined_clones-IGE.txt' download='change_o/change-o-db-defined_clones-IGE.txt' >Download</a></td></tr>" >> $output | |
569 echo "<tr><td>The Change-O DB defined clones summary file of IGE</td><td><a href='change_o/change-o-defined_clones-summary-IGE.txt' download='change_o/change-o-defined_clones-summary-IGE.txt' >Download</a></td></tr>" >> $output | |
551 | 570 |
552 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>Filtered IMGT output files</td></tr>" >> $output | 571 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>Filtered IMGT output files</td></tr>" >> $output |
553 echo "<tr><td>An IMGT archive with just the matched and filtered sequences</td><td><a href='new_IMGT.txz' download='new_IMGT.txz' >Download</a></td></tr>" >> $output | 572 echo "<tr><td>An IMGT archive with just the matched and filtered sequences</td><td><a href='new_IMGT.txz' download='new_IMGT.txz' >Download</a></td></tr>" >> $output |
554 echo "<tr><td>An IMGT archive with just the matched and filtered IGA sequences</td><td><a href='new_IMGT_IGA.txz' download='new_IMGT_IGA.txz' >Download</a></td></tr>" >> $output | 573 echo "<tr><td>An IMGT archive with just the matched and filtered IGA sequences</td><td><a href='new_IMGT_IGA.txz' download='new_IMGT_IGA.txz' >Download</a></td></tr>" >> $output |
555 echo "<tr><td>An IMGT archive with just the matched and filtered IGA1 sequences</td><td><a href='new_IMGT_IGA1.txz' download='new_IMGT_IGA1.txz' >Download</a></td></tr>" >> $output | 574 echo "<tr><td>An IMGT archive with just the matched and filtered IGA1 sequences</td><td><a href='new_IMGT_IGA1.txz' download='new_IMGT_IGA1.txz' >Download</a></td></tr>" >> $output |
558 echo "<tr><td>An IMGT archive with just the matched and filtered IGG1 sequences</td><td><a href='new_IMGT_IGG1.txz' download='new_IMGT_IGG1.txz' >Download</a></td></tr>" >> $output | 577 echo "<tr><td>An IMGT archive with just the matched and filtered IGG1 sequences</td><td><a href='new_IMGT_IGG1.txz' download='new_IMGT_IGG1.txz' >Download</a></td></tr>" >> $output |
559 echo "<tr><td>An IMGT archive with just the matched and filtered IGG2 sequences</td><td><a href='new_IMGT_IGG2.txz' download='new_IMGT_IGG2.txz' >Download</a></td></tr>" >> $output | 578 echo "<tr><td>An IMGT archive with just the matched and filtered IGG2 sequences</td><td><a href='new_IMGT_IGG2.txz' download='new_IMGT_IGG2.txz' >Download</a></td></tr>" >> $output |
560 echo "<tr><td>An IMGT archive with just the matched and filtered IGG3 sequences</td><td><a href='new_IMGT_IGG3.txz' download='new_IMGT_IGG3.txz' >Download</a></td></tr>" >> $output | 579 echo "<tr><td>An IMGT archive with just the matched and filtered IGG3 sequences</td><td><a href='new_IMGT_IGG3.txz' download='new_IMGT_IGG3.txz' >Download</a></td></tr>" >> $output |
561 echo "<tr><td>An IMGT archive with just the matched and filtered IGG4 sequences</td><td><a href='new_IMGT_IGG4.txz' download='new_IMGT_IGG4.txz' >Download</a></td></tr>" >> $output | 580 echo "<tr><td>An IMGT archive with just the matched and filtered IGG4 sequences</td><td><a href='new_IMGT_IGG4.txz' download='new_IMGT_IGG4.txz' >Download</a></td></tr>" >> $output |
562 echo "<tr><td>An IMGT archive with just the matched and filtered IGM sequences</td><td><a href='new_IMGT_IGM.txz' download='new_IMGT_IGM.txz' >Download</a></td></tr>" >> $output | 581 echo "<tr><td>An IMGT archive with just the matched and filtered IGM sequences</td><td><a href='new_IMGT_IGM.txz' download='new_IMGT_IGM.txz' >Download</a></td></tr>" >> $output |
582 echo "<tr><td>An IMGT archive with just the matched and filtered IGE sequences</td><td><a href='new_IMGT_IGE.txz' download='new_IMGT_IGM.txz' >Download</a></td></tr>" >> $output | |
563 | 583 |
564 echo "</table>" >> $output | 584 echo "</table>" >> $output |
565 | 585 |
566 echo "</div>" >> $output #downloads tab end | 586 echo "</div>" >> $output #downloads tab end |
567 | 587 |
607 if [[ $(wc -l < $outdir/new_IMGT_IGM/1_Summary.txt) -gt "1" ]]; then | 627 if [[ $(wc -l < $outdir/new_IMGT_IGM/1_Summary.txt) -gt "1" ]]; then |
608 cd $outdir/baseline/IGM | 628 cd $outdir/baseline/IGM |
609 bash $dir/baseline/wrapper.sh 1 1 1 1 0 0 "25:26:38:55:65:104:-" $outdir/new_IMGT_IGM.txz "IGM" "$dir/baseline/IMGT-reference-seqs-IGHV-2015-11-05.fa" "$outdir/baseline_IGM.pdf" "Sequence.ID" "$outdir/baseline_IGM.txt" | 629 bash $dir/baseline/wrapper.sh 1 1 1 1 0 0 "25:26:38:55:65:104:-" $outdir/new_IMGT_IGM.txz "IGM" "$dir/baseline/IMGT-reference-seqs-IGHV-2015-11-05.fa" "$outdir/baseline_IGM.pdf" "Sequence.ID" "$outdir/baseline_IGM.txt" |
610 else | 630 else |
611 echo "No IGM sequences" > "$outdir/baseline_IGM.txt" | 631 echo "No IGM sequences" > "$outdir/baseline_IGM.txt" |
632 fi | |
633 | |
634 mkdir $outdir/baseline/IGE | |
635 if [[ $(wc -l < $outdir/new_IMGT_IGE/1_Summary.txt) -gt "1" ]]; then | |
636 cd $outdir/baseline/IGE | |
637 bash $dir/baseline/wrapper.sh 1 1 1 1 0 0 "25:26:38:55:65:104:-" $outdir/new_IMGT_IGE.txz "IGE" "$dir/baseline/IMGT-reference-seqs-IGHV-2015-11-05.fa" "$outdir/baseline_IGE.pdf" "Sequence.ID" "$outdir/baseline_IGE.txt" | |
638 else | |
639 echo "No IGE sequences" > "$outdir/baseline_IGE.txt" | |
612 fi | 640 fi |
613 | 641 |
614 cd $tmp | 642 cd $tmp |
615 | 643 |
616 echo "Cleaning up *.RData files" | 644 echo "Cleaning up *.RData files" |
624 if [[ "$naive_output" == "yes" ]] | 652 if [[ "$naive_output" == "yes" ]] |
625 then | 653 then |
626 cp $outdir/new_IMGT_IGA.txz ${naive_output_ca} | 654 cp $outdir/new_IMGT_IGA.txz ${naive_output_ca} |
627 cp $outdir/new_IMGT_IGG.txz ${naive_output_cg} | 655 cp $outdir/new_IMGT_IGG.txz ${naive_output_cg} |
628 cp $outdir/new_IMGT_IGM.txz ${naive_output_cm} | 656 cp $outdir/new_IMGT_IGM.txz ${naive_output_cm} |
657 cp $outdir/new_IMGT_IGE.txz ${naive_output_ce} | |
629 fi | 658 fi |
630 | 659 |
631 echo "</table>" >> $outdir/base_overview.html | 660 echo "</table>" >> $outdir/base_overview.html |
632 | 661 |
633 mv $log $outdir/log.html | 662 mv $log $outdir/log.html |