comparison wrapper.sh @ 94:e39176ccddc8 draft

Uploaded
author davidvanzessen
date Tue, 07 Jun 2016 08:39:08 -0400
parents b869a126e2c4
children a66eb1c5374c
comparison
equal deleted inserted replaced
93:53fb2948726e 94:e39176ccddc8
102 echo "---------------- sequence_overview.r ----------------" 102 echo "---------------- sequence_overview.r ----------------"
103 103
104 mkdir $outdir/sequence_overview 104 mkdir $outdir/sequence_overview
105 105
106 #Rscript $dir/sequence_overview.r $outdir/identified_genes.txt $PWD/sequences.txt $outdir/merged.txt $outdir/sequence_overview $classes $outdir/hotspot_analysis_sum.txt 2>&1 106 #Rscript $dir/sequence_overview.r $outdir/identified_genes.txt $PWD/sequences.txt $outdir/merged.txt $outdir/sequence_overview $classes $outdir/hotspot_analysis_sum.txt 2>&1
107 Rscript $dir/sequence_overview.r $outdir/before_unique_filter.txt $outdir/sequence_overview $classes $outdir/hotspot_analysis_sum.txt 2>&1 107 Rscript $dir/sequence_overview.r $outdir/before_unique_filter.txt $outdir/merged.txt $outdir/sequence_overview $classes $outdir/hotspot_analysis_sum.txt 2>&1
108 108
109 echo "<table border='1'>" > $outdir/base_overview.html 109 echo "<table border='1'>" > $outdir/base_overview.html
110 110
111 while IFS=$'\t' read ID class seq A C G T 111 while IFS=$'\t' read ID class seq A C G T
112 do 112 do
133 for func in ${funcs[@]} 133 for func in ${funcs[@]}
134 do 134 do
135 135
136 echo "---------------- $func table ----------------" 136 echo "---------------- $func table ----------------"
137 137
138 cat $outdir/mutations_${func}.txt $outdir/hotspot_analysis_${func}.txt > $outdir/result.txt 138 cat $outdir/mutations_${func}.txt $outdir/hotspot_analysis_${func}.txt > $outdir/data_${func}.txt
139 139
140 echo "<table border='1' width='100%'><caption><h3>${func} table</h3></caption>" >> $output 140 echo "<table border='1' width='100%'><caption><h3>${func} table</h3></caption>" >> $output
141 echo "<tr><th>info</th>" >> $output 141 echo "<tr><th>info</th>" >> $output
142 for gene in ${genes[@]} 142 for gene in ${genes[@]}
143 do 143 do
155 if [ "$name" == "FR S/R (ratio)" ] || [ "$name" == "CDR S/R (ratio)" ] ; then #meh 155 if [ "$name" == "FR S/R (ratio)" ] || [ "$name" == "CDR S/R (ratio)" ] ; then #meh
156 echo "<tr><td>$name</td><td>${cax}/${cay} (${caz})</td><td>${ca1x}/${ca1y} (${ca1z})</td><td>${ca2x}/${ca2y} (${ca2z})</td><td>${cgx}/${cgy} (${cgz})</td><td>${cg1x}/${cg1y} (${cg1z})</td><td>${cg2x}/${cg2y} (${cg2z})</td><td>${cg3x}/${cg3y} (${cg3z})</td><td>${cg4x}/${cg4y} (${cg4z})</td><td>${cmx}/${cmy} (${cmz})</td><td>${allx}/${ally} (${allz})</td></tr>" >> $output 156 echo "<tr><td>$name</td><td>${cax}/${cay} (${caz})</td><td>${ca1x}/${ca1y} (${ca1z})</td><td>${ca2x}/${ca2y} (${ca2z})</td><td>${cgx}/${cgy} (${cgz})</td><td>${cg1x}/${cg1y} (${cg1z})</td><td>${cg2x}/${cg2y} (${cg2z})</td><td>${cg3x}/${cg3y} (${cg3z})</td><td>${cg4x}/${cg4y} (${cg4z})</td><td>${cmx}/${cmy} (${cmz})</td><td>${allx}/${ally} (${allz})</td></tr>" >> $output
157 else 157 else
158 echo "<tr><td>$name</td><td>${cax}/${cay} (${caz}%)</td><td>${ca1x}/${ca1y} (${ca1z}%)</td><td>${ca2x}/${ca2y} (${ca2z}%)</td><td>${cgx}/${cgy} (${cgz}%)</td><td>${cg1x}/${cg1y} (${cg1z}%)</td><td>${cg2x}/${cg2y} (${cg2z}%)</td><td>${cg3x}/${cg3y} (${cg3z}%)</td><td>${cg4x}/${cg4y} (${cg4z}%)</td><td>${cmx}/${cmy} (${cmz}%)</td><td>${unx}/${uny} (${unz}%)</td><td>${allx}/${ally} (${allz}%)</td></tr>" >> $output 158 echo "<tr><td>$name</td><td>${cax}/${cay} (${caz}%)</td><td>${ca1x}/${ca1y} (${ca1z}%)</td><td>${ca2x}/${ca2y} (${ca2z}%)</td><td>${cgx}/${cgy} (${cgz}%)</td><td>${cg1x}/${cg1y} (${cg1z}%)</td><td>${cg2x}/${cg2y} (${cg2z}%)</td><td>${cg3x}/${cg3y} (${cg3z}%)</td><td>${cg4x}/${cg4y} (${cg4z}%)</td><td>${cmx}/${cmy} (${cmz}%)</td><td>${unx}/${uny} (${unz}%)</td><td>${allx}/${ally} (${allz}%)</td></tr>" >> $output
159 fi 159 fi
160 done < $outdir/result.txt 160 done < $outdir/data_${func}.txt
161 161 echo "</table>" >> $output
162 #echo "<a href='data_${func}.txt'>Download data</a>" >> $output
162 done 163 done
163 164
164 echo "---------------- download links ----------------" 165 echo "---------------- download links ----------------"
165 166
166 echo "</table>" >> $output 167
167 echo "<a href='unmatched.txt'>unmatched</a><br />" >> $output 168 echo "<a href='unmatched.txt'>unmatched</a><br />" >> $output
168 echo "<a href='motif_per_seq.txt'>motif per sequence</a><br />" >> $output 169 echo "<a href='motif_per_seq.txt'>motif per sequence</a><br />" >> $output
169 echo "<a href='merged.txt'>all data</a><br />" >> $output 170 echo "<a href='merged.txt'>all data</a><br />" >> $output
170 echo "<a href='mutation_by_id.txt'>mutations by id</a><br />" >> $output 171 echo "<a href='mutation_by_id.txt'>mutations by id</a><br />" >> $output
171 echo "<a href='aa_id_mutations.txt'>AA mutations location by id</a><br />" >> $output 172 echo "<a href='aa_id_mutations.txt'>AA mutations location by id</a><br />" >> $output