annotate report_clonality/r_wrapper.sh~ @ 26:28fbbdfd7a87 draft

Uploaded
author davidvanzessen
date Mon, 13 Feb 2017 09:08:46 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
1 #!/bin/bash
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
2
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
3 inputFile=$1
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
4 outputDir=$3
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
5 outputFile=$3/index.html #$2
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
6 clonalType=$4
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
7 species=$5
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
8 locus=$6
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
9 filterproductive=$7
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
10 clonality_method=$8
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
11 dir="$(cd "$(dirname "$0")" && pwd)"
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
12 useD="false"
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
13 if grep -q "$species.*${locus}D" "$dir/genes.txt" ; then
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
14 echo "species D region in reference db"
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
15 useD="true"
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
16 fi
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
17 echo "$species"
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
18 if [[ "$species" == *"custom"* ]] ; then
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
19 loci=(${locus//;/ })
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
20 useD="true"
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
21 echo "${loci[@]}"
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
22 if [[ "${#loci[@]}" -eq "2" ]] ; then
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
23 useD="false"
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
24 fi
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
25 fi
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
26 mkdir $3
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
27 cp $dir/genes.txt $outputDir
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
28 Rscript --verbose $dir/RScript.r $inputFile $outputDir $outputDir $clonalType "$species" "$locus" $filterproductive ${clonality_method} 2>&1
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
29 cp $dir/tabber.js $outputDir
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
30 cp $dir/style.css $outputDir
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
31 cp $dir/script.js $outputDir
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
32 cp $dir/jquery-1.11.0.min.js $outputDir
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
33 samples=`cat $outputDir/samples.txt`
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
34 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)<br />" > $2
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
35 echo "<table border = 1>" >> $2
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
36 echo "<thead><tr><th>Sample/Replicate</th><th>All</th><th>Productive</th><th>Unique Productive</th><th>Unproductive</th><th>Unique Unproductive</th></tr></thead>" >> $2
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
37 while IFS=, read sample all productive perc_prod productive_unique perc_prod_un unproductive perc_unprod unproductive_unique perc_unprod_un
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
38 do
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
39 echo "<tr><td>$sample</td>" >> $2
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
40 echo "<td>$all</td>" >> $2
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
41 echo "<td>$productive (${perc_prod}%)</td>" >> $2
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
42 echo "<td>$productive_unique (${perc_prod_un}%)</td>" >> $2
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
43 echo "<td>$unproductive (${perc_unprod}%)</td>" >> $2
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
44 echo "<td>$unproductive_unique (${perc_unprod_un}%)</td></tr>" >> $2
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
45 done < $outputDir/productive_counting.txt
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
46 echo "</table border></center></html>" >> $2
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
47
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
48 echo "productive_counting.txt"
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
49 echo "<html><head><title>Report on:" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
50 for sample in $samples; do
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
51 echo " $sample" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
52 done
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
53 echo "</title><script type='text/javascript' src='jquery-1.11.0.min.js'></script>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
54 echo "<script type='text/javascript' src='tabber.js'></script>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
55 echo "<script type='text/javascript' src='script.js'></script>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
56 echo "<link rel='stylesheet' type='text/css' href='style.css'></head>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
57 echo "<div class='tabber'><div class='tabbertab' title='Gene frequencies'>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
58
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
59 echo "<img src='CDR3LengthPlot.png'/><br />" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
60 echo "<img src='VFPlot.png'/>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
61 if [[ "$useD" == "true" ]] ; then
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
62 echo "<img src='DFPlot.png'/>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
63 fi
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
64 echo "<img src='JFPlot.png'/>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
65 echo "<img src='VPlot.png'/>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
66 if [[ "$useD" == "true" ]] ; then
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
67 echo "<img src='DPlot.png'/>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
68 fi
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
69 echo "<img src='JPlot.png'/>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
70 echo "<img src='AAComposition.png'/></div>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
71
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
72 count=1
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
73 echo "<div class='tabbertab' title='Heatmaps'><div class='tabber'>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
74 for sample in $samples; do
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
75 echo "<div class='tabbertab' title='$sample'><table border='1'><tr>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
76 if [[ "$useD" == "true" ]] ; then
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
77 echo "<td><img src='HeatmapVD_$sample.png'/></td>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
78 fi
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
79 echo "<td><img src='HeatmapVJ_$sample.png'/></td>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
80 if [[ "$useD" == "true" ]] ; then
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
81 echo "<td><img src='HeatmapDJ_$sample.png'/></td>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
82 fi
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
83 echo "</tr></table></div>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
84 count=$((count+1))
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
85 done
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
86 echo "</div></div>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
87
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
88 #echo "<div class='tabbertab' title='Interactive'><svg class='chart'></svg><script src='http://d3js.org/d3.v3.min.js'></script></div>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
89
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
90 hasReplicateColumn="$(if head -n 1 $inputFile | grep -q 'Replicate'; then echo 'Yes'; else echo 'No'; fi)"
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
91 echo "$hasReplicateColumn"
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
92 #if its a 'new' merged file with replicate info
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
93 if [[ "$hasReplicateColumn" == "Yes" && "$clonalType" != "none" ]] ; then
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
94 echo "<div class='tabbertab' title='Clonality'><div class='tabber'>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
95 for sample in $samples; do
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
96 echo "${clonality_method}"
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
97 if [[ "${clonality_method}" == "old" ]] ; then
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
98 echo "in old"
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
99 clonalityScore="$(cat $outputDir/ClonalityScore_$sample.csv)"
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
100 echo "<div class='tabbertab' title='$sample'><table border='1'>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
101 echo "<tr><td colspan='4'>Clonality Score: $clonalityScore</td></tr>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
102
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
103 #replicate,reads,squared
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
104 echo "<tr><td>Replicate ID</td><td>Number of Reads</td><td>Reads Squared</td><td></td></tr>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
105 while IFS=, read replicate reads squared
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
106 do
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
107
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
108 echo "<tr><td>$replicate</td><td>$reads</td><td>$squared</td><td></td></tr>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
109 done < $outputDir/ReplicateReads_$sample.csv
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
110
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
111 #sum of reads and reads squared
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
112 while IFS=, read readsSum squaredSum
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
113 do
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
114 echo "<tr><td>Sum</td><td>$readsSum</td><td>$squaredSum</td></tr>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
115 done < $outputDir/ReplicateSumReads_$sample.csv
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
116
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
117 #overview
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
118 echo "<tr><td>Coincidence Type</td><td>Raw Coincidence Freq</td><td>Coincidence Weight</td><td>Coincidences, Weighted</td></tr>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
119 while IFS=, read type count weight weightedCount
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
120 do
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
121 echo "<tr><td>$type</td><td>$count</td><td>$weight</td><td>$weightedCount</td></tr>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
122 done < $outputDir/ClonalityOverView_$sample.csv
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
123 echo "</table></div>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
124 else
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
125 echo "in new"
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
126 clonalityScore="$(cat $outputDir/lymphclon_clonality_${sample}.csv)"
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
127 echo "<div class='tabbertab' title='$sample'>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
128 echo "Lymphclon clonality score: <br />$clonalityScore<br /><br />" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
129 echo "<table border = 1>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
130 while IFS=, read type count
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
131 do
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
132 echo "<tr><td>$type</td><td>$count</td></tr>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
133 done < $outputDir/lymphclon_coincidences_$sample.csv
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
134 echo "</table></div>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
135 fi
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
136 done
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
137 echo "</div></div>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
138 fi
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
139
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
140 hasJunctionData="$(if head -n 1 $inputFile | grep -q '3V-REGION trimmed-nt'; then echo 'Yes'; else echo 'No'; fi)"
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
141
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
142 if [[ "$hasJunctionData" == "Yes" ]] ; then
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
143 echo "<div class='tabbertab' title='Junction Analysis'>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
144 echo "<table border='1' id='junction_table'> <caption>Productive</caption><thead><tr><th>Sample</th><th>count</th><th>VH.DEL</th><th>P1</th><th>N1</th><th>P2</th><th>DEL.DH</th><th>DH.DEL</th><th>P3</th><th>N2</th><th>P4</th><th>DEL.JH</th><th>Total.Del</th><th>Total.N</th><th>Total.P</th><thead></tr><tbody>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
145 while IFS=, read Sample unique VHDEL P1 N1 P2 DELDH DHDEL P3 N2 P4 DELJH TotalDel TotalN TotalP
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
146 do
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
147 echo "<tr><td>$Sample</td><td>$unique</td><td>$VHDEL</td><td>$P1</td><td>$N1</td><td>$P2</td><td>$DELDH</td><td>$DHDEL</td><td>$P3</td><td>$N2</td><td>$P4</td><td>$DELJH</td><td>$TotalDel</td><td>$TotalN</td><td>$TotalP</td></tr>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
148 done < $outputDir/junctionAnalysisProd.csv
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
149 echo "</tbody></table>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
150
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
151 echo "<table border='1' id='junction_table'> <caption>Unproductive</caption><thead><tr><th>Sample</th><th>count</th><th>VH.DEL</th><th>P1</th><th>N1</th><th>P2</th><th>DEL.DH</th><th>DH.DEL</th><th>P3</th><th>N2</th><th>P4</th><th>DEL.JH</th><th>Total.Del</th><th>Total.N</th><th>Total.P</th><thead></tr><tbody>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
152 while IFS=, read Sample unique VHDEL P1 N1 P2 DELDH DHDEL P3 N2 P4 DELJH TotalDel TotalN TotalP
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
153 do
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
154 echo "<tr><td>$Sample</td><td>$unique</td><td>$VHDEL</td><td>$P1</td><td>$N1</td><td>$P2</td><td>$DELDH</td><td>$DHDEL</td><td>$P3</td><td>$N2</td><td>$P4</td><td>$DELJH</td><td>$TotalDel</td><td>$TotalN</td><td>$TotalP</td></tr>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
155 done < $outputDir/junctionAnalysisUnProd.csv
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
156 echo "</tbody></table>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
157
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
158 echo "</div>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
159 fi
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
160
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
161 echo "<div class='tabbertab' title='Comparison'><table border='1'><tr><th>ID</th><th>Include</th></tr>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
162 for sample in $samples; do
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
163 echo "<tr><td>$sample</td><td><input type='checkbox' onchange=\"javascript:compareAdd('$sample')\" id='compare_checkbox_$sample'/></td></tr>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
164 done
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
165 echo "</table><div name='comparisonarea'>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
166 echo "<table><tr id='comparison_table_vd'></tr></table>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
167 echo "<table><tr id='comparison_table_vj'></tr></table>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
168 echo "<table><tr id='comparison_table_dj'></tr></table>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
169 echo "</div></div>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
170
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
171 echo "<div class='tabbertab' title='Downloads'>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
172 echo "<table border='1'>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
173 echo "<tr><th>Description</th><th>Link</th></tr>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
174 echo "<tr><td>The dataset used to generate the frequency graphs and the heatmaps (Unique based on clonaltype, $clonalType)</td><td><a href='allUnique.csv'>Download</a></td></tr>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
175 echo "<tr><td>The dataset used to calculate clonality score (Unique based on clonaltype, $clonalType)</td><td><a href='clonalityComplete.csv'>Download</a></td></tr>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
176
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
177 echo "<tr><td>The dataset used to generate the CDR3 length frequency graph</td><td><a href='CDR3LengthPlot.csv'>Download</a></td></tr>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
178
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
179 echo "<tr><td>The dataset used to generate the V gene family frequency graph</td><td><a href='VFFrequency.csv'>Download</a></td></tr>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
180 if [[ "$useD" == "true" ]] ; then
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
181 echo "<tr><td>The dataset used to generate the D gene family frequency graph</td><td><a href='DFFrequency.csv'>Download</a></td></tr>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
182 fi
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
183 echo "<tr><td>The dataset used to generate the J gene family frequency graph</td><td><a href='JFFrequency.csv'>Download</a></td></tr>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
184
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
185 echo "<tr><td>The dataset used to generate the V gene frequency graph</td><td><a href='VFrequency.csv'>Download</a></td></tr>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
186 if [[ "$useD" == "true" ]] ; then
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
187 echo "<tr><td>The dataset used to generate the D gene frequency graph</td><td><a href='DFrequency.csv'>Download</a></td></tr>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
188 fi
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
189 echo "<tr><td>The dataset used to generate the J gene frequency graph</td><td><a href='JFrequency.csv'>Download</a></td></tr>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
190 echo "<tr><td>The dataset used to generate the AA composition graph</td><td><a href='AAComposition.csv'>Download</a></td></tr>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
191
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
192 for sample in $samples; do
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
193 if [[ "$useD" == "true" ]] ; then
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
194 echo "<tr><td>The data used to generate the VD heatmap for $sample.</td><td><a href='HeatmapVD_$sample.csv'>Download</a></td></tr>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
195 fi
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
196 echo "<tr><td>The data used to generate the VJ heatmap for $sample.</td><td><a href='HeatmapVJ_$sample.csv'>Download</a></td></tr>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
197 if [[ "$useD" == "true" ]] ; then
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
198 echo "<tr><td>The data used to generate the DJ heatmap for $sample.</td><td><a href='HeatmapDJ_$sample.csv'>Download</a></td></tr>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
199 fi
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
200 done
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
201
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
202 echo "</table>" >> $outputFile
28fbbdfd7a87 Uploaded
davidvanzessen
parents:
diff changeset
203 echo "</div></html>" >> $outputFile