0
|
1 #!/bin/bash
|
|
2
|
|
3 inputFile=$1
|
|
4 outputFile=$2
|
|
5 outputDir=$3
|
3
|
6 min_freq=$4
|
|
7 min_cells=$5
|
29
|
8 merge_on="$6"
|
0
|
9
|
|
10 dir="$(cd "$(dirname "$0")" && pwd)"
|
|
11 mkdir $outputDir
|
|
12
|
3
|
13
|
29
|
14 Rscript --verbose $dir/RScript.r $inputFile $outputDir $outputFile $min_freq $min_cells "${merge_on}" 2>&1
|
0
|
15 cp $dir/jquery-1.11.0.min.js $outputDir
|
|
16 cp $dir/script.js $outputDir
|
|
17 cp $dir/style.css $outputDir
|
|
18 cp $dir/tabber.js $outputDir
|
|
19
|
|
20 echo "<html><center><h1><a href='index.html'>Click here for the results</a></h1>Tip: Open it in a new tab (middle mouse button or right mouse button -> 'open in new tab' on the link above)</center></html>" > $outputFile
|
|
21
|
|
22 cd $outputDir
|
|
23
|
4
|
24 header="<html><head><script type='text/javascript' src='jquery-1.11.0.min.js'></script><script type='text/javascript' src='tabber.js'></script><script type='text/javascript' src='script.js'></script><link rel='stylesheet' type='text/css' href='style.css'></head><div id='hidden_div' style='display: none;'></div>"
|
|
25 singles=()
|
|
26 pairs_BM_PB=()
|
|
27 pairs_Left_Right=()
|
|
28 pairs_R_Dx=()
|
|
29 while read patient sample1 sample2 type
|
0
|
30 do
|
|
31 echo "$patient"
|
4
|
32 html="${patient}.html"
|
9
|
33 echo "$header" > "$html"
|
4
|
34 if [[ "$type" == *pair* ]] ; then
|
|
35 if [[ "$sample1" == *_BM* ]] || [[ "$sample1" == *_PB* ]] ; then
|
|
36 pairs_BM_PB+=( "$patient" )
|
|
37 elif [[ "$sample1" == *_Left* ]] || [[ "$sample1" == *_Right* ]] ; then
|
|
38 pairs_Left_Right+=( "$patient" )
|
|
39 else
|
|
40 pairs_R_Dx+=( "$patient" )
|
|
41 fi
|
|
42 else
|
|
43 singles+=( "$patient" )
|
|
44 fi
|
0
|
45 oldLocus=""
|
|
46 sample1="$(echo ${sample1} | tr -d '\r' | tr -d '\n')"
|
|
47 sample2="$(echo ${sample2} | tr -d '\r' | tr -d '\n')"
|
|
48 tail -n+2 ${patient}_freq.txt | sed "s/>//" > tmp.txt
|
9
|
49 echo "<div class='tabber'>" >> "$html"
|
|
50 echo "<div class='tabbertab' title='Data frequency'>" >> "$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"
|
|
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"
|
30
|
55 scatterplot_tab="<div class='tabbertab' title='Scatter Plots Frequency'><table border='0'><tr>"
|
2
|
56 while read locus j_segment v_segment cut_off_value both one read_count1 two read_count2 sum percent locusreadsum1 locusreadsum2
|
0
|
57 do
|
|
58 if [ "$locus" != "$oldLocus" ] ; then
|
9
|
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"
|
0
|
61 else
|
9
|
62 echo "<td></td>" >> "$html"
|
0
|
63 fi
|
9
|
64 echo "<td>$v_segment</td>" >> "$html"
|
|
65 echo "<td>$j_segment</td>" >> "$html"
|
|
66 echo "<td>>$cut_off_value</td>" >> "$html"
|
0
|
67 if [ "$both" != "0" ] ; then
|
9
|
68 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${sample2}_${locus}_${cut_off_value}.txt\", \"$patient\", \"freq\")'>$both</td>" >> "$html"
|
0
|
69 else
|
9
|
70 echo "<td>$both</td>" >> "$html"
|
0
|
71 fi
|
|
72 if [ "$one" != "0" ] && [ "$cut_off_value" != "0" ] ; then
|
9
|
73 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${locus}_${cut_off_value}.txt\", \"$patient\", \"freq\")'>$one</td>" >> "$html"
|
0
|
74 else
|
9
|
75 echo "<td>$one</td>" >> "$html"
|
0
|
76 fi
|
9
|
77 echo "<td>$read_count1</td>" >> "$html"
|
0
|
78 if [ "$two" != "0" ] && [ "$cut_off_value" != "0" ] ; then
|
9
|
79 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample2}_${locus}_${cut_off_value}.txt\", \"$patient\", \"freq\")'>$two</td>" >> "$html"
|
0
|
80 else
|
9
|
81 echo "<td>$two</td>" >> "$html"
|
0
|
82 fi
|
9
|
83 echo "<td>$read_count2</td>" >> "$html"
|
|
84 echo "<td>$sum</td>" >> "$html"
|
|
85 echo "<td>${percent}%</td>" >> "$html"
|
|
86 echo "</tr>" >> "$html"
|
29
|
87 oldLocus="$locus"
|
|
88 if [ "${cut_off_value}" == "0" ] ; then
|
30
|
89 scatterplot_tab="${scatterplot_tab}<td><img src='${patient}_${sample1}_${sample2}_freq_${locus}_scatter.png' /></td>"
|
29
|
90 fi
|
0
|
91 done < tmp.txt
|
9
|
92 echo "</tbody></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"
|
|
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"
|
|
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"
|
30
|
99 echo "${scatterplot_tab}</tr></table></div>" >> "$html"
|
0
|
100
|
|
101 tail -n+2 ${patient}_reads.txt | sed "s/>//" > tmp.txt
|
9
|
102 echo "<div class='tabbertab' title='Data reads'>" >> "$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"
|
|
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"
|
30
|
107 scatterplot_tab="<div class='tabbertab' title='Scatter Plots Reads'><table border='0'><tr>"
|
2
|
108 while read locus j_segment v_segment cut_off_value both one read_count1 two read_count2 sum percent locusreadsum1 locusreadsum2
|
0
|
109 do
|
|
110 if [ "$locus" != "$oldLocus" ] ; then
|
9
|
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"
|
0
|
113 else
|
9
|
114 echo "<td></td>" >> "$html"
|
0
|
115 fi
|
9
|
116 echo "<td>$v_segment</td>" >> "$html"
|
|
117 echo "<td>$j_segment</td>" >> "$html"
|
|
118 echo "<td>>$cut_off_value</td>" >> "$html"
|
0
|
119 if [ "$both" != "0" ] ; then
|
9
|
120 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${sample2}_${locus}_${cut_off_value}.txt\", \"$patient\", \"reads\")'>$both</td>" >> "$html"
|
0
|
121 else
|
9
|
122 echo "<td>$both</td>" >> "$html"
|
0
|
123 fi
|
|
124 if [ "$one" != "0" ] && [ "$cut_off_value" != "0" ] ; then
|
9
|
125 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${locus}_${cut_off_value}.txt\", \"$patient\", \"reads\")'>$one</td>" >> "$html"
|
0
|
126 else
|
9
|
127 echo "<td>$one</td>" >> "$html"
|
0
|
128 fi
|
9
|
129 echo "<td>$read_count1</td>" >> "$html"
|
0
|
130 if [ "$two" != "0" ] && [ "$cut_off_value" != "0" ] ; then
|
9
|
131 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample2}_${locus}_${cut_off_value}.txt\", \"$patient\", \"reads\")'>$two</td>" >> "$html"
|
0
|
132 else
|
9
|
133 echo "<td>$two</td>" >> "$html"
|
0
|
134 fi
|
9
|
135 echo "<td>$read_count2</td>" >> "$html"
|
|
136 echo "<td>$sum</td>" >> "$html"
|
|
137 echo "<td>${percent}%</td>" >> "$html"
|
|
138 echo "</tr>" >> "$html"
|
0
|
139 oldLocus="$locus"
|
29
|
140 if [ "${cut_off_value}" == "0" ] ; then
|
30
|
141 scatterplot_tab="${scatterplot_tab}<td><img src='${patient}_${sample1}_${sample2}_reads_${locus}_scatter.png' /></td>"
|
29
|
142 fi
|
0
|
143 done < tmp.txt
|
9
|
144 echo "</tbody></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"
|
|
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"
|
|
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"
|
30
|
151 echo "${scatterplot_tab}</tr></table></div>" >> "$html"
|
9
|
152 echo "</div>" >> "$html"
|
|
153 echo "</div>" >> "$html"
|
|
154 echo "</html>" >> "$html"
|
0
|
155 done < patients.txt
|
4
|
156
|
|
157 html="index.html"
|
|
158 echo "<html>" > $html
|
9
|
159 echo "<table>" >> "$html"
|
29
|
160 echo "<tr><td><b>Singles (<a href='singles_freq_scatterplot.png'>Frequency scatterplot</a>, <a href='singles_reads_scatterplot.png'>Reads scatterplot</a>):</b></td></tr>" >> "$html"
|
4
|
161 for patient in "${singles[@]}"
|
|
162 do
|
9
|
163 echo "<tr><td><a href='${patient}.html'>$patient</a></td></tr>" >> "$html"
|
4
|
164 done
|
9
|
165 echo "<tr><td><b>Pairs (Left & Right):</b></td></tr>" >> "$html"
|
4
|
166 for patient in "${pairs_Left_Right[@]}"
|
|
167 do
|
9
|
168 echo "<tr><td><a href='${patient}.html'>$patient</a></td></tr>" >> "$html"
|
4
|
169 done
|
9
|
170 echo "<tr><td><b>Pairs (BM & PB):</b></td></tr>" >> "$html"
|
4
|
171 for patient in "${pairs_BM_PB[@]}"
|
|
172 do
|
9
|
173 echo "<tr><td><a href='${patient}.html'>$patient</a></td></tr>" >> "$html"
|
4
|
174 done
|
9
|
175 echo "<tr><td><b>Pairs (Dx & R):</b></td></tr>" >> "$html"
|
4
|
176 for patient in "${pairs_R_Dx[@]}"
|
|
177 do
|
9
|
178 echo "<tr><td><a href='${patient}.html'>$patient</a></td></tr>" >> "$html"
|
4
|
179 done
|
9
|
180 echo "<tr><td><b>Triplets:</b></td></tr>" >> "$html"
|
4
|
181
|
7
|
182 while read sample1 sample2 sample3
|
|
183 do
|
|
184 sample1="$(echo ${sample1} | tr -d '\r' | tr -d '\n')"
|
|
185 sample2="$(echo ${sample2} | tr -d '\r' | tr -d '\n')"
|
|
186 sample3="$(echo ${sample3} | tr -d '\r' | tr -d '\n')"
|
|
187 patient="${sample1}_${sample2}_${sample3}"
|
|
188 echo "$patient"
|
|
189 html="${patient}.html"
|
|
190 echo "<tr><td><a href='${patient}.html'>$patient</a></td></tr>" >> "index.html"
|
|
191 echo "$header" > $html
|
|
192 oldLocus=""
|
|
193 tail -n+2 ${patient}_freq.txt | sed "s/>//" > tmp.txt
|
9
|
194 echo "<div class='tabber'>" >> "$html"
|
|
195 echo "<div class='tabbertab' title='Data frequency'>" >> "$html"
|
|
196 echo "<table><tr><td style='vertical-align:top;'>" >> "$html"
|
|
197 echo "<table border = 1 class='result_table summary_table' id='summary_table_${patient}_freq'>" >> "$html"
|
21
|
198 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"
|
9
|
199 echo "<tbody>" >> "$html"
|
23
|
200 scatterplot_tab="<div class='tabbertab' title='Scatter Plots Frequency'>"
|
21
|
201 while read locus j_segment v_segment cut_off_value all one two three one_two one_three two_three
|
7
|
202 do
|
|
203 if [ "$locus" != "$oldLocus" ] ; then
|
9
|
204 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"
|
|
205 echo "<tr><td><b>$locus</b></td>" >> "$html"
|
7
|
206 else
|
9
|
207 echo "<td></td>" >> "$html"
|
7
|
208 fi
|
9
|
209 echo "<td>$v_segment</td>" >> "$html"
|
|
210 echo "<td>$j_segment</td>" >> "$html"
|
|
211 echo "<td>>$cut_off_value</td>" >> "$html"
|
7
|
212 if [ "$all" != "0" ] ; then
|
9
|
213 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${sample2}_${sample3}_${locus}_${cut_off_value}.txt\", \"$patient\", \"freq\")'>$all</td>" >> "$html"
|
7
|
214 else
|
9
|
215 echo "<td>$all</td>" >> "$html"
|
7
|
216 fi
|
|
217 if [ "$one" != "0" ] && [ "$cut_off_value" != "0" ] ; then
|
9
|
218 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${locus}_${cut_off_value}.txt\", \"$patient\", \"freq\")'>$one</td>" >> "$html"
|
7
|
219 else
|
9
|
220 echo "<td>$one</td>" >> "$html"
|
21
|
221 fi
|
7
|
222 if [ "$two" != "0" ] && [ "$cut_off_value" != "0" ] ; then
|
9
|
223 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample2}_${locus}_${cut_off_value}.txt\", \"$patient\", \"freq\")'>$two</td>" >> "$html"
|
7
|
224 else
|
9
|
225 echo "<td>$two</td>" >> "$html"
|
7
|
226 fi
|
|
227 if [ "$three" != "0" ] && [ "$cut_off_value" != "0" ] ; then
|
9
|
228 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample3}_${locus}_${cut_off_value}.txt\", \"$patient\", \"freq\")'>$three</td>" >> "$html"
|
7
|
229 else
|
9
|
230 echo "<td>$three</td>" >> "$html"
|
7
|
231 fi
|
21
|
232
|
|
233 if [ "${one_two}" != "0" ] && [ "$cut_off_value" != "0" ] ; then
|
23
|
234 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"
|
21
|
235 else
|
|
236 echo "<td>${one_two}</td>" >> "$html"
|
|
237 fi
|
|
238 if [ "${one_three}" != "0" ] && [ "$cut_off_value" != "0" ] ; then
|
23
|
239 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"
|
21
|
240 else
|
|
241 echo "<td>${one_three}</td>" >> "$html"
|
|
242 fi
|
|
243 if [ "${two_three}" != "0" ] && [ "$cut_off_value" != "0" ] ; then
|
23
|
244 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"
|
21
|
245 else
|
|
246 echo "<td>${two_three}</td>" >> "$html"
|
|
247 fi
|
|
248
|
9
|
249 echo "</tr>" >> "$html"
|
23
|
250 oldLocus="$locus"
|
|
251 if [ "${cut_off_value}" == "0" ] ; then
|
|
252 scatterplot_tab="${scatterplot_tab}<img src='${sample1}_${sample2}_${sample3}_freq_${locus}_scatter.png' /><br />"
|
|
253 fi
|
7
|
254 done < tmp.txt
|
9
|
255 echo "</tbody></table>" >> "$html"
|
|
256 echo "</td><td style='vertical-align:top;'><div id='result_div_${patient}_freq'></div></td></tr></table>" >> "$html"
|
|
257 echo "</div>" >> "$html"
|
|
258 echo "<div class='tabbertab' title='Graphs frequency'>" >> "$html"
|
|
259 echo "<a href='${patient}_freq_total_all.png'><img src='${patient}_freq_total_all.png' width='1280' height='720' /></a><br />" >> "$html"
|
|
260 echo "<a href='${patient}_freq_indiv_all.png'><img src='${patient}_freq_indiv_all.png' width='1280' height='720' /></a><br /></div>" >> "$html"
|
23
|
261 echo "${scatterplot_tab}</div>" >> "$html"
|
7
|
262
|
|
263 tail -n+2 ${patient}_reads.txt | sed "s/>//" > tmp.txt
|
9
|
264 echo "<div class='tabbertab' title='Data reads'>" >> "$html"
|
|
265 echo "<table><tr><td style='vertical-align:top;'>" >> "$html"
|
|
266 echo "<table border = 1 class='result_table summary_table' id='summary_table_${patient}_reads'>" >> "$html"
|
21
|
267 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"
|
9
|
268 echo "<tbody>" >> "$html"
|
23
|
269 scatterplot_tab="<div class='tabbertab' title='Scatter Plots Reads'>"
|
21
|
270 while read locus j_segment v_segment cut_off_value all one two three one_two one_three two_three
|
7
|
271 do
|
|
272 if [ "$locus" != "$oldLocus" ] ; then
|
9
|
273 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"
|
|
274 echo "<tr><td><b>$locus</b></td>" >> "$html"
|
7
|
275 else
|
9
|
276 echo "<td></td>" >> "$html"
|
7
|
277 fi
|
9
|
278 echo "<td>$v_segment</td>" >> "$html"
|
|
279 echo "<td>$j_segment</td>" >> "$html"
|
|
280 echo "<td>>$cut_off_value</td>" >> "$html"
|
7
|
281 if [ "$all" != "0" ] ; then
|
9
|
282 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${sample2}_${sample3}_${locus}_${cut_off_value}.txt\", \"$patient\", \"reads\")'>$all</td>" >> "$html"
|
7
|
283 else
|
9
|
284 echo "<td>$all</td>" >> "$html"
|
7
|
285 fi
|
|
286 if [ "$one" != "0" ] && [ "$cut_off_value" != "0" ] ; then
|
9
|
287 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample1}_${locus}_${cut_off_value}.txt\", \"$patient\", \"reads\")'>$one</td>" >> "$html"
|
7
|
288 else
|
9
|
289 echo "<td>$one</td>" >> "$html"
|
7
|
290 fi
|
|
291 if [ "$two" != "0" ] && [ "$cut_off_value" != "0" ] ; then
|
9
|
292 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample2}_${locus}_${cut_off_value}.txt\", \"$patient\", \"reads\")'>$two</td>" >> "$html"
|
7
|
293 else
|
9
|
294 echo "<td>$two</td>" >> "$html"
|
7
|
295 fi
|
|
296 if [ "$three" != "0" ] && [ "$cut_off_value" != "0" ] ; then
|
9
|
297 echo "<td data-patient='${patient}' style='cursor:pointer' onclick='javascript:loadfile(\"${sample3}_${locus}_${cut_off_value}.txt\", \"$patient\", \"reads\")'>$three</td>" >> "$html"
|
7
|
298 else
|
9
|
299 echo "<td>$three</td>" >> "$html"
|
7
|
300 fi
|
21
|
301
|
|
302 if [ "${one_two}" != "0" ] && [ "$cut_off_value" != "0" ] ; then
|
23
|
303 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"
|
21
|
304 else
|
|
305 echo "<td>${one_two}</td>" >> "$html"
|
|
306 fi
|
|
307 if [ "${one_three}" != "0" ] && [ "$cut_off_value" != "0" ] ; then
|
23
|
308 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"
|
21
|
309 else
|
|
310 echo "<td>${one_three}</td>" >> "$html"
|
|
311 fi
|
|
312 if [ "${two_three}" != "0" ] && [ "$cut_off_value" != "0" ] ; then
|
23
|
313 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"
|
21
|
314 else
|
|
315 echo "<td>${two_three}</td>" >> "$html"
|
|
316 fi
|
|
317
|
9
|
318 echo "</tr>" >> "$html"
|
7
|
319 oldLocus="$locus"
|
23
|
320 if [ "${cut_off_value}" == "0" ] ; then
|
|
321 scatterplot_tab="${scatterplot_tab}<img src='${sample1}_${sample2}_${sample3}_reads_${locus}_scatter.png' /><br />"
|
|
322 fi
|
7
|
323 done < tmp.txt
|
9
|
324 echo "</tbody></table>" >> "$html"
|
|
325 echo "</td><td style='vertical-align:top;'><div id='result_div_${patient}_reads'></div></td></tr></table>" >> "$html"
|
|
326 echo "</div>" >> "$html"
|
|
327 echo "<div class='tabbertab' title='Graphs reads'>" >> "$html"
|
|
328 echo "<a href='${patient}_reads_total_all.png'><img src='${patient}_reads_total_all.png' width='1280' height='720' /></a><br />" >> "$html"
|
|
329 echo "<a href='${patient}_reads_indiv_all.png'><img src='${patient}_reads_indiv_all.png' width='1280' height='720' /></a><br /></div>" >> "$html"
|
23
|
330 echo "${scatterplot_tab}</div>" >> "$html"
|
9
|
331 echo "</div>" >> "$html"
|
|
332 echo "</div>" >> "$html"
|
|
333 echo "</html>" >> "$html"
|
7
|
334 done < triplets.txt
|
|
335 rm tmp.txt
|
|
336
|
|
337
|
|
338 html="index.html"
|
|
339
|
9
|
340 echo "</table>" >> "$html"
|
|
341 echo "</html>" >> "$html"
|
4
|
342
|
23
|
343
|