diff wrapper.sh @ 39:a24f8c93583a draft

Uploaded
author davidvanzessen
date Thu, 22 Dec 2016 09:39:27 -0500
parents 767dd9327009
children ca2512e1e3ab
line wrap: on
line diff
--- a/wrapper.sh	Tue Dec 20 09:03:15 2016 -0500
+++ b/wrapper.sh	Thu Dec 22 09:39:27 2016 -0500
@@ -247,7 +247,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 $outdir/shm_overview.txt 2>&1
+	Rscript $dir/pattern_plots.r $outdir/data_${func}.txt $outdir/aid_motives $outdir/relative_mutations $outdir/abolute_mutations $outdir/shm_overview.txt 2>&1
 	
 	echo "<table class='pure-table pure-table-striped'>" >> $output
 	echo "<thead><tr><th>info</th>" >> $output
@@ -296,10 +296,11 @@
 	#echo "<a href='data_${func}.txt'>Download data</a>" >> $output
 done
 
-echo "<img src='plot1.png' /><br />" >> $output
-echo "<img src='plot2.png' /><br />" >> $output
-echo "<img src='plot3.png' /><br />" >> $output
-
+echo "<img src='aid_motives.png' /><br />" >> $output
+echo "<img src='relative_mutations.png' /><br />" >> $output
+echo "<img src='abolute_mutations.png' /><br />" >> $output
+echo "<br />" >> $output
+cat $dir/shm_overview.htm >> $output
 echo "</div>" >> $output #SHM overview tab end
 
 echo "---------------- images ----------------"
@@ -316,6 +317,9 @@
 	echo "<img src='frequency_ranges.png'/><br />" >> $output
 fi
 
+echo "<br />" >> $output
+cat $dir/shm_frequency.htm >> $output
+
 echo "</div>" >> $output #SHM frequency tab end
 
 echo "<div class='tabbertab' title='Transition tables' style='width: 3000px;'>" >> $output
@@ -380,6 +384,9 @@
 
 echo "</table>" >> $output
 
+echo "<br />" >> $output
+cat $dir/shm_transition.htm >> $output
+
 echo "</div>" >> $output #transition tables tab end
 
 echo "<div class='tabbertab' title='Antigen Selection'>" >> $output
@@ -428,7 +435,7 @@
 	mkdir $outdir/baseline/IGA_IGG_IGM
 	if [[ $(wc -l < $outdir/new_IMGT/1_Summary.txt) -gt "1" ]]; then
 		cd $outdir/baseline/IGA_IGG_IGM
-		bash $dir/baseline/wrapper.sh 1 1 1 1 0 0 "${baseline_boundaries}" $outdir/new_IMGT.txz "IGA_IGG_IGM" "$dir/baseline/IMGTVHreferencedataset20161215.fa" "$outdir/baseline.pdf" "Sequence.ID" "$outdir/baseline.txt"	
+		bash $dir/baseline/wrapper.sh 1 1 1 1 0 0 "${baseline_boundaries}" $outdir/new_IMGT.txz "IGA_IGG_IGM_IGE" "$dir/baseline/IMGTVHreferencedataset20161215.fa" "$outdir/baseline.pdf" "Sequence.ID" "$outdir/baseline.txt"	
 	else
 		echo "No sequences" > "$outdir/baseline.txt"
 	fi
@@ -496,6 +503,9 @@
 	fi
 fi
 
+echo "<br />" >> $output
+cat $dir/shm_selection.htm >> $output
+
 echo "</div>" >> $output #antigen selection tab end
 
 echo "<div class='tabbertab' title='CSR'>" >> $output #CSR tab
@@ -509,6 +519,9 @@
 	echo "<img src='IGG.png'/><br />" >> $output
 fi
 
+echo "<br />" >> $output
+cat $dir/shm_csr.htm >> $output
+
 echo "</div>" >> $output #CSR tab end
 
 if [[ "$fast" == "no" ]] ; then
@@ -562,7 +575,7 @@
 
 	PWD="$tmp"
 
