diff wrapper.sh @ 23:81453585dfc3 draft

Uploaded
author davidvanzessen
date Thu, 01 Dec 2016 09:32:06 -0500
parents c281993e515b
children ce25fb581ca3
line wrap: on
line diff
--- a/wrapper.sh	Mon Nov 28 10:27:22 2016 -0500
+++ b/wrapper.sh	Thu Dec 01 09:32:06 2016 -0500
@@ -230,7 +230,7 @@
 echo "---------------- main tables ----------------<br />" >> $log
 
 echo "<div class='tabber'>" >> $output
-echo "<div class='tabbertab' title='SHM Overview'>" >> $output
+echo "<div class='tabbertab' title='SHM Overview' style='width: 3000px;'>" >> $output
 
 for func in ${funcs[@]}
 do
@@ -243,7 +243,7 @@
 	echo "---------------- pattern_plots.r ----------------"
 	echo "---------------- pattern_plots.r ----------------<br />" >> $log
 
-	Rscript $dir/pattern_plots.r $outdir/data_${func}.txt $outdir/plot1 $outdir/plot2 $outdir/plot3 2>&1
+	Rscript $dir/pattern_plots.r $outdir/data_${func}.txt $outdir/plot1 $outdir/plot2 $outdir/plot3 $outdir/shm_overview.txt 2>&1
 	
 	echo "<table class='pure-table pure-table-striped'>" >> $output
 	echo "<thead><tr><th>info</th>" >> $output
@@ -301,7 +301,7 @@
 echo "---------------- images ----------------"
 echo "---------------- images ----------------<br />" >> $log
 
-echo "<div class='tabbertab' title='SHM Frequency'>" >> $output
+echo "<div class='tabbertab' title='SHM Frequency' style='width: 3000px;'>" >> $output
 
 if [ -a $outdir/scatter.png ]
 then
@@ -314,7 +314,7 @@
 
 echo "</div>" >> $output #SHM frequency tab end
 
-echo "<div class='tabbertab' title='Transition tables'>" >> $output
+echo "<div class='tabbertab' title='Transition tables' style='width: 3000px;'>" >> $output
 
 echo "<table border='0'>" >> $output
 
@@ -322,8 +322,21 @@
 do
 	echo "<tr>" >> $output
 	echo "<td><h1>${gene}</h1></td>" >> $output
-	echo "<td><img src='transitions_heatmap_${gene}.png' /></td>" >> $output
-	echo "<td><img src='transitions_stacked_${gene}.png' /></td>" >> $output
+	
+	if [ -e $outdir/transitions_heatmap_${gene}.png ]
+	then
+		echo "<td><img src='transitions_heatmap_${gene}.png' /></td>" >> $output
+	else
+		echo "<td></td>" >> $output
+	fi
+	
+	if [ -e $outdir/transitions_stacked_${gene}.png ]
+	then
+		echo "<td><img src='transitions_stacked_${gene}.png' /></td>" >> $output
+	else
+		echo "<td></td>" >> $output
+	fi
+	
 	echo "<td><table style='border-left-width: 1;' class='pure-table transition-table pure-table-bordered'>" >> $output
 	echo "<tr><td></td><td colspan="5"><center>To</center></td></tr>" >> $output
 	first="true"
@@ -367,30 +380,66 @@
 
 echo "<div class='tabbertab' title='Antigen Selection'>" >> $output
 
-if [ -a $outdir/aa_histogram.png ]
+if [ -e $outdir/aa_histogram.png ]
 then
 	echo "<img src='aa_histogram.png'/><br />" >> $output
+fi
+
+if [ -e $outdir/aa_histogram_IGA.png ]
+then
 	echo "<img src='aa_histogram_IGA.png'/><br />" >> $output
+fi
+
+if [ -e $outdir/aa_histogram_IGG.png ]
+then
 	echo "<img src='aa_histogram_IGG.png'/><br />" >> $output
+fi
+
+if [ -e $outdir/aa_histogram_IGM.png ]
+then
 	echo "<img src='aa_histogram_IGM.png'/><br />" >> $output
+fi
+
+if [ -e $outdir/aa_histogram_IGE.png ]
+then
 	echo "<img src='aa_histogram_IGE.png'/><br />" >> $output
 fi
 
-echo "<embed src='baseline.pdf' width='700px' height='1000px'>" >> $output
-echo "<embed src='baseline_IGA.pdf' width='700px' height='1000px'>" >> $output
-echo "<embed src='baseline_IGG.pdf' width='700px' height='1000px'>" >> $output
-echo "<embed src='baseline_IGM.pdf' width='700px' height='1000px'>" >> $output
-echo "<embed src='baseline_IGE.pdf' width='700px' height='1000px'>" >> $output
+
+if [ -e $outdir/baseline.png ]
+then
+	echo "<embed src='baseline.pdf' width='700px' height='1000px'>" >> $output
+fi
+
+if [ -e $outdir/baseline_IGA.png ]
+then
+	echo "<embed src='baseline_IGA.pdf' width='700px' height='1000px'>" >> $output
+fi
+
+if [ -e $outdir/baseline_IGG.png ]
+then
+	echo "<embed src='baseline_IGG.pdf' width='700px' height='1000px'>" >> $output
+fi
+
+if [ -e $outdir/baseline_IGM.png ]
+then
+	echo "<embed src='baseline_IGM.pdf' width='700px' height='1000px'>" >> $output
+fi
+
+if [ -e $outdir/baseline_IGE.png ]
+then
+	echo "<embed src='baseline_IGE.pdf' width='700px' height='1000px'>" >> $output
+fi
 
 echo "</div>" >> $output #antigen selection tab end
 
 echo "<div class='tabbertab' title='CSR'>" >> $output #CSR tab
 
-if [ -a $outdir/IGA.png ] 
+if [ -e $outdir/IGA.png ] 
 then
 	echo "<img src='IGA.png'/><br />" >> $output
 fi
-if [ -a $outdir/IGG.png ]
+if [ -e $outdir/IGG.png ]
 then
 	echo "<img src='IGG.png'/><br />" >> $output
 fi
@@ -492,7 +541,7 @@
 	clonality_table $outdir/change_o/change-o-defined_clones-summary-IGM.txt $output
 	echo "</div>" >> $output
 
-	echo "<div class='tabbertab' title='Overview'>" >> $output
+	echo "<div class='tabbertab' title='Overlap'>" >> $output
 	cat "$outdir/sequence_overview/index.html" >> $output
 	echo "</div>" >> $output
 
@@ -512,7 +561,7 @@
 echo "<tr><td>The alignment info on the unmatched sequences</td><td><a href='unmatched.txt' download='unmatched.txt' >Download</a></td></tr>" >> $output
 
 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>SHM Overview</td></tr>" >> $output
-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
+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
 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
 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
 echo "<tr><td>Base count for every sequence</td><td><a href='base_overview.html'>View</a></td></tr>" >> $output
@@ -526,17 +575,17 @@
 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
 
 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>Transition Tables</td></tr>" >> $output
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
+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
+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
+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
+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
+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
+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
+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
+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
+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
+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
+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
 
 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>Antigen Selection</td></tr>" >> $output
 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