Mercurial > repos > davidvanzessen > clonal_sequences_in_paired_samples
changeset 23:0940835d259c draft
Uploaded
author | davidvanzessen |
---|---|
date | Tue, 24 Feb 2015 07:30:36 -0500 |
parents | b662fdc7eff4 |
children | 6904186d13b9 |
files | wrapper.sh |
diffstat | 1 files changed, 18 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/wrapper.sh Mon Feb 23 10:37:28 2015 -0500 +++ b/wrapper.sh Tue Feb 24 07:30:36 2015 -0500 @@ -186,6 +186,7 @@ echo "<table border = 1 class='result_table summary_table' id='summary_table_${patient}_freq'>" >> "$html" 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" echo "<tbody>" >> "$html" + scatterplot_tab="<div class='tabbertab' title='Scatter Plots Frequency'>" while read locus j_segment v_segment cut_off_value all one two three one_two one_three two_three do if [ "$locus" != "$oldLocus" ] ; then @@ -219,23 +220,26 @@ fi if [ "${one_two}" != "0" ] && [ "$cut_off_value" != "0" ] ; then - echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${sample2}_${locus}_${cut_off_value}.txt\", \"$patient\", \"freq\")'>${one_two}</td>" >> "$html" + echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${sample2}_${locus}_${cut_off_value}freq.txt\", \"$patient\", \"freq\")'>${one_two}</td>" >> "$html" else echo "<td>${one_two}</td>" >> "$html" fi if [ "${one_three}" != "0" ] && [ "$cut_off_value" != "0" ] ; then - echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${sample3}_${locus}_${cut_off_value}.txt\", \"$patient\", \"freq\")'>${one_three}</td>" >> "$html" + echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${sample3}_${locus}_${cut_off_value}freq.txt\", \"$patient\", \"freq\")'>${one_three}</td>" >> "$html" else echo "<td>${one_three}</td>" >> "$html" fi if [ "${two_three}" != "0" ] && [ "$cut_off_value" != "0" ] ; then - echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample2}_${sample3}_${locus}_${cut_off_value}.txt\", \"$patient\", \"freq\")'>${two_three}</td>" >> "$html" + echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample2}_${sample3}_${locus}_${cut_off_value}freq.txt\", \"$patient\", \"freq\")'>${two_three}</td>" >> "$html" else echo "<td>${two_three}</td>" >> "$html" fi echo "</tr>" >> "$html" - oldLocus="$locus" + oldLocus="$locus" + if [ "${cut_off_value}" == "0" ] ; then + scatterplot_tab="${scatterplot_tab}<img src='${sample1}_${sample2}_${sample3}_freq_${locus}_scatter.png' /><br />" + fi done < tmp.txt echo "</tbody></table>" >> "$html" echo "</td><td style='vertical-align:top;'><div id='result_div_${patient}_freq'></div></td></tr></table>" >> "$html" @@ -243,6 +247,7 @@ echo "<div class='tabbertab' title='Graphs frequency'>" >> "$html" echo "<a href='${patient}_freq_total_all.png'><img src='${patient}_freq_total_all.png' width='1280' height='720' /></a><br />" >> "$html" echo "<a href='${patient}_freq_indiv_all.png'><img src='${patient}_freq_indiv_all.png' width='1280' height='720' /></a><br /></div>" >> "$html" + echo "${scatterplot_tab}</div>" >> "$html" tail -n+2 ${patient}_reads.txt | sed "s/>//" > tmp.txt echo "<div class='tabbertab' title='Data reads'>" >> "$html" @@ -250,6 +255,7 @@ echo "<table border = 1 class='result_table summary_table' id='summary_table_${patient}_reads'>" >> "$html" 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" echo "<tbody>" >> "$html" + scatterplot_tab="<div class='tabbertab' title='Scatter Plots Reads'>" while read locus j_segment v_segment cut_off_value all one two three one_two one_three two_three do if [ "$locus" != "$oldLocus" ] ; then @@ -283,23 +289,26 @@ fi if [ "${one_two}" != "0" ] && [ "$cut_off_value" != "0" ] ; then - echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${sample2}_${locus}_${cut_off_value}.txt\", \"$patient\", \"reads\")'>${one_two}</td>" >> "$html" + echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${sample2}_${locus}_${cut_off_value}reads.txt\", \"$patient\", \"reads\")'>${one_two}</td>" >> "$html" else echo "<td>${one_two}</td>" >> "$html" fi if [ "${one_three}" != "0" ] && [ "$cut_off_value" != "0" ] ; then - echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${sample3}_${locus}_${cut_off_value}.txt\", \"$patient\", \"reads\")'>${one_three}</td>" >> "$html" + echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${sample3}_${locus}_${cut_off_value}reads.txt\", \"$patient\", \"reads\")'>${one_three}</td>" >> "$html" else echo "<td>${one_three}</td>" >> "$html" fi if [ "${two_three}" != "0" ] && [ "$cut_off_value" != "0" ] ; then - echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample2}_${sample3}_${locus}_${cut_off_value}.txt\", \"$patient\", \"reads\")'>${two_three}</td>" >> "$html" + echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample2}_${sample3}_${locus}_${cut_off_value}reads.txt\", \"$patient\", \"reads\")'>${two_three}</td>" >> "$html" else echo "<td>${two_three}</td>" >> "$html" fi echo "</tr>" >> "$html" oldLocus="$locus" + if [ "${cut_off_value}" == "0" ] ; then + scatterplot_tab="${scatterplot_tab}<img src='${sample1}_${sample2}_${sample3}_reads_${locus}_scatter.png' /><br />" + fi done < tmp.txt echo "</tbody></table>" >> "$html" echo "</td><td style='vertical-align:top;'><div id='result_div_${patient}_reads'></div></td></tr></table>" >> "$html" @@ -307,6 +316,7 @@ echo "<div class='tabbertab' title='Graphs reads'>" >> "$html" echo "<a href='${patient}_reads_total_all.png'><img src='${patient}_reads_total_all.png' width='1280' height='720' /></a><br />" >> "$html" echo "<a href='${patient}_reads_indiv_all.png'><img src='${patient}_reads_indiv_all.png' width='1280' height='720' /></a><br /></div>" >> "$html" + echo "${scatterplot_tab}</div>" >> "$html" echo "</div>" >> "$html" echo "</div>" >> "$html" echo "</html>" >> "$html" @@ -319,3 +329,4 @@ echo "</table>" >> "$html" echo "</html>" >> "$html" +