-	echo "<div class='tabbertab' title='Clonality'>" >> $output #clonality tab
+	echo "<div class='tabbertab' title='Clonal Relation' style='width: 7000px;'>" >> $output #clonality tab
 
 	function clonality_table {
 		local infile=$1
@@ -606,13 +619,15 @@
 	clonality_table $outdir/change_o/change-o-defined_clones-summary-IGM.txt $output
 	echo "</div>" >> $output
 
-	echo "<div class='tabbertab' title='Overlap'>" >> $output
-	cat "$outdir/sequence_overview/index.html" | sed "s%href='\(.*\).html%href='sequence_overview/\1.html%g" >> $output # rewrite href to 'sequence_overview/..."
+	echo "<div class='tabbertab' title='Overlap' style='width: 7000px;'>" >> $output
+	cat "$outdir/sequence_overview/index.html" | sed -e 's:</td>:</td>\n:g' | sed "s:href='\(.*\).html:href='sequence_overview/\1.html:g" >> $output # rewrite href to 'sequence_overview/..."
 	echo "</div>" >> $output
-
-
+	
 	echo "</div>" >> $output #clonality tabber end
-
+	
+	echo "<br />" >> $output
+	cat $dir/shm_clonality.htm >> $output
+	
 	echo "</div>" >> $output #clonality tab end
 
 fi
@@ -630,9 +645,9 @@
 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
-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
-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
-echo "<tr><td>The data used to generate the absolute transition and transversion plot</td><td><a href='plot3.txt' download='plot3.txt' >Download</a></td></tr>" >> $output
+echo "<tr><td>The data used to generate the percentage of mutations in AID and pol eta motives plot</td><td><a href='aid_motives.txt' download='aid_motives.txt' >Download</a></td></tr>" >> $output
+echo "<tr><td>The data used to generate the relative mutation patterns plot</td><td><a href='relative_mutations.txt' download='relative_mutations.txt' >Download</a></td></tr>" >> $output
+echo "<tr><td>The data used to generate the absolute mutation patterns plot</td><td><a href='absolute_mutations.txt' download='abolute_mutations.txt' >Download</a></td></tr>" >> $output
 
 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>SHM Frequency</td></tr>" >> $output
 echo "<tr><td>The data  generate the frequency scatter plot</td><td><a href='scatter.txt' download='scatter.txt' >Download</a></td></tr>" >> $output
@@ -654,7 +669,7 @@
 
 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
-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
+echo "<tr><td>Presence of AA per sequence ID</td><td><a href='absent_aa_id.txt' download='absent_aa_id.txt' >Download</a></td></tr>" >> $output
 
 echo "<tr><td>The data used to generate the aa mutation frequency plot</td><td><a href='aa_histogram_sum.txt' download='aa_histogram_sum.txt' >Download</a></td></tr>" >> $output
 echo "<tr><td>The data used to generate the aa mutation frequency plot for IGA</td><td><a href='aa_histogram_sum_IGA.txt' download='aa_histogram_sum_IGA.txt' >Download</a></td></tr>" >> $output
@@ -674,10 +689,10 @@
 echo "<tr><td>Baseline IGE data</td><td><a href='baseline_IGE.txt' download='baseline_IGE.txt' >Download</a></td></tr>" >> $output
 
 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>CSR</td></tr>" >> $output
-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
-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
+echo "<tr><td>The data for the IGA subclass distribution plot</td><td><a href='IGA_pie.txt' download='IGA_pie.txt' >Download</a></td></tr>" >> $output
+echo "<tr><td>The data for the IGG subclass distribution plot</td><td><a href='IGG_pie.txt' download='IGG_pie.txt' >Download</a></td></tr>" >> $output
 
-echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>Clonality</td></tr>" >> $output
+echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>Clonal Relation</td></tr>" >> $output
 echo "<tr><td>Sequence overlap between subclasses</td><td><a href='sequence_overview/index.html'>View</a></td></tr>" >> $output
 echo "<tr><td>The Change-O DB file with defined clones and subclass annotation</td><td><a href='change_o/change-o-db-defined_clones.txt' download='change_o/change-o-db-defined_clones.txt' >Download</a></td></tr>" >> $output
 echo "<tr><td>The Change-O DB defined clones summary file</td><td><a href='change_o/change-o-defined_clones-summary.txt' download='change_o/change-o-defined_clones-summary.txt' >Download</a></td></tr>" >> $output
@@ -705,6 +720,9 @@
 
 echo "</table>" >> $output
 
+echo "<br />" >> $output
+cat $dir/shm_downloads.htm >> $output
+
 echo "</div>" >> $output #downloads tab end
 
 echo "</div>" >> $output #tabs end 
@@ -748,7 +766,10 @@
 		echo "<td>${perc}%</td>" >> $log
 		echo "</tr>" >> $log
 done < $outdir/filtering_steps.txt
-echo "</table border></center></html>" >> $log
+echo "</table>" >> $log
+echo "<br />" >> $log
+cat $dir/shm_first.htm >> $log
+echo "</center></html>" >> $log
 
 IFS="$tIFS"