7
|
1 #!/bin/bash
|
|
2
|
|
3 #########################################
|
|
4 ### SPECIFY THE NUMBER OF CPU ###
|
|
5 #########################################
|
|
6 cpu=8
|
|
7
|
|
8
|
|
9
|
|
10
|
|
11
|
|
12 #########################################
|
|
13 ### Recover the arguments ###
|
|
14 #########################################
|
|
15 html=$1;shift
|
|
16 len_file_path=$1;shift
|
|
17 estimSign=$1;shift
|
|
18 parameters=$1;shift
|
|
19 working_dir=`pwd`
|
|
20
|
|
21
|
|
22
|
|
23 mkdir in
|
|
24 cd in
|
|
25
|
|
26 names=$(sed 's/\s/_/g' <<< $*)
|
|
27 names=$(sed 's/_\// \//g' <<< $names)
|
|
28 names=$(sed 's/_annotated//g' <<< $names)
|
|
29 names=$(sed 's/_filtered//g' <<< $names)
|
|
30 names=$(sed 's/\.txt_/_/' <<< $names)
|
|
31
|
|
32 for name in ${names}
|
|
33 do
|
|
34 file=$(sed 's/=/ /' <<< $name);
|
|
35 echo $file
|
|
36 ln -s $file
|
|
37 done
|
|
38 cd ..
|
|
39
|
|
40 output_dir=${html%%.*}_files
|
|
41
|
|
42
|
|
43 #########################################
|
|
44 ### Calculates the statistics ###
|
|
45 #########################################
|
|
46
|
|
47 perl $SCRIPT_PATH/mutspecStat.pl --outfile $output_dir \
|
|
48 --temp "$working_dir/temp" \
|
|
49 --pathRscript $SCRIPT_PATH \
|
|
50 $parameters \
|
|
51 $working_dir/in
|
|
52
|
|
53
|
|
54 #########################################
|
|
55 ### Estimate the number of signatures ###
|
|
56 #########################################
|
|
57 if [[ $estimSign > 0 ]]; then
|
|
58 Rscript $SCRIPT_PATH/R/estimateSign_Galaxy.r --input $output_dir/Mutational_Analysis/Figures/Input_NMF/Input_NMF_Count.txt --stop $estimSign --cpu $cpu --output $output_dir/Mutational_Analysis/Figures/Estimate_Number_Signatures.png 2>&1
|
|
59 fi
|
|
60
|
|
61
|
|
62 #########################################
|
|
63 ### Create css #
|
|
64 #########################################
|
|
65 css=$output_dir/Mutational_Analysis/style.css
|
|
66 echo ".legend{position:relative}.legend .legend-hidden{display:none;position:absolute;background-color:#fff;border:3px solid #03F;padding:3px;color:#000;font-size:1em;border-radius:10px;margin-top:-40px}.legend:hover .legend-hidden{display:block}" > $css
|
|
67
|
|
68
|
|
69 #########################################
|
|
70 ### Create an archive with all results #
|
|
71 #########################################
|
|
72 cd $output_dir
|
|
73 zip -r "$output_dir/Mutational_Analysis.zip" "Mutational_Analysis"
|
|
74
|
|
75
|
|
76
|
|
77 # HMTL page for the result of the tool
|
|
78 echo "<html>" >> $html
|
|
79 echo "<body>" >> $html
|
|
80
|
|
81 if [ -d $output_dir/Mutational_Analysis/Figures ]; then
|
|
82
|
|
83 echo "<center> <h2>Mutational spectra report summary</h2> </center>" >> $html
|
|
84
|
|
85 echo "<br/> Download the results" >> $html
|
|
86 echo "<br/><a href="Mutational_Analysis.zip">Mutational_Analysis.zip</a><br/>" >> $html
|
|
87
|
|
88 echo "<br/> Download the full report in Excel" >> $html
|
|
89
|
|
90 ## One report with all the samples. Specify the full path
|
|
91 if [[ -e "$output_dir/Mutational_Analysis/Report_Mutation_Spectra.xls" ]]
|
|
92 then
|
|
93 # Interpreted by Galaxy so don't need the full path
|
|
94 echo "<br/><a href="Mutational_Analysis/Report_Mutation_Spectra.xls">Report_Mutation_Spectra.xls</a>" >> $html
|
|
95 fi
|
|
96 ## One report for each samples
|
|
97 for file in $names
|
|
98 do
|
|
99 name=$(echo ${file}| cut -d"=" -f2)
|
|
100 name=${name%.*}
|
|
101
|
|
102 # One report for each samples
|
|
103 if [[ -e "$output_dir/Mutational_Analysis/Report_Mutation_Spectra-$name.xls" ]]
|
|
104 then
|
|
105 echo "<br/><a href="Mutational_Analysis/Report_Mutation_Spectra-$name.xls">Report_Mutation_Spectra-$name.xls</a>" >> $html
|
|
106 fi
|
|
107 done
|
|
108 ## One report for each samples: Pool_Data
|
|
109 if [[ $parameters =~ "--pooldata" ]]; then
|
|
110 if [[ -e "$output_dir/Mutational_Analysis/Report_Mutation_Spectra-Pool_Data.xls" ]]; then
|
|
111 echo "<br/><a href="Mutational_Analysis/Report_Mutation_Spectra-Pool_Data.xls">Report_Mutation_Spectra-Pool_Data.xls</a>" >> $html
|
|
112 fi
|
|
113 fi
|
|
114
|
|
115
|
|
116 ## Input file for NMF
|
|
117 if [[ -e "$output_dir/Mutational_Analysis/Figures/Input_NMF/Input_NMF_Count.txt" ]]
|
|
118 then
|
|
119 # Interpreted by Galaxy so don't need the full path
|
|
120 echo "<br/><br/> Download the input file for the tool mutSpec-NMF" >> $html
|
|
121 echo "<br/><a href="Mutational_Analysis/Figures/Input_NMF/Input_NMF_Count.txt">Input_NMF_Count.txt</a><br/>" >> $html
|
|
122 fi
|
|
123
|
|
124 ## Computed statistics for estimating the number of signatures
|
|
125 if [[ $estimSign > 0 ]]; then
|
|
126 echo "<br/> Link to the computed statistics for estimating the number of signatures <br/>" >> $html
|
|
127 if [[ -e "$output_dir/Mutational_Analysis/Figures/Estimate_Number_Signatures.png" ]]; then
|
|
128 outEstimateSign="$output_dir/Mutational_Analysis/EstimatingSignatures.html"
|
|
129 touch $outEstimateSign
|
|
130 echo "<a href='Mutational_Analysis/EstimatingSignatures.html'>Estimating the number of signatures</a><br/>" >> $html
|
|
131 echo "<br/> <center> <h2>Computed statistics for estimating the number of signatures</h2> </center> <br/>" >> $outEstimateSign
|
|
132 echo "Several approaches have been proposed to choose the optimal number of signatures to extract with NMF. <br/>
|
|
133 Brunet et al. 2004, proposed to take the first number of signature for which the cophenetic coefficient starts decreasing, <br/>
|
|
134 Hutchins et al. 2008, suggested to choose the first value where the RSS curve presents an inflection point. <br/>
|
|
135 Frigyesi et al. 2008, considered the smallest value at which the decrease in the RSS is lower than the decrease of the RSS obtained from random data. <br/><br/>
|
|
136 The estimation are based on Brunet’s algorithm computed from 50 runs for each value of signature to estimate. <br/> <br/>
|
|
137 The original data are shuffled for comparing the quality measures obtained with our data (Data x) and from randomized data (Data y). The curves for the actual data are in solid line, those for the randomized data are in dashed line. <br/> <br/>" >> $outEstimateSign
|
|
138 echo "<img src="Figures/Estimate_Number_Signatures.png width="1000""/><br/></td>" >> $outEstimateSign
|
|
139 else
|
|
140 echo "<br/>There is not enough mutations for estimating the number of signatures <br/>" >> $html
|
|
141 echo "Read the tool standard output for more detail<br/>" >> $html
|
|
142 fi
|
|
143 fi
|
|
144
|
|
145
|
|
146 ## HMTL Link to the samples
|
|
147 echo "<br/> Link to individual samples <br/>" >> $html
|
|
148
|
|
149
|
|
150 ## Consider only samples with at least one mutation
|
|
151 for file in `ls $output_dir/Mutational_Analysis/Figures/Impact_protein_sequence`
|
|
152 do
|
|
153
|
|
154 name=$(echo ${file}| cut -d"=" -f2)
|
|
155 name=${name%.*}
|
|
156
|
|
157 ## Pool Data is handle separately
|
|
158 if [ $name = "Pool_Data" ]; then
|
|
159 continue
|
|
160 fi
|
|
161
|
|
162 outfile="$output_dir/Mutational_Analysis/$name.html"
|
|
163 touch $outfile # Create an empty file named $outfile
|
|
164 echo "<a href='Mutational_Analysis/$name.html'>$name</a><br/>" >> $html
|
|
165
|
|
166 #-----------------------------------------------------------------------------------------------------------------------------------------------------#
|
|
167 # INDIVIDUAL SAMPLES #
|
|
168 #-----------------------------------------------------------------------------------------------------------------------------------------------------#
|
|
169 echo "<br/> <center> <h2>Mutational Spectra report for $name</h2> </center> <br/>" >> $outfile
|
|
170
|
|
171 echo "<html>" >> $outfile
|
|
172
|
|
173 echo "<head>" >> $outfile
|
|
174 echo "<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">" >> $outfile
|
|
175 # Link to the css style file for having a legend when we pass the mouse on the figures
|
|
176 echo "<link rel="stylesheet" href="style.css" />" >> $outfile
|
|
177 echo "</head>" >> $outfile
|
|
178
|
|
179 echo "<body>" >> $outfile
|
|
180
|
|
181 echo "<table>" >> $outfile
|
|
182 echo "<tr>" >> $outfile
|
|
183 echo "<th><h3>Overall mutation distribution</h3></th>" >> $outfile
|
|
184 echo "<th><h3>Impact on protein sequence</h3></th>" >> $outfile
|
|
185 echo "</tr><tr>" >> $outfile
|
|
186 echo "<td> <center> <a href="Figures/Overall_mutation_distribution/$name/$name-OverallMutationDistribution.txt">$name-OverallMutationDistribution.txt</a> </center> </td>" >> $outfile
|
|
187 echo "<td> <center> <a href="Figures/Impact_protein_sequence/$name/$name-DistributionExoFunc.txt">$name-DistributionExoFunc.txt</a> </center> </td>" >> $outfile
|
|
188 echo "</tr><tr>" >> $outfile
|
|
189
|
|
190 echo "<td>" >> $outfile
|
|
191 echo "<span class="legend"><img src="Figures/Overall_mutation_distribution/$name/$name-OverallMutationDistribution.png width="280""/>" >> $outfile
|
|
192 echo "<span class="legend-hidden">" >> $outfile
|
|
193 echo "<center><B>Overall Mutation Distribution</center></B><br/>Proportion of all mutation types (total count are indicated in parenthesis). For indels the counts are based on annotation retrieved from the database ExonicFunc.refGene<br/>" >> $outfile
|
|
194 echo "</td>" >> $outfile
|
|
195 echo "<td>" >> $outfile
|
|
196 echo "<span class="legend"><img src="Figures/Impact_protein_sequence/$name/$name-DistributionExoFunc.png width="400""/>" >> $outfile
|
|
197 echo "<span class="legend-hidden">" >> $outfile
|
|
198 echo "<center><B>Graph 1. Impact on protein sequence</center></B><br/>Impact of all mutations (SBS and Indel) on the protein sequence based on the ExonicFunc.refGene annotation<br/>" >> $outfile
|
|
199 echo "</td>" >> $outfile
|
|
200
|
|
201 echo "</tr>" >> $outfile
|
|
202 echo "</table>" >> $outfile
|
|
203
|
|
204 echo "<br/><br/>" >> $outfile
|
|
205
|
|
206
|
|
207 echo "<table>" >> $outfile
|
|
208 echo "<tr>" >> $outfile
|
|
209 echo "<th><h3>SBS distribution</h3></th>" >> $outfile
|
|
210 echo "<th><h3>Stranded distribution of SBS</h3></th>" >> $outfile
|
|
211 echo "</tr><tr>" >> $outfile
|
|
212 echo "<td> <center> <a href="Figures/SBS_distribution/$name/$name-SBS_distribution.txt">$name-SBS_distribution.txt</a> </center> </td>" >> $outfile
|
|
213 echo "<td> <center> <a href="Figures/Stranded_Analysis/$name/$name-StrandBias.txt">$name-StrandBias.txt</a> </center> </td>" >> $outfile
|
|
214 echo "</tr><tr>" >> $outfile
|
|
215
|
|
216 echo "<td>" >> $outfile
|
|
217 echo "<span class="legend"><img src="Figures/SBS_distribution/$name/$name-SBS_distribution.png width="550""/>" >> $outfile
|
|
218 echo "<span class="legend-hidden">" >> $outfile
|
|
219 echo "<center><B>Graph 2. SBS distribution</center></B><br/>Proportion of each type of single base substitution (SBS)<br/>" >> $outfile
|
|
220 echo "</td>" >> $outfile
|
|
221 echo "<td>" >> $outfile
|
|
222 echo "<span class="legend"><img src="Figures/Stranded_Analysis/$name/$name-StrandBias.png width="400""/>" >> $outfile
|
|
223 echo "<span class="legend-hidden">" >> $outfile
|
|
224 echo "<center><B>Graph 3. Stranded distribution of SBS</center></B><br/>Count of the six substitution types on the transcribed and non-transcribed strand<br/>" >> $outfile
|
|
225 echo "</td>" >> $outfile
|
|
226
|
|
227 echo "</tr>" >> $outfile
|
|
228 echo "</table>" >> $outfile
|
|
229
|
|
230
|
|
231 echo "<br/><br/>" >> $outfile
|
|
232
|
|
233
|
|
234 ######################################################
|
|
235 # Trinucleotide sequence context of SBS on genomic #
|
|
236 ######################################################
|
|
237 echo "<table>" >> $outfile
|
|
238 echo "<h3>Trinucleotide sequence context of SBS on the genomic sequence</h3>" >> $outfile
|
|
239 echo "<tr>" >> $outfile
|
|
240 echo "<td> <center> <a href="Figures/Trinucleotide_Sequence_Context/$name/$name-MutationSpectraPercent-Genomic.txt">$name-MutationSpectraPercent.txt</a> </center> </td>" >> $outfile
|
|
241 echo "<td> <center> <a href="Figures/Trinucleotide_Sequence_Context/$name/$name-HeatmapPercent-Genomic.txt">$name-HeatmapPercent-Genomic.txt</a> </center> </td>" >> $outfile
|
|
242 echo "</tr><tr>" >> $outfile
|
|
243
|
|
244 echo "<td>" >> $outfile
|
|
245 echo "<span class="legend"><img src="Figures/Trinucleotide_Sequence_Context/$name/$name-MutationSpectraPercent-Genomic.png width="1000""/>" >> $outfile
|
|
246 echo "<span class="legend-hidden">" >> $outfile
|
|
247 echo "<center><B>Panel 1. Trinucleotide sequence context of SBS on the genomic sequence</center></B><br/>Proportion of the six substitution types with their trinucleotide sequence context (total number of mutation is shown in parenthesis)<br/>" >> $outfile
|
|
248 echo "</td>" >> $outfile
|
|
249 echo "<td>" >> $outfile
|
|
250 echo "<span class="legend"><img src="Figures/Trinucleotide_Sequence_Context/$name/$name-HeatmapPercent-Genomic.png width="250""/>" >> $outfile
|
|
251 echo "<span class="legend-hidden">" >> $outfile
|
|
252 echo "<center><B>Panel 1. Trinucleotide sequence context of SBS on the genomic sequence</center></B><br/>Proportion of the six substitution types with their trinucleotide sequence context<br/>" >> $outfile
|
|
253 echo "</td>" >> $outfile
|
|
254
|
|
255 echo "</tr>" >> $outfile
|
|
256 echo "</table>" >> $outfile
|
|
257
|
|
258
|
|
259 echo "<br/><br/>" >> $outfile
|
|
260
|
|
261
|
|
262 ##############################################################
|
|
263 # Trinucleotide sequence context of SBS on coding sequence #
|
|
264 ##############################################################
|
|
265 echo "<table>" >> $outfile
|
|
266 echo "<h3>Stranded analysis of trinucleotide sequence context of SBS</h3>" >> $outfile
|
|
267 echo "<tr>" >> $outfile
|
|
268 echo "<td> <center> <a href="Figures/Stranded_Analysis/$name/$name-StrandedSignaturePercent.txt">$name-StrandedSignaturePercent.txt</a> </center> </td>" >> $outfile
|
|
269 echo "</tr><tr>" >> $outfile
|
|
270
|
|
271 echo "<td>" >> $outfile
|
|
272 echo "<span class="legend"><img src="Figures/Stranded_Analysis/$name/$name-StrandedSignaturePercent.png width="1300""/>" >> $outfile
|
|
273 echo "<span class="legend-hidden">" >> $outfile
|
|
274 echo "<center><B>Panel 2. Stranded analysis of trinucleotide sequence context of SBS</center></B><br/>Proportion of SBS with their trinucleotide context considering the non-transcribed and transcribed strand<br/>" >> $outfile
|
|
275 echo "</td>" >> $outfile
|
|
276 echo "</tr>" >> $outfile
|
|
277 echo "</table>" >> $outfile
|
|
278
|
|
279 echo "<br/><br/>" >> $outfile
|
|
280
|
|
281
|
|
282 #############################################
|
|
283 # Sequence logo generated with Weblogo3 #
|
|
284 #############################################
|
|
285 echo "<table>" >> $outfile
|
|
286 echo "<h3>Wider sequence context with Weblogo3</h3>" >> $outfile
|
|
287 # Legende de la figure : Panel 3. Wider sequence context on genomic strand generated with Weblogo3
|
|
288
|
|
289 # C>A
|
|
290 echo "<tr>" >> $outfile
|
|
291 if [[ ! -e "$output_dir/Mutational_Analysis/Figures/WebLogo/$name/$name-CA-Probability.png" ]]; then
|
|
292 echo "<td>WARNING: No sequence for C>A </br> </td>" >> $outfile
|
|
293 else
|
|
294 echo "<td><a href="Figures/WebLogo/$name/$name-CA.fa">$name-CA.fa</a><br/>" >> $outfile
|
|
295 echo "<img src="Figures/WebLogo/$name/$name-CA-Probability.png width="600" "/><br/></td>" >> $outfile
|
|
296 fi
|
|
297 # C>G
|
|
298 if [[ ! -e "$output_dir/Mutational_Analysis/Figures/WebLogo/$name/$name-CG-Probability.png" ]]; then
|
|
299 echo "<td> WARNING: No sequence for C>G </br> </td>" >> $outfile
|
|
300 else
|
|
301 echo "<td><a href="Figures/WebLogo/$name/$name-CG.fa">$name-CG.fa</a><br/>" >> $outfile
|
|
302 echo "<img src="Figures/WebLogo/$name/$name-CG-Probability.png width="600" "/><br/></td>" >> $outfile
|
|
303 fi
|
|
304 # C>T
|
|
305 if [[ ! -e "$output_dir/Mutational_Analysis/Figures/WebLogo/$name/$name-CT-Probability.png" ]]; then
|
|
306 echo "<td> WARNING: No sequence for C>T </br> </td>" >> $outfile
|
|
307 else
|
|
308 echo "<td><a href="Figures/WebLogo/$name/$name-CT.fa">$name-CT.fa</a><br/>" >> $outfile
|
|
309 echo "<img src="Figures/WebLogo/$name/$name-CT-Probability.png width="600" "/><br/></td>" >> $outfile
|
|
310 fi
|
|
311 echo "</tr>" >> $outfile
|
|
312
|
|
313 # T>A
|
|
314 echo "<tr>" >> $outfile
|
|
315 if [[ ! -e "$output_dir/Mutational_Analysis/Figures/WebLogo/$name/$name-TA-Probability.png" ]]; then
|
|
316 echo "<td>WARNING: No sequence for T>A </br> </td>" >> $outfile
|
|
317 else
|
|
318 echo "<td><a href="Figures/WebLogo/$name/$name-TA.fa">$name-TA.fa</a><br/>" >> $outfile
|
|
319 echo "<img src="Figures/WebLogo/$name/$name-TA-Probability.png width="600" "/><br/></td>" >> $outfile
|
|
320 fi
|
|
321 # T>C
|
|
322 if [[ ! -e "$output_dir/Mutational_Analysis/Figures/WebLogo/$name/$name-TC-Probability.png" ]]; then
|
|
323 echo "<td>WARNING: No sequence for T>C </br> </td>" >> $outfile
|
|
324 else
|
|
325 echo "<td><a href="Figures/WebLogo/$name/$name-TC.fa">$name-TC.fa</a><br/>" >> $outfile
|
|
326 echo "<img src="Figures/WebLogo/$name/$name-TC-Probability.png width="600" "/><br/></td>" >> $outfile
|
|
327 fi
|
|
328 # T>G
|
|
329 if [[ ! -e "$output_dir/Mutational_Analysis/Figures/WebLogo/$name/$name-TG-Probability.png" ]]; then
|
|
330 echo "<td>WARNING: No sequence for T>G </br> </td>" >> $outfile
|
|
331 else
|
|
332 echo "<td><a href="Figures/WebLogo/$name/$name-TG.fa">$name-TG.fa</a><br/>" >> $outfile
|
|
333 echo "<img src="Figures/WebLogo/$name/$name-TG-Probability.png width="600" "/><br/></td>" >> $outfile
|
|
334 fi
|
|
335 echo "</tr>" >> $outfile
|
|
336
|
|
337 echo "</table>" >> $outfile
|
|
338
|
|
339 echo "</body></html>" >> $outfile
|
|
340
|
|
341 done
|
|
342
|
|
343 #-----------------------------------------------------------------------------------------------------------------------------------------------------#
|
|
344 # POOL DATA #
|
|
345 #-----------------------------------------------------------------------------------------------------------------------------------------------------#
|
|
346 ## HMTL Link to Pool_Data
|
|
347 if [[ $parameters =~ "--pooldata" ]]; then
|
|
348 outfilePoolData="$output_dir/Mutational_Analysis/Pool_Data.html"
|
|
349 touch $outfilePoolData # Create an empty file named $outfile
|
|
350 echo "<a href='Mutational_Analysis/Pool_Data.html'>Pool_Data</a><br/>" >> $html
|
|
351
|
|
352
|
|
353 echo "<br/> <center> <h2>Mutational Spectra report for Pool_Data</h2> </center> <br/>" >> $outfilePoolData
|
|
354 echo "<html>" >> $outfilePoolData
|
|
355
|
|
356 echo "<head>" >> $outfilePoolData
|
|
357 echo "<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">" >> $outfilePoolData
|
|
358 # Link to the css style file for having a legend when we pass the mouse on the figures
|
|
359 echo "<link rel="stylesheet" href="style.css" />" >> $outfilePoolData
|
|
360 echo "</head>" >> $outfilePoolData
|
|
361
|
|
362 echo "<body>" >> $outfilePoolData
|
|
363
|
|
364 echo "<table>" >> $outfilePoolData
|
|
365 echo "<tr>" >> $outfilePoolData
|
|
366 echo "<th><h3>Overall mutation distribution</h3></th>" >> $outfilePoolData
|
|
367 echo "<th><h3>Impact on protein sequence</h3></th>" >> $outfilePoolData
|
|
368 echo "</tr><tr>" >> $outfilePoolData
|
|
369 echo "<td> <center> <a href="Figures/Overall_mutation_distribution/Pool_Data/Pool_Data-OverallMutationDistribution.txt">Pool_Data-OverallMutationDistribution.txt</a> </center> </td>" >> $outfilePoolData
|
|
370 echo "<td> <center> <a href="Figures/Impact_protein_sequence/Pool_Data/Pool_Data-DistributionExoFunc.txt">Pool_Data-DistributionExoFunc.txt</a> </center> </td>" >> $outfilePoolData
|
|
371 echo "</tr><tr>" >> $outfilePoolData
|
|
372
|
|
373 echo "<td>" >> $outfilePoolData
|
|
374 echo "<span class="legend"><img src="Figures/Overall_mutation_distribution/Pool_Data/Pool_Data-OverallMutationDistribution.png width="280""/>" >> $outfilePoolData
|
|
375 echo "<span class="legend-hidden">" >> $outfilePoolData
|
|
376 echo "<center><B>Overall Mutation Distribution</center></B><br/>Proportion of all mutation types (total count are indicated in parenthesis). For indels the counts are based on annotation retrieved from the database ExonicFunc.refGene<br/>" >> $outfilePoolData
|
|
377 echo "</td>" >> $outfilePoolData
|
|
378 echo "<td>" >> $outfilePoolData
|
|
379 echo "<span class="legend"><img src="Figures/Impact_protein_sequence/Pool_Data/Pool_Data-DistributionExoFunc.png width="400""/>" >> $outfilePoolData
|
|
380 echo "<span class="legend-hidden">" >> $outfilePoolData
|
|
381 echo "<center><B>Graph 1. Impact on protein sequence</center></B><br/>Impact of all mutations (SBS and Indel) on the protein sequence based on the ExonicFunc.refGene annotation<br/>" >> $outfilePoolData
|
|
382 echo "</td>" >> $outfilePoolData
|
|
383
|
|
384 echo "</tr>" >> $outfilePoolData
|
|
385 echo "</table>" >> $outfilePoolData
|
|
386
|
|
387 echo "<br/><br/>" >> $outfilePoolData
|
|
388
|
|
389
|
|
390 echo "<table>" >> $outfilePoolData
|
|
391 echo "<tr>" >> $outfilePoolData
|
|
392 echo "<th><h3>SBS distribution</h3></th>" >> $outfilePoolData
|
|
393 echo "<th><h3>Stranded distribution of SBS</h3></th>" >> $outfilePoolData
|
|
394 echo "</tr><tr>" >> $outfilePoolData
|
|
395 echo "<td> <center> <a href="Figures/SBS_distribution/Pool_Data/Pool_Data-SBS_distribution.txt">Pool_Data-SBS_distribution.txt</a> </center> </td>" >> $outfilePoolData
|
|
396 echo "<td> <center> <a href="Figures/Stranded_Analysis/Pool_Data/Pool_Data-StrandBias.txt">Pool_Data-StrandBias.txt</a> </center> </td>" >> $outfilePoolData
|
|
397 echo "</tr><tr>" >> $outfilePoolData
|
|
398
|
|
399 echo "<td>" >> $outfilePoolData
|
|
400 echo "<span class="legend"><img src="Figures/SBS_distribution/Pool_Data/Pool_Data-SBS_distribution.png width="550""/>" >> $outfilePoolData
|
|
401 echo "<span class="legend-hidden">" >> $outfilePoolData
|
|
402 echo "<center><B>Graph 2. SBS distribution</center></B><br/>Proportion of each type of single base substitution (SBS)<br/>" >> $outfilePoolData
|
|
403 echo "</td>" >> $outfilePoolData
|
|
404 echo "<td>" >> $outfilePoolData
|
|
405 echo "<span class="legend"><img src="Figures/Stranded_Analysis/Pool_Data/Pool_Data-StrandBias.png width="400""/>" >> $outfilePoolData
|
|
406 echo "<span class="legend-hidden">" >> $outfilePoolData
|
|
407 echo "<center><B>Graph 3. Stranded distribution of SBS</center></B><br/>Count of the six substitution types on the transcribed and non-transcribed strand<br/>" >> $outfilePoolData
|
|
408 echo "</td>" >> $outfilePoolData
|
|
409
|
|
410 echo "</tr>" >> $outfilePoolData
|
|
411 echo "</table>" >> $outfilePoolData
|
|
412
|
|
413
|
|
414 echo "<br/><br/>" >> $outfilePoolData
|
|
415
|
|
416
|
|
417 ##########################################################
|
|
418 # Trinucleotide sequence context of SBS on genomic: Pool #
|
|
419 ##########################################################
|
|
420 echo "<table>" >> $outfilePoolData
|
|
421 echo "<h3>Trinucleotide sequence context of SBS on the genomic sequence</h3>" >> $outfilePoolData
|
|
422 echo "<tr>" >> $outfilePoolData
|
|
423 echo "<td> <center> <a href="Figures/Trinucleotide_Sequence_Context/Pool_Data/Pool_Data-MutationSpectraPercent-Genomic.txt">Pool_Data-MutationSpectraPercent.txt</a> </center> </td>" >> $outfilePoolData
|
|
424 echo "<td> <center> <a href="Figures/Trinucleotide_Sequence_Context/Pool_Data/Pool_Data-HeatmapPercent-Genomic.txt">Pool_Data-HeatmapPercent-Genomic.txt</a> </center> </td>" >> $outfilePoolData
|
|
425 echo "</tr><tr>" >> $outfilePoolData
|
|
426
|
|
427 echo "<td>" >> $outfilePoolData
|
|
428 echo "<span class="legend"><img src="Figures/Trinucleotide_Sequence_Context/Pool_Data/Pool_Data-MutationSpectraPercent-Genomic.png width="1000""/>" >> $outfilePoolData
|
|
429 echo "<span class="legend-hidden">" >> $outfilePoolData
|
|
430 echo "<center><B>Panel 1. Trinucleotide sequence context of SBS on the genomic sequence</center></B><br/>Proportion of the six substitution types with their trinucleotide sequence context (total number of mutation is shown in parenthesis)<br/>" >> $outfilePoolData
|
|
431 echo "</td>" >> $outfilePoolData
|
|
432 echo "<td>" >> $outfilePoolData
|
|
433 echo "<span class="legend"><img src="Figures/Trinucleotide_Sequence_Context/Pool_Data/Pool_Data-HeatmapPercent-Genomic.png width="250""/>" >> $outfilePoolData
|
|
434 echo "<span class="legend-hidden">" >> $outfilePoolData
|
|
435 echo "<center><B>Panel 1. Trinucleotide sequence context of SBS on the genomic sequence</center></B><br/>Proportion of the six substitution types with their trinucleotide sequence context<br/>" >> $outfilePoolData
|
|
436 echo "</td>" >> $outfilePoolData
|
|
437
|
|
438 echo "</tr>" >> $outfilePoolData
|
|
439 echo "</table>" >> $outfilePoolData
|
|
440
|
|
441
|
|
442 echo "<br/><br/>" >> $outfilePoolData
|
|
443
|
|
444
|
|
445 ##################################################################
|
|
446 # Trinucleotide sequence context of SBS on coding sequence: Pool #
|
|
447 ##################################################################
|
|
448 echo "<table>" >> $outfilePoolData
|
|
449 echo "<h3>Stranded analysis of trinucleotide sequence context of SBS</h3>" >> $outfilePoolData
|
|
450 echo "<tr>" >> $outfilePoolData
|
|
451 echo "<td> <center> <a href="Figures/Stranded_Analysis/Pool_Data/Pool_Data-StrandedSignaturePercent.txt">Pool_Data-StrandedSignaturePercent.txt</a> </center> </td>" >> $outfilePoolData
|
|
452 echo "</tr><tr>" >> $outfilePoolData
|
|
453
|
|
454 echo "<td>" >> $outfilePoolData
|
|
455 echo "<span class="legend"><img src="Figures/Stranded_Analysis/Pool_Data/Pool_Data-StrandedSignaturePercent.png width="1300""/>" >> $outfilePoolData
|
|
456 echo "<span class="legend-hidden">" >> $outfilePoolData
|
|
457 echo "<center><B>Panel 2. Stranded analysis of trinucleotide sequence context of SBS</center></B><br/>Proportion of SBS with their trinucleotide context considering the non-transcribed and transcribed strand<br/>" >> $outfilePoolData
|
|
458 echo "</td>" >> $outfilePoolData
|
|
459 echo "</tr>" >> $outfilePoolData
|
|
460 echo "</table>" >> $outfilePoolData
|
|
461
|
|
462 echo "<br/><br/>" >> $outfilePoolData
|
|
463
|
|
464 #####################################################
|
|
465 # Sequence logo generated with Weblogo3: Pool #
|
|
466 #####################################################
|
|
467 echo "<table>" >> $outfilePoolData
|
|
468 echo "<h3>Sequence logo generated with Weblogo3</h3>" >> $outfilePoolData
|
|
469 # C>A
|
|
470 echo "<tr>" >> $outfilePoolData
|
|
471 if [[ ! -e "$output_dir/Mutational_Analysis/Figures/WebLogo/Pool_Data/Pool_Data-CA-Probability.png" ]]; then
|
|
472 echo "<td>WARNING: No sequence for C>A </br> </td>" >> $outfilePoolData
|
|
473 else
|
|
474 echo "<td><a href="Figures/WebLogo/Pool_Data/Pool_Data-CA.fa">Pool_Data-CA.fa</a><br/>" >> $outfilePoolData
|
|
475 echo "<img src="Figures/WebLogo/Pool_Data/Pool_Data-CA-Probability.png"/><br/></td>" >> $outfilePoolData
|
|
476 fi
|
|
477 # C>G
|
|
478 if [[ ! -e "$output_dir/Mutational_Analysis/Figures/WebLogo/Pool_Data/Pool_Data-CG-Probability.png" ]]; then
|
|
479 echo "<td>WARNING: No sequence for C>G </br> </td>" >> $outfilePoolData
|
|
480 else
|
|
481 echo "<td><a href="Figures/WebLogo/Pool_Data/Pool_Data-CG.fa">Pool_Data-CG.fa</a><br/>" >> $outfilePoolData
|
|
482 echo "<img src="Figures/WebLogo/Pool_Data/Pool_Data-CG-Probability.png"/><br/></td>" >> $outfilePoolData
|
|
483 fi
|
|
484 # C>T
|
|
485 if [[ ! -e "$output_dir/Mutational_Analysis/Figures/WebLogo/Pool_Data/Pool_Data-CT-Probability.png" ]]; then
|
|
486 echo "<td>WARNING: No sequence for C>T </br> </td>" >> $outfilePoolData
|
|
487 else
|
|
488 echo "<td><a href="Figures/WebLogo/Pool_Data/Pool_Data-CT.fa">Pool_Data-CT.fa</a><br/>" >> $outfilePoolData
|
|
489 echo "<img src="Figures/WebLogo/Pool_Data/Pool_Data-CT-Probability.png"/><br/></td>" >> $outfilePoolData
|
|
490 fi
|
|
491 echo "</tr>" >> $outfilePoolData
|
|
492
|
|
493 # T>A
|
|
494 echo "<tr>" >> $outfilePoolData
|
|
495 if [[ ! -e "$output_dir/Mutational_Analysis/Figures/WebLogo/Pool_Data/Pool_Data-TA-Probability.png" ]]; then
|
|
496 echo "<td>WARNING: No sequence for T>A </br> </td>" >> $outfilePoolData
|
|
497 else
|
|
498 echo "<td><a href="Figures/WebLogo/Pool_Data/Pool_Data-TA.fa">Pool_Data-TA.fa</a><br/>" >> $outfilePoolData
|
|
499 echo "<img src="Figures/WebLogo/Pool_Data/Pool_Data-TA-Probability.png"/><br/></td>" >> $outfilePoolData
|
|
500 fi
|
|
501 # T>C
|
|
502 if [[ ! -e "$output_dir/Mutational_Analysis/Figures/WebLogo/Pool_Data/Pool_Data-TC-Probability.png" ]]; then
|
|
503 echo "<td>WARNING: No sequence for T>C </br> </td>" >> $outfilePoolData
|
|
504 else
|
|
505 echo "<td><a href="Figures/WebLogo/Pool_Data/Pool_Data-TC.fa">Pool_Data-TC.fa</a><br/>" >> $outfilePoolData
|
|
506 echo "<img src="Figures/WebLogo/Pool_Data/Pool_Data-TC-Probability.png"/><br/></td>" >> $outfilePoolData
|
|
507 fi
|
|
508 # T>G
|
|
509 if [[ ! -e "$output_dir/Mutational_Analysis/Figures/WebLogo/Pool_Data/Pool_Data-TG-Probability.png" ]]; then
|
|
510 echo "<td>WARNING: No sequence for T>G </br> </td>" >> $outfilePoolData
|
|
511 else
|
|
512 echo "<td><a href="Figures/WebLogo/Pool_Data/Pool_Data-TG.fa">Pool_Data-TG.fa</a><br/>" >> $outfilePoolData
|
|
513 echo "<img src="Figures/WebLogo/Pool_Data/Pool_Data-TG-Probability.png"/><br/></td>" >> $outfilePoolData
|
|
514 fi
|
|
515 echo "</tr>" >> $outfilePoolData
|
|
516 echo "</table>" >> $outfilePoolData
|
|
517
|
|
518 echo "</body></html>" >> $outfilePoolData
|
|
519
|
|
520 fi # End if --poolData
|
|
521
|
|
522 fi # End if [ -d $output_dir/Mutational_Analysis/Figures ]
|
|
523
|
|
524 echo "</body></html>" >> $html
|
|
525
|
|
526 exit 0
|
|
527
|