comparison wrapper.sh @ 30:45554fd15511 draft

Uploaded
author davidvanzessen
date Tue, 26 May 2015 10:37:51 -0400
parents 5ab17bdf2530
children ce8bd23d0335
comparison
equal deleted inserted replaced
29:5ab17bdf2530 30:45554fd15511
50 echo "<div class='tabbertab' title='Data frequency'>" >> "$html" 50 echo "<div class='tabbertab' title='Data frequency'>" >> "$html"
51 echo "<table><tr><td style='vertical-align:top;'>" >> "$html" 51 echo "<table><tr><td style='vertical-align:top;'>" >> "$html"
52 echo "<table border = 1 class='result_table summary_table' id='summary_table_${patient}_freq'>" >> "$html" 52 echo "<table border = 1 class='result_table summary_table' id='summary_table_${patient}_freq'>" >> "$html"
53 echo "<thead><th>Ig/TCR gene rearrangement type</th><th>Proximal gene segment</th><th>Distal gene segment</th><th>Cut off value</th><th>Number of sequences ${patient}_Both</th><th>Number of sequences_$sample1</th><th>Read Count $sample1</th><th>Number of sequences_$sample2</th><th>Read Count $sample2</th><th>Sum number of sequences $patient</th><th>Percentage of sequences ${patient}_both</th></thead>" >> "$html" 53 echo "<thead><th>Ig/TCR gene rearrangement type</th><th>Proximal gene segment</th><th>Distal gene segment</th><th>Cut off value</th><th>Number of sequences ${patient}_Both</th><th>Number of sequences_$sample1</th><th>Read Count $sample1</th><th>Number of sequences_$sample2</th><th>Read Count $sample2</th><th>Sum number of sequences $patient</th><th>Percentage of sequences ${patient}_both</th></thead>" >> "$html"
54 echo "<tbody>" >> "$html" 54 echo "<tbody>" >> "$html"
55 scatterplot_tab="<div class='tabbertab' title='Scatter Plots Reads'>" 55 scatterplot_tab="<div class='tabbertab' title='Scatter Plots Frequency'><table border='0'><tr>"
56 while read locus j_segment v_segment cut_off_value both one read_count1 two read_count2 sum percent locusreadsum1 locusreadsum2 56 while read locus j_segment v_segment cut_off_value both one read_count1 two read_count2 sum percent locusreadsum1 locusreadsum2
57 do 57 do
58 if [ "$locus" != "$oldLocus" ] ; then 58 if [ "$locus" != "$oldLocus" ] ; then
59 echo "<tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr>" >> "$html" 59 echo "<tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr>" >> "$html"
60 echo "<tr><td><b>$locus</b></td>" >> "$html" 60 echo "<tr><td><b>$locus</b></td>" >> "$html"
84 echo "<td>$sum</td>" >> "$html" 84 echo "<td>$sum</td>" >> "$html"
85 echo "<td>${percent}&#37;</td>" >> "$html" 85 echo "<td>${percent}&#37;</td>" >> "$html"
86 echo "</tr>" >> "$html" 86 echo "</tr>" >> "$html"
87 oldLocus="$locus" 87 oldLocus="$locus"
88 if [ "${cut_off_value}" == "0" ] ; then 88 if [ "${cut_off_value}" == "0" ] ; then
89 scatterplot_tab="${scatterplot_tab}<img src='${patient}_${sample1}_${sample2}_freq_${locus}_scatter.png' /><br />" 89 scatterplot_tab="${scatterplot_tab}<td><img src='${patient}_${sample1}_${sample2}_freq_${locus}_scatter.png' /></td>"
90 fi 90 fi
91 done < tmp.txt 91 done < tmp.txt
92 echo "</tbody></table>" >> "$html" 92 echo "</tbody></table>" >> "$html"
93 echo "</td><td style='vertical-align:top;'><div id='result_div_${patient}_freq'></div></td></tr></table>" >> "$html" 93 echo "</td><td style='vertical-align:top;'><div id='result_div_${patient}_freq'></div></td></tr></table>" >> "$html"
94 echo "</div>" >> "$html" 94 echo "</div>" >> "$html"
95 echo "<div class='tabbertab' title='Graphs frequency'>" >> "$html" 95 echo "<div class='tabbertab' title='Graphs frequency'>" >> "$html"
96 echo "<a href='${patient}_freq.png'><img src='${patient}_freq.png' width='1280' height='720' /></a><br />" >> "$html" 96 echo "<a href='${patient}_freq.png'><img src='${patient}_freq.png' width='1280' height='720' /></a><br />" >> "$html"
97 echo "<a href='${patient}_freq_both.png'><img src='${patient}_freq_both.png' width='1280' height='720' /></a><br />" >> "$html" 97 echo "<a href='${patient}_freq_both.png'><img src='${patient}_freq_both.png' width='1280' height='720' /></a><br />" >> "$html"
98 echo "<a href='${patient}_percent_freq.png'><img src='${patient}_percent_freq.png' width='1280' height='720' /></a></div>" >> "$html" 98 echo "<a href='${patient}_percent_freq.png'><img src='${patient}_percent_freq.png' width='1280' height='720' /></a></div>" >> "$html"
99 echo "${scatterplot_tab}</div>" >> "$html" 99 echo "${scatterplot_tab}</tr></table></div>" >> "$html"
100 100
101 tail -n+2 ${patient}_reads.txt | sed "s/>//" > tmp.txt 101 tail -n+2 ${patient}_reads.txt | sed "s/>//" > tmp.txt
102 echo "<div class='tabbertab' title='Data reads'>" >> "$html" 102 echo "<div class='tabbertab' title='Data reads'>" >> "$html"
103 echo "<table><tr><td style='vertical-align:top;'>" >> "$html" 103 echo "<table><tr><td style='vertical-align:top;'>" >> "$html"
104 echo "<table border = 1 class='result_table summary_table' id='summary_table_${patient}_reads'>" >> "$html" 104 echo "<table border = 1 class='result_table summary_table' id='summary_table_${patient}_reads'>" >> "$html"
105 echo "<thead><th>Ig/TCR gene rearrangement type</th><th>Proximal gene segment</th><th>Distal gene segment</th><th>Cut off value</th><th>Number of sequences ${patient}_Both</th><th>Number of sequences_$sample1</th><th>Read Count $sample1</th><th>Number of sequences_$sample2</th><th>Read Count $sample2</th><th>Sum number of sequences $patient</th><th>Percentage of sequences ${patient}_both</th></thead>" >> "$html" 105 echo "<thead><th>Ig/TCR gene rearrangement type</th><th>Proximal gene segment</th><th>Distal gene segment</th><th>Cut off value</th><th>Number of sequences ${patient}_Both</th><th>Number of sequences_$sample1</th><th>Read Count $sample1</th><th>Number of sequences_$sample2</th><th>Read Count $sample2</th><th>Sum number of sequences $patient</th><th>Percentage of sequences ${patient}_both</th></thead>" >> "$html"
106 echo "<tbody>" >> "$html" 106 echo "<tbody>" >> "$html"
107 scatterplot_tab="<div class='tabbertab' title='Scatter Plots Frequency'>" 107 scatterplot_tab="<div class='tabbertab' title='Scatter Plots Reads'><table border='0'><tr>"
108 while read locus j_segment v_segment cut_off_value both one read_count1 two read_count2 sum percent locusreadsum1 locusreadsum2 108 while read locus j_segment v_segment cut_off_value both one read_count1 two read_count2 sum percent locusreadsum1 locusreadsum2
109 do 109 do
110 if [ "$locus" != "$oldLocus" ] ; then 110 if [ "$locus" != "$oldLocus" ] ; then
111 echo "<tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr>" >> "$html" 111 echo "<tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr>" >> "$html"
112 echo "<tr><td><b>$locus</b></td>" >> "$html" 112 echo "<tr><td><b>$locus</b></td>" >> "$html"
136 echo "<td>$sum</td>" >> "$html" 136 echo "<td>$sum</td>" >> "$html"
137 echo "<td>${percent}&#37;</td>" >> "$html" 137 echo "<td>${percent}&#37;</td>" >> "$html"
138 echo "</tr>" >> "$html" 138 echo "</tr>" >> "$html"
139 oldLocus="$locus" 139 oldLocus="$locus"
140 if [ "${cut_off_value}" == "0" ] ; then 140 if [ "${cut_off_value}" == "0" ] ; then
141 scatterplot_tab="${scatterplot_tab}<img src='${patient}_${sample1}_${sample2}_reads_${locus}_scatter.png' /><br />" 141 scatterplot_tab="${scatterplot_tab}<td><img src='${patient}_${sample1}_${sample2}_reads_${locus}_scatter.png' /></td>"
142 fi 142 fi
143 done < tmp.txt 143 done < tmp.txt
144 echo "</tbody></table>" >> "$html" 144 echo "</tbody></table>" >> "$html"
145 echo "</td><td style='vertical-align:top;'><div id='result_div_${patient}_reads'></div></td></tr></table>" >> "$html" 145 echo "</td><td style='vertical-align:top;'><div id='result_div_${patient}_reads'></div></td></tr></table>" >> "$html"
146 echo "</div>" >> "$html" 146 echo "</div>" >> "$html"
147 echo "<div class='tabbertab' title='Graphs reads'>" >> "$html" 147 echo "<div class='tabbertab' title='Graphs reads'>" >> "$html"
148 echo "<a href='${patient}_reads.png'><img src='${patient}_reads.png' width='1280' height='720' /></a><br />" >> "$html" 148 echo "<a href='${patient}_reads.png'><img src='${patient}_reads.png' width='1280' height='720' /></a><br />" >> "$html"
149 echo "<a href='${patient}_reads_both.png'><img src='${patient}_reads_both.png' width='1280' height='720' /></a><br />" >> "$html" 149 echo "<a href='${patient}_reads_both.png'><img src='${patient}_reads_both.png' width='1280' height='720' /></a><br />" >> "$html"
150 echo "<a href='${patient}_percent_reads.png'><img src='${patient}_percent_reads.png' width='1280' height='720' /></a></div>" >> "$html" 150 echo "<a href='${patient}_percent_reads.png'><img src='${patient}_percent_reads.png' width='1280' height='720' /></a></div>" >> "$html"
151 echo "${scatterplot_tab}</div>" >> "$html" 151 echo "${scatterplot_tab}</tr></table></div>" >> "$html"
152 echo "</div>" >> "$html" 152 echo "</div>" >> "$html"
153 echo "</div>" >> "$html" 153 echo "</div>" >> "$html"
154 echo "</html>" >> "$html" 154 echo "</html>" >> "$html"
155 done < patients.txt 155 done < patients.txt
156 156