Mercurial > repos > davidvanzessen > clonal_sequences_in_paired_samples
comparison wrapper.sh @ 21:d980e2493657 draft
Uploaded
author | davidvanzessen |
---|---|
date | Mon, 23 Feb 2015 10:23:14 -0500 |
parents | 58a28427930e |
children | 0940835d259c |
comparison
equal
deleted
inserted
replaced
20:d938aef60589 | 21:d980e2493657 |
---|---|
182 tail -n+2 ${patient}_freq.txt | sed "s/>//" > tmp.txt | 182 tail -n+2 ${patient}_freq.txt | sed "s/>//" > tmp.txt |
183 echo "<div class='tabber'>" >> "$html" | 183 echo "<div class='tabber'>" >> "$html" |
184 echo "<div class='tabbertab' title='Data frequency'>" >> "$html" | 184 echo "<div class='tabbertab' title='Data frequency'>" >> "$html" |
185 echo "<table><tr><td style='vertical-align:top;'>" >> "$html" | 185 echo "<table><tr><td style='vertical-align:top;'>" >> "$html" |
186 echo "<table border = 1 class='result_table summary_table' id='summary_table_${patient}_freq'>" >> "$html" | 186 echo "<table border = 1 class='result_table summary_table' id='summary_table_${patient}_freq'>" >> "$html" |
187 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}_All</th><th>Number of sequences_$sample1</th><th>Read Count $sample1</th><th>Number of sequences_$sample2</th><th>Read Count $sample2</th><th>Number of sequences_$sample3</th><th>Read Count $sample3</th></thead>" >> "$html" | 187 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}_All</th><th>Number of sequences_$sample1</th><th>Number of sequences_$sample2</th><th>Number of sequences_$sample3</th><th>Number of sequences_${sample1}_${sample2}</th><th>Number of sequences_${sample1}_${sample3}</th><th>Number of sequences_${sample2}_${sample3}</th></thead>" >> "$html" |
188 echo "<tbody>" >> "$html" | 188 echo "<tbody>" >> "$html" |
189 while read locus j_segment v_segment cut_off_value all one read_count1 two read_count2 three read_count3 | 189 while read locus j_segment v_segment cut_off_value all one two three one_two one_three two_three |
190 do | 190 do |
191 if [ "$locus" != "$oldLocus" ] ; then | 191 if [ "$locus" != "$oldLocus" ] ; then |
192 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" | 192 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" |
193 echo "<tr><td><b>$locus</b></td>" >> "$html" | 193 echo "<tr><td><b>$locus</b></td>" >> "$html" |
194 else | 194 else |
204 fi | 204 fi |
205 if [ "$one" != "0" ] && [ "$cut_off_value" != "0" ] ; then | 205 if [ "$one" != "0" ] && [ "$cut_off_value" != "0" ] ; then |
206 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${locus}_${cut_off_value}.txt\", \"$patient\", \"freq\")'>$one</td>" >> "$html" | 206 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${locus}_${cut_off_value}.txt\", \"$patient\", \"freq\")'>$one</td>" >> "$html" |
207 else | 207 else |
208 echo "<td>$one</td>" >> "$html" | 208 echo "<td>$one</td>" >> "$html" |
209 fi | 209 fi |
210 echo "<td>$read_count1</td>" >> "$html" | |
211 if [ "$two" != "0" ] && [ "$cut_off_value" != "0" ] ; then | 210 if [ "$two" != "0" ] && [ "$cut_off_value" != "0" ] ; then |
212 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample2}_${locus}_${cut_off_value}.txt\", \"$patient\", \"freq\")'>$two</td>" >> "$html" | 211 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample2}_${locus}_${cut_off_value}.txt\", \"$patient\", \"freq\")'>$two</td>" >> "$html" |
213 else | 212 else |
214 echo "<td>$two</td>" >> "$html" | 213 echo "<td>$two</td>" >> "$html" |
215 fi | 214 fi |
216 echo "<td>$read_count2</td>" >> "$html" | |
217 if [ "$three" != "0" ] && [ "$cut_off_value" != "0" ] ; then | 215 if [ "$three" != "0" ] && [ "$cut_off_value" != "0" ] ; then |
218 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample3}_${locus}_${cut_off_value}.txt\", \"$patient\", \"freq\")'>$three</td>" >> "$html" | 216 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample3}_${locus}_${cut_off_value}.txt\", \"$patient\", \"freq\")'>$three</td>" >> "$html" |
219 else | 217 else |
220 echo "<td>$three</td>" >> "$html" | 218 echo "<td>$three</td>" >> "$html" |
221 fi | 219 fi |
222 echo "<td>$read_count3</td>" >> "$html" | 220 |
221 if [ "${one_two}" != "0" ] && [ "$cut_off_value" != "0" ] ; then | |
222 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${sample2}_${locus}_${cut_off_value}.txt\", \"$patient\", \"freq\")'>${one_two}</td>" >> "$html" | |
223 else | |
224 echo "<td>${one_two}</td>" >> "$html" | |
225 fi | |
226 if [ "${one_three}" != "0" ] && [ "$cut_off_value" != "0" ] ; then | |
227 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${sample3}_${locus}_${cut_off_value}.txt\", \"$patient\", \"freq\")'>${one_three}</td>" >> "$html" | |
228 else | |
229 echo "<td>${one_three}</td>" >> "$html" | |
230 fi | |
231 if [ "${two_three}" != "0" ] && [ "$cut_off_value" != "0" ] ; then | |
232 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample2}_${sample3}_${locus}_${cut_off_value}.txt\", \"$patient\", \"freq\")'>${two_three}</td>" >> "$html" | |
233 else | |
234 echo "<td>${two_three}</td>" >> "$html" | |
235 fi | |
236 | |
223 echo "</tr>" >> "$html" | 237 echo "</tr>" >> "$html" |
224 oldLocus="$locus" | 238 oldLocus="$locus" |
225 done < tmp.txt | 239 done < tmp.txt |
226 echo "</tbody></table>" >> "$html" | 240 echo "</tbody></table>" >> "$html" |
227 echo "</td><td style='vertical-align:top;'><div id='result_div_${patient}_freq'></div></td></tr></table>" >> "$html" | 241 echo "</td><td style='vertical-align:top;'><div id='result_div_${patient}_freq'></div></td></tr></table>" >> "$html" |
232 | 246 |
233 tail -n+2 ${patient}_reads.txt | sed "s/>//" > tmp.txt | 247 tail -n+2 ${patient}_reads.txt | sed "s/>//" > tmp.txt |
234 echo "<div class='tabbertab' title='Data reads'>" >> "$html" | 248 echo "<div class='tabbertab' title='Data reads'>" >> "$html" |
235 echo "<table><tr><td style='vertical-align:top;'>" >> "$html" | 249 echo "<table><tr><td style='vertical-align:top;'>" >> "$html" |
236 echo "<table border = 1 class='result_table summary_table' id='summary_table_${patient}_reads'>" >> "$html" | 250 echo "<table border = 1 class='result_table summary_table' id='summary_table_${patient}_reads'>" >> "$html" |
237 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}_All</th><th>Number of sequences_$sample1</th><th>Read Count $sample1</th><th>Number of sequences_$sample2</th><th>Read Count $sample2</th><th>Number of sequences_$sample3</th><th>Read Count $sample3</th></thead>" >> "$html" | 251 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}_All</th><th>Number of sequences_$sample1</th><th>Number of sequences_$sample2</th><th>Number of sequences_$sample3</th><th>Number of sequences_${sample1}_${sample2}</th><th>Number of sequences_${sample1}_${sample3}</th><th>Number of sequences_${sample2}_${sample3}</th></thead>" >> "$html" |
238 echo "<tbody>" >> "$html" | 252 echo "<tbody>" >> "$html" |
239 while read locus j_segment v_segment cut_off_value all one read_count1 two read_count2 three read_count3 | 253 while read locus j_segment v_segment cut_off_value all one two three one_two one_three two_three |
240 do | 254 do |
241 if [ "$locus" != "$oldLocus" ] ; then | 255 if [ "$locus" != "$oldLocus" ] ; then |
242 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" | 256 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" |
243 echo "<tr><td><b>$locus</b></td>" >> "$html" | 257 echo "<tr><td><b>$locus</b></td>" >> "$html" |
244 else | 258 else |
255 if [ "$one" != "0" ] && [ "$cut_off_value" != "0" ] ; then | 269 if [ "$one" != "0" ] && [ "$cut_off_value" != "0" ] ; then |
256 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${locus}_${cut_off_value}.txt\", \"$patient\", \"reads\")'>$one</td>" >> "$html" | 270 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${locus}_${cut_off_value}.txt\", \"$patient\", \"reads\")'>$one</td>" >> "$html" |
257 else | 271 else |
258 echo "<td>$one</td>" >> "$html" | 272 echo "<td>$one</td>" >> "$html" |
259 fi | 273 fi |
260 echo "<td>$read_count1</td>" >> "$html" | |
261 if [ "$two" != "0" ] && [ "$cut_off_value" != "0" ] ; then | 274 if [ "$two" != "0" ] && [ "$cut_off_value" != "0" ] ; then |
262 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample2}_${locus}_${cut_off_value}.txt\", \"$patient\", \"reads\")'>$two</td>" >> "$html" | 275 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample2}_${locus}_${cut_off_value}.txt\", \"$patient\", \"reads\")'>$two</td>" >> "$html" |
263 else | 276 else |
264 echo "<td>$two</td>" >> "$html" | 277 echo "<td>$two</td>" >> "$html" |
265 fi | 278 fi |
266 echo "<td>$read_count2</td>" >> "$html" | |
267 if [ "$three" != "0" ] && [ "$cut_off_value" != "0" ] ; then | 279 if [ "$three" != "0" ] && [ "$cut_off_value" != "0" ] ; then |
268 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample3}_${locus}_${cut_off_value}.txt\", \"$patient\", \"reads\")'>$three</td>" >> "$html" | 280 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample3}_${locus}_${cut_off_value}.txt\", \"$patient\", \"reads\")'>$three</td>" >> "$html" |
269 else | 281 else |
270 echo "<td>$three</td>" >> "$html" | 282 echo "<td>$three</td>" >> "$html" |
271 fi | 283 fi |
272 echo "<td>$read_count3</td>" >> "$html" | 284 |
285 if [ "${one_two}" != "0" ] && [ "$cut_off_value" != "0" ] ; then | |
286 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${sample2}_${locus}_${cut_off_value}.txt\", \"$patient\", \"reads\")'>${one_two}</td>" >> "$html" | |
287 else | |
288 echo "<td>${one_two}</td>" >> "$html" | |
289 fi | |
290 if [ "${one_three}" != "0" ] && [ "$cut_off_value" != "0" ] ; then | |
291 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${sample3}_${locus}_${cut_off_value}.txt\", \"$patient\", \"reads\")'>${one_three}</td>" >> "$html" | |
292 else | |
293 echo "<td>${one_three}</td>" >> "$html" | |
294 fi | |
295 if [ "${two_three}" != "0" ] && [ "$cut_off_value" != "0" ] ; then | |
296 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample2}_${sample3}_${locus}_${cut_off_value}.txt\", \"$patient\", \"reads\")'>${two_three}</td>" >> "$html" | |
297 else | |
298 echo "<td>${two_three}</td>" >> "$html" | |
299 fi | |
300 | |
273 echo "</tr>" >> "$html" | 301 echo "</tr>" >> "$html" |
274 oldLocus="$locus" | 302 oldLocus="$locus" |
275 done < tmp.txt | 303 done < tmp.txt |
276 echo "</tbody></table>" >> "$html" | 304 echo "</tbody></table>" >> "$html" |
277 echo "</td><td style='vertical-align:top;'><div id='result_div_${patient}_reads'></div></td></tr></table>" >> "$html" | 305 echo "</td><td style='vertical-align:top;'><div id='result_div_${patient}_reads'></div></td></tr></table>" >> "$html" |