Mercurial > repos > davidvanzessen > mutation_analysis
comparison wrapper.sh @ 99:86206431cbb0 draft
Uploaded
| author | davidvanzessen |
|---|---|
| date | Thu, 16 Jun 2016 10:01:54 -0400 |
| parents | 5ffbf40cdd4b |
| children | ff5be711382b |
comparison
equal
deleted
inserted
replaced
| 98:5ffbf40cdd4b | 99:86206431cbb0 |
|---|---|
| 91 cat `find $PWD/files/ -name "7_*"` > "$outdir/new_IMGT/7_V-REGION-mutation-and-AA-change-table.txt" | 91 cat `find $PWD/files/ -name "7_*"` > "$outdir/new_IMGT/7_V-REGION-mutation-and-AA-change-table.txt" |
| 92 cat `find $PWD/files/ -name "8_*"` > "$outdir/new_IMGT/8_V-REGION-nt-mutation-statistics.txt" | 92 cat `find $PWD/files/ -name "8_*"` > "$outdir/new_IMGT/8_V-REGION-nt-mutation-statistics.txt" |
| 93 cat `find $PWD/files/ -name "9_*"` > "$outdir/new_IMGT/9_V-REGION-AA-change-statistics.txt" | 93 cat `find $PWD/files/ -name "9_*"` > "$outdir/new_IMGT/9_V-REGION-AA-change-statistics.txt" |
| 94 cat `find $PWD/files/ -name "10_*"` > "$outdir/new_IMGT/10_V-REGION-mutation-hotspots.txt" | 94 cat `find $PWD/files/ -name "10_*"` > "$outdir/new_IMGT/10_V-REGION-mutation-hotspots.txt" |
| 95 | 95 |
| 96 Rscript $dir/tmp/igat.r $outdir/new_IMGT/ $outdir/merged.txt 2>&1 | 96 mkdir $outdir/new_IMGT_ca |
| 97 cp $outdir/new_IMGT/* $outdir/new_IMGT_ca | |
| 98 | |
| 99 mkdir $outdir/new_IMGT_cg | |
| 100 cp $outdir/new_IMGT/* $outdir/new_IMGT_cg | |
| 101 | |
| 102 mkdir $outdir/new_IMGT_cm | |
| 103 cp $outdir/new_IMGT/* $outdir/new_IMGT_cm | |
| 104 | |
| 105 Rscript $dir/tmp/igat.r $outdir/new_IMGT/ $outdir/merged.txt "-" 2>&1 | |
| 106 Rscript $dir/tmp/igat.r $outdir/new_IMGT_ca/ $outdir/merged.txt "ca "2>&1 | |
| 107 Rscript $dir/tmp/igat.r $outdir/new_IMGT_cg/ $outdir/merged.txt "cg "2>&1 | |
| 108 Rscript $dir/tmp/igat.r $outdir/new_IMGT_cm/ $outdir/merged.txt "cm "2>&1 | |
| 97 | 109 |
| 98 | 110 |
| 99 tmp="$PWD" | 111 tmp="$PWD" |
| 100 cd $outdir/new_IMGT/ #tar weirdness... | 112 cd $outdir/new_IMGT/ #tar weirdness... |
| 101 tar -cJf ../new_IMGT.txz * | 113 tar -cJf ../new_IMGT.txz * |
| 102 | |
| 103 cp $dir/tmp/IgAT.xlsm $outdir/new_IMGT/IgAT.xlsm | 114 cp $dir/tmp/IgAT.xlsm $outdir/new_IMGT/IgAT.xlsm |
| 104 | |
| 105 #tar -cJf ../IgAT.txz * | |
| 106 zip -r ../IgAT.zip * | 115 zip -r ../IgAT.zip * |
| 107 | 116 |
| 117 cd $outdir/new_IMGT_ca/ | |
| 118 tar -cJf ../new_IMGT_ca.txz * | |
| 119 cp $dir/tmp/IgAT.xlsm $outdir/new_IMGT_ca/IgAT.xlsm | |
| 120 zip -r ../IgAT_ca.zip * | |
| 121 | |
| 122 cd $outdir/new_IMGT_cg/ | |
| 123 tar -cJf ../new_IMGT_cg.txz * | |
| 124 cp $dir/tmp/IgAT.xlsm $outdir/new_IMGT_cg/IgAT.xlsm | |
| 125 zip -r ../IgAT_cg.zip * | |
| 126 | |
| 127 cd $outdir/new_IMGT_cm/ | |
| 128 tar -cJf ../new_IMGT_cm.txz * | |
| 129 cp $dir/tmp/IgAT.xlsm $outdir/new_IMGT_cm/IgAT.xlsm | |
| 130 zip -r ../IgAT_cm.zip * | |
| 131 | |
| 108 cd $tmp | 132 cd $tmp |
| 109 | |
| 110 | 133 |
| 111 echo "---------------- mutation_analysis.r ----------------" | 134 echo "---------------- mutation_analysis.r ----------------" |
| 112 echo "---------------- mutation_analysis.r ----------------<br />" >> $output | 135 echo "---------------- mutation_analysis.r ----------------<br />" >> $output |
| 113 | 136 |
| 114 classes="ca,ca1,ca2,cg,cg1,cg2,cg3,cg4,cm,unmatched" | 137 classes="ca,ca1,ca2,cg,cg1,cg2,cg3,cg4,cm,unmatched" |
| 134 echo "---------------- sequence_overview.r ----------------" >> $output | 157 echo "---------------- sequence_overview.r ----------------" >> $output |
| 135 | 158 |
| 136 mkdir $outdir/sequence_overview | 159 mkdir $outdir/sequence_overview |
| 137 | 160 |
| 138 #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 | 161 #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 |
| 139 Rscript $dir/sequence_overview.r $outdir/before_unique_filter.txt $outdir/merged.txt $outdir/sequence_overview $classes $outdir/hotspot_analysis_sum.txt 2>&1 | 162 Rscript $dir/sequence_overview.r $outdir/before_unique_filter.txt $outdir/sequence_overview $classes $outdir/hotspot_analysis_sum.txt 2>&1 |
| 140 | 163 |
| 141 echo "<table border='1'>" > $outdir/base_overview.html | 164 echo "<table border='1'>" > $outdir/base_overview.html |
| 142 | 165 |
| 143 while IFS=$'\t' read ID class seq A C G T | 166 while IFS=$'\t' read ID class seq A C G T |
| 144 do | 167 do |
| 205 echo "<a href='absent_aa_id.txt'>Absant AA locations by id</a><br />" >> $output | 228 echo "<a href='absent_aa_id.txt'>Absant AA locations by id</a><br />" >> $output |
| 206 echo "<a href='sequence_overview/index.html'>Sequence Overview</a><br />" >> $output | 229 echo "<a href='sequence_overview/index.html'>Sequence Overview</a><br />" >> $output |
| 207 echo "<a href='base_overview.html'>Base overview</a><br />" >> $output | 230 echo "<a href='base_overview.html'>Base overview</a><br />" >> $output |
| 208 echo "<a href='baseline.pdf'>Baseline PDF</a><br />" >> $output | 231 echo "<a href='baseline.pdf'>Baseline PDF</a><br />" >> $output |
| 209 echo "<a href='baseline.txt'>Baseline Table</a><br />" >> $output | 232 echo "<a href='baseline.txt'>Baseline Table</a><br />" >> $output |
| 233 echo "<a href='baseline_ca.pdf'>Baseline ca PDF</a><br />" >> $output | |
| 234 echo "<a href='baseline_ca.txt'>Baseline ca Table</a><br />" >> $output | |
| 235 echo "<a href='baseline_cg.pdf'>Baseline cg PDF</a><br />" >> $output | |
| 236 echo "<a href='baseline_cg.txt'>Baseline cg Table</a><br />" >> $output | |
| 237 echo "<a href='baseline_cm.pdf'>Baseline cm PDF</a><br />" >> $output | |
| 238 echo "<a href='baseline_cm.txt'>Baseline cm Table</a><br />" >> $output | |
| 210 echo "<a href='IgAT.zip'>IgAT zip</a><br />" >> $output | 239 echo "<a href='IgAT.zip'>IgAT zip</a><br />" >> $output |
| 240 echo "<a href='IgAT_ca.zip'>IgAT ca zip</a><br />" >> $output | |
| 241 echo "<a href='IgAT_cg.zip'>IgAT cg zip</a><br />" >> $output | |
| 242 echo "<a href='IgAT_cm.zip'>IgAT cm zip</a><br />" >> $output | |
| 243 echo "<a href='new_IMGT.txz'>Filtered IMGT zip</a><br />" >> $output | |
| 244 echo "<a href='new_IMGT_ca.txz'>Filtered ca IMGT zip</a><br />" >> $output | |
| 245 echo "<a href='new_IMGT_cg.txz'>Filtered cg IMGT zip</a><br />" >> $output | |
| 246 echo "<a href='new_IMGT_cm.txz'>Filtered cm IMGT zip</a><br />" >> $output | |
| 247 | |
| 211 | 248 |
| 212 echo "---------------- images ----------------" | 249 echo "---------------- images ----------------" |
| 213 | 250 |
| 214 echo "<img src='all.png'/><br />" >> $output | 251 echo "<img src='all.png'/><br />" >> $output |
| 215 echo "<a href='all.txt'>download data</a><br />" >> $output | 252 echo "<a href='all.txt'>download data</a><br />" >> $output |
| 258 echo "</table>" >> $output | 295 echo "</table>" >> $output |
| 259 | 296 |
| 260 echo "</html>" >> $output | 297 echo "</html>" >> $output |
| 261 | 298 |
| 262 echo "---------------- baseline ----------------" | 299 echo "---------------- baseline ----------------" |
| 263 bash $dir/tmp/baseline/wrapper.sh 1 1 1 1 0 0 "25:26:38:55:65:104:-" $outdir/new_IMGT.txz "sample name" "$dir/tmp/baseline/IMGT-reference-seqs-IGHV-2015-11-05.fa" "$outdir/baseline.pdf" "Sequence.ID" "$outdir/baseline.txt" | 300 bash $dir/tmp/baseline/wrapper.sh 1 1 1 1 0 0 "25:26:38:55:65:104:-" $outdir/new_IMGT.txz "ca_cg_cm" "$dir/tmp/baseline/IMGT-reference-seqs-IGHV-2015-11-05.fa" "$outdir/baseline.pdf" "Sequence.ID" "$outdir/baseline.txt" |
| 301 bash $dir/tmp/baseline/wrapper.sh 1 1 1 1 0 0 "25:26:38:55:65:104:-" $outdir/new_IMGT_ca.txz "ca" "$dir/tmp/baseline/IMGT-reference-seqs-IGHV-2015-11-05.fa" "$outdir/baseline_ca.pdf" "Sequence.ID" "$outdir/baseline_ca.txt" | |
| 302 bash $dir/tmp/baseline/wrapper.sh 1 1 1 1 0 0 "25:26:38:55:65:104:-" $outdir/new_IMGT_cg.txz "cg" "$dir/tmp/baseline/IMGT-reference-seqs-IGHV-2015-11-05.fa" "$outdir/baseline_cg.pdf" "Sequence.ID" "$outdir/baseline_cg.txt" | |
| 303 bash $dir/tmp/baseline/wrapper.sh 1 1 1 1 0 0 "25:26:38:55:65:104:-" $outdir/new_IMGT_cm.txz "cm" "$dir/tmp/baseline/IMGT-reference-seqs-IGHV-2015-11-05.fa" "$outdir/baseline_cm.pdf" "Sequence.ID" "$outdir/baseline_cm.txt" | |
| 264 | 304 |
| 265 #optional output for naive | 305 #optional output for naive |
| 266 | 306 |
| 267 echo "---------------- naive_output.r ----------------" | 307 echo "---------------- naive_output.r ----------------" |
| 268 | 308 |
| 278 | 318 |
| 279 echo "</table>" >> $outdir/base_overview.html | 319 echo "</table>" >> $outdir/base_overview.html |
| 280 | 320 |
| 281 echo "---------------- Done! ----------------" | 321 echo "---------------- Done! ----------------" |
| 282 | 322 |
| 283 | |
| 284 | |
| 285 | |
| 286 | |
| 287 | |
| 288 | |
| 289 #rm $outdir/HS12RSS.txt | |
| 290 #rm $outdir/HS23RSS.txt |
