Mercurial > repos > davidvanzessen > shm_csr
annotate wrapper.sh @ 96:385dea3c6cb5 draft
planemo upload commit 423a48569c69301fdbf893ac3a649128404dfff5
author | rhpvorderman |
---|---|
date | Fri, 05 Jan 2024 08:53:22 +0000 |
parents | d63eff357515 |
children | d714f5ea83d7 |
rev | line source |
---|---|
83
729738462297
"planemo upload commit c0ffc68aec5836d5b20b543106493056a87edf57"
rhpvorderman
parents:
81
diff
changeset
|
1 #!/usr/bin/env bash |
729738462297
"planemo upload commit c0ffc68aec5836d5b20b543106493056a87edf57"
rhpvorderman
parents:
81
diff
changeset
|
2 set -e -o pipefail |
81 | 3 dir="$(cd "$(dirname "$0")" && pwd)" |
4 input=$1 | |
5 method=$2 | |
6 log=$3 #becomes the main html page at the end | |
7 outdir=$4 | |
8 output="$outdir/index.html" #copied to $log location at the end | |
9 title="$5" | |
10 include_fr1=$6 | |
11 functionality=$7 | |
12 unique=$8 | |
13 naive_output=$9 | |
14 naive_output_ca=${10} | |
15 naive_output_cg=${11} | |
16 naive_output_cm=${12} | |
17 naive_output_ce=${13} | |
18 naive_output_all=${14} | |
94
84e9e5c8c101
"planemo upload commit d4be85014b638f1d50b318d4b735be7f6e973140"
rhpvorderman
parents:
93
diff
changeset
|
19 naive_output_igm_naive=${15} |
84e9e5c8c101
"planemo upload commit d4be85014b638f1d50b318d4b735be7f6e973140"
rhpvorderman
parents:
93
diff
changeset
|
20 naive_output_igm_naive_memory=${16} |
84e9e5c8c101
"planemo upload commit d4be85014b638f1d50b318d4b735be7f6e973140"
rhpvorderman
parents:
93
diff
changeset
|
21 filter_unique=${17} |
84e9e5c8c101
"planemo upload commit d4be85014b638f1d50b318d4b735be7f6e973140"
rhpvorderman
parents:
93
diff
changeset
|
22 filter_unique_count=${18} |
84e9e5c8c101
"planemo upload commit d4be85014b638f1d50b318d4b735be7f6e973140"
rhpvorderman
parents:
93
diff
changeset
|
23 class_filter=${19} |
84e9e5c8c101
"planemo upload commit d4be85014b638f1d50b318d4b735be7f6e973140"
rhpvorderman
parents:
93
diff
changeset
|
24 empty_region_filter=${20} |
84e9e5c8c101
"planemo upload commit d4be85014b638f1d50b318d4b735be7f6e973140"
rhpvorderman
parents:
93
diff
changeset
|
25 fast=${21} |
96
385dea3c6cb5
planemo upload commit 423a48569c69301fdbf893ac3a649128404dfff5
rhpvorderman
parents:
95
diff
changeset
|
26 BASENAME=$(basename "$title") |
95
d63eff357515
planemo upload commit d96a736dcd6da34137f79861fbc6369716c332f1
rhpvorderman
parents:
94
diff
changeset
|
27 # Cut off .txz or .tgz suffix and also replace spaces with underscores. |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
28 NEW_IMGT_PREFIX="new_IMGT_${BASENAME%.*}" |
95
d63eff357515
planemo upload commit d96a736dcd6da34137f79861fbc6369716c332f1
rhpvorderman
parents:
94
diff
changeset
|
29 NEW_IMGT_PREFIX=${NEW_IMGT_PREFIX// /_} |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
30 |
83
729738462297
"planemo upload commit c0ffc68aec5836d5b20b543106493056a87edf57"
rhpvorderman
parents:
81
diff
changeset
|
31 #exec 5> debug_output.txt |
729738462297
"planemo upload commit c0ffc68aec5836d5b20b543106493056a87edf57"
rhpvorderman
parents:
81
diff
changeset
|
32 #BASH_XTRACEFD="5" |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
33 ## Busybox date does not support '+%s.%N'. So use a custom program. Can be |
96
385dea3c6cb5
planemo upload commit 423a48569c69301fdbf893ac3a649128404dfff5
rhpvorderman
parents:
95
diff
changeset
|
34 ## Compiled with cc -static -Os show_time_as_float.c -o show_time_as_float |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
35 #PS4='$(${dir}/show_time_as_float) $LINENO: ' |
83
729738462297
"planemo upload commit c0ffc68aec5836d5b20b543106493056a87edf57"
rhpvorderman
parents:
81
diff
changeset
|
36 #set -x |
729738462297
"planemo upload commit c0ffc68aec5836d5b20b543106493056a87edf57"
rhpvorderman
parents:
81
diff
changeset
|
37 |
729738462297
"planemo upload commit c0ffc68aec5836d5b20b543106493056a87edf57"
rhpvorderman
parents:
81
diff
changeset
|
38 mkdir -p $outdir |
81 | 39 |
40 tar -xzf $dir/style.tar.gz -C $outdir | |
41 | |
42 echo "---------------- read parameters ----------------" | |
43 echo "---------------- read parameters ----------------<br />" > $log | |
44 | |
45 echo "unpacking IMGT file" | |
46 | |
95
d63eff357515
planemo upload commit d96a736dcd6da34137f79861fbc6369716c332f1
rhpvorderman
parents:
94
diff
changeset
|
47 type="$(file -L "$input")" |
81 | 48 if [[ "$type" == *"Zip archive"* ]] ; then |
49 echo "Zip archive" | |
50 echo "unzip $input -d $PWD/files/" | |
95
d63eff357515
planemo upload commit d96a736dcd6da34137f79861fbc6369716c332f1
rhpvorderman
parents:
94
diff
changeset
|
51 unzip "$input" -d $PWD/files/ |
81 | 52 elif [[ "$type" == *"XZ compressed data"* ]] ; then |
53 echo "ZX archive" | |
95
d63eff357515
planemo upload commit d96a736dcd6da34137f79861fbc6369716c332f1
rhpvorderman
parents:
94
diff
changeset
|
54 echo "tar -xJf "$input" -C $PWD/files/" |
81 | 55 mkdir -p "$PWD/files/$title" |
95
d63eff357515
planemo upload commit d96a736dcd6da34137f79861fbc6369716c332f1
rhpvorderman
parents:
94
diff
changeset
|
56 tar -xJf "$input" -C "$PWD/files/$title" |
81 | 57 else |
58 echo "Unrecognized format $type" | |
59 echo "Unrecognized format $type" > $log | |
60 exit 1 | |
61 fi | |
62 | |
63 cat "`find $PWD/files/ -name "1_*"`" > $PWD/summary.txt | |
64 cat "`find $PWD/files/ -name "2_*"`" > $PWD/gapped_nt.txt | |
65 cat "`find $PWD/files/ -name "3_*"`" > $PWD/sequences.txt | |
66 cat "`find $PWD/files/ -name "4_*"`" > $PWD/gapped_aa.txt | |
67 cat "`find $PWD/files/ -name "5_*"`" > $PWD/aa.txt | |
68 cat "`find $PWD/files/ -name "6_*"`" > $PWD/junction.txt | |
69 cat "`find $PWD/files/ -name "7_*"`" > $PWD/mutationanalysis.txt | |
70 cat "`find $PWD/files/ -name "8_*"`" > $PWD/mutationstats.txt | |
71 cat "`find $PWD/files/ -name "9_*"`" > $PWD/aa_change_stats.txt | |
72 cat "`find $PWD/files/ -name "10_*"`" > $PWD/hotspots.txt | |
73 | |
74 echo "---------------- unique id check ----------------" | |
75 | |
76 Rscript $dir/check_unique_id.r $PWD/summary.txt $PWD/gapped_nt.txt $PWD/sequences.txt $PWD/gapped_aa.txt $PWD/aa.txt $PWD/junction.txt $PWD/mutationanalysis.txt $PWD/mutationstats.txt $PWD/aa_change_stats.txt $PWD/hotspots.txt | |
77 | |
78 if [[ ${#BLASTN_DIR} -ge 5 ]] ; then | |
79 echo "On server, using BLASTN_DIR env: ${BLASTN_DIR}" | |
80 else | |
81 BLASTN_DIR="/home/galaxy/Downloads/ncbi-blast-2.4.0+/bin" | |
82 echo "Dev Galaxy set BLASTN_DIR to: ${BLASTN_DIR}" | |
83 fi | |
84 | |
85 echo "---------------- class identification ----------------" | |
86 echo "---------------- class identification ----------------<br />" >> $log | |
87 | |
88 python $dir/gene_identification.py --input $PWD/summary.txt --output $outdir/identified_genes.txt | |
89 | |
90 echo "---------------- merge_and_filter.r ----------------" | |
91 echo "---------------- merge_and_filter.r ----------------<br />" >> $log | |
92 | |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
93 Rscript $dir/merge_and_filter.r \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
94 $PWD/summary.txt \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
95 $PWD/sequences.txt \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
96 $PWD/mutationanalysis.txt \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
97 $PWD/mutationstats.txt \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
98 $PWD/hotspots.txt \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
99 "$PWD/gapped_aa.txt" \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
100 $outdir/identified_genes.txt \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
101 $outdir/merged.txt \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
102 $outdir/before_unique_filter.txt \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
103 $outdir/unmatched.txt \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
104 $method \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
105 $functionality \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
106 $unique \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
107 ${filter_unique} \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
108 ${filter_unique_count} \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
109 ${class_filter} \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
110 ${empty_region_filter} |
81 | 111 |
92
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
112 echo "---------------- creating new IMGT zips ----------------" |
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
113 echo "---------------- creating new IMGT zips ----------------<br />" >> $log |
81 | 114 |
95
d63eff357515
planemo upload commit d96a736dcd6da34137f79861fbc6369716c332f1
rhpvorderman
parents:
94
diff
changeset
|
115 python $dir/split_imgt_file.py --outdir $outdir "$input" $outdir/merged.txt \ |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
116 --prefix "${NEW_IMGT_PREFIX}" \ |
92
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
117 - IGA IGA1 IGA2 IGG IGG1 IGG2 IGG3 IGG4 IGM IGE |
81 | 118 |
119 | |
120 echo "---------------- shm_csr.r ----------------" | |
121 echo "---------------- shm_csr.r ----------------<br />" >> $log | |
122 | |
123 classes="IGA,IGA1,IGA2,IGG,IGG1,IGG2,IGG3,IGG4,IGM,IGE,unmatched" | |
124 echo "R mutation analysis" | |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
125 Rscript $dir/shm_csr.r $outdir/merged.txt $classes $outdir ${empty_region_filter} |
81 | 126 |
92
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
127 echo "---------- Split naive memory IGM ---------" |
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
128 echo "---------- Split naive memory IGM ---------<br />" >> $log |
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
129 |
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
130 python $dir/igm_naive_mutations.py $outdir/scatter.txt $outdir/igm_naive_mutations.txt \ |
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
131 $outdir/igm_naive_memory_mutations.txt |
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
132 |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
133 python $dir/split_imgt_file.py --outdir $outdir $outdir/${NEW_IMGT_PREFIX}_IGM.txz \ |
92
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
134 $outdir/igm_naive_mutations.txt \ |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
135 --prefix "${NEW_IMGT_PREFIX}_IGM_NAIVE" - |
92
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
136 |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
137 python $dir/split_imgt_file.py --outdir $outdir $outdir/${NEW_IMGT_PREFIX}_IGM.txz \ |
92
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
138 $outdir/igm_naive_memory_mutations.txt \ |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
139 --prefix "${NEW_IMGT_PREFIX}_IGM_NAIVE_MEMORY" - |
92
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
140 |
81 | 141 echo "---------------- plot_pdfs.r ----------------" |
142 echo "---------------- plot_pdfs.r ----------------<br />" >> $log | |
143 | |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
144 echo "Rscript $dir/shm_csr.r $outdir/pdfplots.RData $outdir" |
81 | 145 |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
146 Rscript $dir/plot_pdf.r "$outdir/pdfplots.RData" "$outdir" |
81 | 147 |
148 echo "---------------- shm_csr.py ----------------" | |
149 echo "---------------- shm_csr.py ----------------<br />" >> $log | |
150 | |
151 python $dir/shm_csr.py --input $outdir/merged.txt --genes $classes --empty_region_filter "${empty_region_filter}" --output $outdir/hotspot_analysis.txt | |
152 | |
153 echo "---------------- aa_histogram.r ----------------" | |
154 echo "---------------- aa_histogram.r ----------------<br />" >> $log | |
155 | |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
156 Rscript $dir/aa_histogram.r \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
157 $outdir/aa_id_mutations.txt \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
158 $outdir/absent_aa_id.txt "IGA,IGG,IGM,IGE" \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
159 $outdir/ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
160 |
81 | 161 if [ -e "$outdir/aa_histogram_.png" ]; then |
162 mv $outdir/aa_histogram_.png $outdir/aa_histogram.png | |
163 mv $outdir/aa_histogram_.pdf $outdir/aa_histogram.pdf | |
164 mv $outdir/aa_histogram_.txt $outdir/aa_histogram.txt | |
165 mv $outdir/aa_histogram_absent_.txt $outdir/aa_histogram_absent.txt | |
166 mv $outdir/aa_histogram_count_.txt $outdir/aa_histogram_count.txt | |
167 mv $outdir/aa_histogram_sum_.txt $outdir/aa_histogram_sum.txt | |
168 fi | |
169 | |
170 genes=(IGA IGA1 IGA2 IGG IGG1 IGG2 IGG3 IGG4 IGM IGE) | |
171 | |
172 funcs=(sum mean median) | |
173 funcs=(sum) | |
174 | |
175 echo "---------------- sequence_overview.r ----------------" | |
176 echo "---------------- sequence_overview.r ----------------<br />" >> $log | |
177 | |
178 mkdir $outdir/sequence_overview | |
179 | |
92
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
180 python $dir/sequence_overview.py --before-unique $outdir/before_unique_filter.txt \ |
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
181 --outdir $outdir/sequence_overview --empty-region-filter ${empty_region_filter} |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
182 Rscript $dir/nt_overview.r \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
183 $outdir/merged.txt \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
184 $outdir/sequence_overview \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
185 $classes \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
186 $outdir/hotspot_analysis_sum.txt \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
187 ${empty_region_filter} |
81 | 188 |
189 echo "<table border='1'>" > $outdir/base_overview.html | |
190 | |
191 while IFS=$'\t' read ID class seq A C G T | |
192 do | |
193 echo "<tr><td>$ID</td><td>$seq</td><td>$class</td><td>$A</td><td>$C</td><td>$G</td><td>$T</td></tr>" >> $outdir/base_overview.html | |
194 done < $outdir/sequence_overview/ntoverview.txt | |
195 | |
196 echo "<html><center><h1>$title</h1></center>" > $output | |
197 echo "<meta name='viewport' content='width=device-width, initial-scale=1'>" >> $output | |
198 echo "<script type='text/javascript' src='jquery-1.11.0.min.js'></script>" >> $output | |
199 echo "<script type='text/javascript' src='tabber.js'></script>" >> $output | |
200 echo "<script type='text/javascript' src='script.js'></script>" >> $output | |
201 echo "<link rel='stylesheet' type='text/css' href='style.css'>" >> $output | |
202 echo "<link rel='stylesheet' type='text/css' href='pure-min.css'>" >> $output | |
203 | |
204 matched_count="`cat $outdir/merged.txt | grep -v 'unmatched' | tail -n +2 | wc -l`" | |
205 unmatched_count="`cat $outdir/unmatched.txt | tail -n +2 | wc -l`" | |
206 total_count=$((matched_count + unmatched_count)) | |
207 perc_count=$((unmatched_count / total_count * 100)) | |
208 perc_count=`bc -l <<< "scale=2; ${unmatched_count} / ${total_count} * 100"` | |
209 perc_count=`bc -l <<< "scale=2; (${unmatched_count} / ${total_count} * 100 ) / 1"` | |
210 | |
211 echo "<center><h2>Total: ${total_count}</h2></center>" >> $output | |
212 echo "<center><h2>Matched: ${matched_count} Unmatched: ${unmatched_count}</h2></center>" >> $output | |
213 echo "<center><h2>Percentage unmatched: ${perc_count}</h2></center>" >> $output | |
214 | |
215 echo "---------------- main tables ----------------" | |
216 echo "---------------- main tables ----------------<br />" >> $log | |
217 | |
218 echo "<div class='tabber'>" >> $output | |
219 echo "<div class='tabbertab' title='SHM Overview' style='width: 3000px;'>" >> $output | |
220 | |
221 for func in ${funcs[@]} | |
222 do | |
223 | |
224 echo "---------------- $func table ----------------" | |
225 echo "---------------- $func table ----------------<br />" >> $log | |
226 | |
227 cat $outdir/mutations_${func}.txt $outdir/shm_overview_tandem_row.txt $outdir/hotspot_analysis_${func}.txt > $outdir/data_${func}.txt | |
228 | |
229 echo "---------------- pattern_plots.r ----------------" | |
230 echo "---------------- pattern_plots.r ----------------<br />" >> $log | |
231 | |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
232 Rscript $dir/pattern_plots.r \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
233 $outdir/data_${func}.txt \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
234 $outdir/aid_motives \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
235 $outdir/relative_mutations \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
236 $outdir/absolute_mutations \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
237 $outdir/shm_overview.txt |
81 | 238 |
239 echo "<table class='pure-table pure-table-striped'>" >> $output | |
240 echo "<thead><tr><th>info</th>" >> $output | |
241 | |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
242 if [ "${class_filter}" != "101_101_all" ] ; then |
81 | 243 |
244 for gene in ${genes[@]} | |
245 do | |
246 tmp=`cat $outdir/${gene}_${func}_n.txt` | |
247 echo "<th><a href='matched_${gene}_${func}.txt'>${gene} (N = $tmp)</a></th>" >> $output | |
248 done | |
249 | |
250 tmp=`cat $outdir/all_${func}_n.txt` | |
251 echo "<th><a href='matched_all_${func}.txt'>all (N = $tmp)</a></th>" >> $output | |
252 tmp=`cat $outdir/unmatched_${func}_n.txt` | |
253 echo "<th><a href='unmatched.txt'>unmatched (N = ${unmatched_count})</a></th><tr></thead>" >> $output | |
254 | |
255 while IFS=, read name cax cay caz ca1x ca1y ca1z ca2x ca2y ca2z cgx cgy cgz cg1x cg1y cg1z cg2x cg2y cg2z cg3x cg3y cg3z cg4x cg4y cg4z cmx cmy cmz cex cey cez unx uny unz allx ally allz | |
256 do | |
257 if [ "$name" == "FR R/S (ratio)" ] || [ "$name" == "CDR R/S (ratio)" ] || [ "$name" == "Tandems/Expected (ratio)" ] ; then #meh | |
258 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>${cex}/${cey} (${cez})</td><td>${allx}/${ally} (${allz})</td><td>${unx}/${uny} (${unz})</td></tr>" >> $output | |
259 elif [ "$name" == "Median of Number of Mutations (%)" ] ; then | |
260 echo "<tr><td>$name</td><td>${caz}%</td><td>${ca1z}%</td><td>${ca2z}%</td><td>${cgz}%</td><td>${cg1z}%</td><td>${cg2z}%</td><td>${cg3z}%</td><td>${cg4z}%</td><td>${cmz}%</td><td>${cez}%</td><td>${allz}%</td><td>${unz}%</td></tr>" >> $output | |
261 else | |
262 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>${cex}/${cey} (${cez}%)</td><td>${allx}/${ally} (${allz}%)</td><td>${unx}/${uny} (${unz}%)</td></tr>" >> $output | |
263 fi | |
264 done < $outdir/data_${func}.txt | |
265 | |
266 else | |
267 tmp=`cat $outdir/all_${func}_n.txt` | |
268 echo "<th><a href='matched_all_${func}.txt'>all (N = $tmp)</a></th>" >> $output | |
269 | |
270 while IFS=, read name cax cay caz ca1x ca1y ca1z ca2x ca2y ca2z cgx cgy cgz cg1x cg1y cg1z cg2x cg2y cg2z cg3x cg3y cg3z cg4x cg4y cg4z cmx cmy cmz cex cey cez unx uny unz allx ally allz | |
271 do | |
272 if [ "$name" == "FR R/S (ratio)" ] || [ "$name" == "CDR R/S (ratio)" ] ; then #meh | |
273 echo "<tr><td>$name</td><td>${allx}/${ally}</td></tr>" >> $output | |
274 elif [ "$name" == "Median of Number of Mutations (%)" ] ; then | |
275 echo "<tr><td>$name</td><td>${allz}%</td></tr>" >> $output | |
276 else | |
277 echo "<tr><td>$name</td><td>${allx}/${ally} (${allz}%)</td></tr>" >> $output | |
278 fi | |
279 done < $outdir/data_${func}.txt | |
280 | |
281 fi | |
282 echo "</table>" >> $output | |
283 #echo "<a href='data_${func}.txt'>Download data</a>" >> $output | |
284 done | |
285 | |
286 echo "<a href='aid_motives.pdf'><img src='aid_motives.png' /></a><br />" >> $output | |
287 echo "<a href='relative_mutations.pdf'><img src='relative_mutations.png' /></a><br />" >> $output | |
288 echo "<a href='absolute_mutations.pdf'><img src='absolute_mutations.png' /></a><br />" >> $output | |
289 echo "<br />" >> $output | |
290 cat $dir/shm_overview.htm >> $output | |
291 echo "</div>" >> $output #SHM overview tab end | |
292 | |
293 echo "---------------- images ----------------" | |
294 echo "---------------- images ----------------<br />" >> $log | |
295 | |
296 echo "<div class='tabbertab' title='SHM Frequency' style='width: 3000px;'></a>" >> $output | |
297 | |
298 if [ -a $outdir/scatter.png ] | |
299 then | |
300 echo "<a href='scatter.pdf'><img src='scatter.png'/><br />" >> $output | |
301 fi | |
302 if [ -a $outdir/frequency_ranges.png ] | |
303 then | |
304 echo "<a href='frequency_ranges.pdf'><img src='frequency_ranges.png'/></a><br />" >> $output | |
305 fi | |
306 | |
307 echo "<br />" >> $output | |
308 cat $dir/shm_frequency.htm >> $output | |
309 | |
310 echo "</div>" >> $output #SHM frequency tab end | |
311 | |
312 echo "<div class='tabbertab' title='Transition tables' style='width: 3000px;'>" >> $output | |
313 | |
314 echo "<table border='0'>" >> $output | |
315 | |
316 for gene in ${genes[@]} | |
317 do | |
318 echo "<tr>" >> $output | |
319 echo "<td><h1>${gene}</h1></td>" >> $output | |
320 | |
321 if [ -e $outdir/transitions_heatmap_${gene}.png ] | |
322 then | |
323 echo "<td><a href='transitions_heatmap_${gene}.pdf'><img src='transitions_heatmap_${gene}.png' /></a></td>" >> $output | |
324 else | |
325 echo "<td></td>" >> $output | |
326 fi | |
327 | |
328 if [ -e $outdir/transitions_stacked_${gene}.png ] | |
329 then | |
330 echo "<td><a href='transitions_stacked_${gene}.pdf'><img src='transitions_stacked_${gene}.png' /></a></td>" >> $output | |
331 else | |
332 echo "<td></td>" >> $output | |
333 fi | |
334 | |
335 echo "<td><table style='border-left-width: 1;' class='pure-table transition-table pure-table-bordered'>" >> $output | |
336 echo "<tr><td></td><td colspan="5"><center>To</center></td></tr>" >> $output | |
337 first="true" | |
338 while IFS=, read from a c g t | |
339 do | |
340 if [ "$first" == "true" ] ; then | |
341 echo "<tr><td rowspan='5'>From</td><td>$from</td><td>$a</td><td>$c</td><td>$g</td><td>$t</td></tr>" >> $output | |
342 first="false" | |
343 else | |
344 echo "<tr><td>$from</td><td>$a</td><td>$c</td><td>$g</td><td>$t</td></tr>" >> $output | |
345 fi | |
346 done < $outdir/transitions_${gene}_sum.txt | |
347 echo "</table></td>" >> $output | |
348 | |
349 echo "</tr>" >> $output | |
350 done | |
351 | |
352 echo "<tr>" >> $output | |
353 echo "<td><h1>All</h1></td>" >> $output | |
354 echo "<td><a href='transitions_heatmap_all.pdf'><img src='transitions_heatmap_all.png' /></a></td>" >> $output | |
355 echo "<td><a href='transitions_stacked_all.pdf'><img src='transitions_stacked_all.png' /></a></td>" >> $output | |
356 echo "<td><table style='border-left-width: 1;' class='pure-table transition-table pure-table-bordered'>" >> $output | |
357 echo "<tr><td></td><td colspan="5"><center>To</center></td></tr>" >> $output | |
358 first="true" | |
359 while IFS=, read from a c g t | |
360 do | |
361 if [ "$first" == "true" ] ; then | |
362 echo "<tr><td rowspan='5'>From</td><td>$from</td><td>$a</td><td>$c</td><td>$g</td><td>$t</td></tr>" >> $output | |
363 first="false" | |
364 else | |
365 echo "<tr><td>$from</td><td>$a</td><td>$c</td><td>$g</td><td>$t</td></tr>" >> $output | |
366 fi | |
367 done < $outdir/transitions_all_sum.txt | |
368 echo "</table></td>" >> $output | |
369 | |
370 echo "</tr>" >> $output | |
371 | |
372 echo "</table>" >> $output | |
373 | |
374 echo "<br />" >> $output | |
375 cat $dir/shm_transition.htm >> $output | |
376 | |
377 echo "</div>" >> $output #transition tables tab end | |
378 | |
379 echo "<div class='tabbertab' title='Antigen Selection'>" >> $output | |
380 | |
381 if [ -e $outdir/aa_histogram.png ] | |
382 then | |
383 echo "<a href='aa_histogram.pdf'><img src='aa_histogram.png'/></a><br />" >> $output | |
384 fi | |
385 | |
386 if [ -e $outdir/aa_histogram_IGA.png ] | |
387 then | |
388 echo "<a href='aa_histogram_IGA.pdf'><img src='aa_histogram_IGA.png'/></a><br />" >> $output | |
389 fi | |
390 | |
391 if [ -e $outdir/aa_histogram_IGG.png ] | |
392 then | |
393 echo "<a href='aa_histogram_IGG.pdf'><img src='aa_histogram_IGG.png'/></a><br />" >> $output | |
394 fi | |
395 | |
396 if [ -e $outdir/aa_histogram_IGM.png ] | |
397 then | |
398 echo "<a href='aa_histogram_IGM.pdf'><img src='aa_histogram_IGM.png'/></a><br />" >> $output | |
399 fi | |
400 | |
401 if [ -e $outdir/aa_histogram_IGE.png ] | |
402 then | |
403 echo "<a href='aa_histogram_IGE.pdf'><img src='aa_histogram_IGE.png'/></a><br />" >> $output | |
404 fi | |
405 | |
92
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
406 count_imgt_lines () { |
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
407 tar -xJf $1 1_Summary.txt |
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
408 # Use a pipe so wc -l does not display the filename |
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
409 wc -l < 1_Summary.txt |
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
410 rm 1_Summary.txt |
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
411 } |
81 | 412 |
413 if [[ "$fast" == "no" ]] ; then | |
414 | |
415 | |
416 | |
417 echo "---------------- baseline ----------------" | |
418 echo "---------------- baseline ----------------<br />" >> $log | |
419 tmp="$PWD" | |
420 | |
83
729738462297
"planemo upload commit c0ffc68aec5836d5b20b543106493056a87edf57"
rhpvorderman
parents:
81
diff
changeset
|
421 mkdir -p $outdir/baseline |
81 | 422 |
423 echo "<center><h1>BASELINe</h1>" >> $output | |
424 header_substring="Based on CDR1, FR2, CDR2, FR3 (27:27:38:55:65:104:-)" | |
425 | |
426 baseline_boundaries="27:27:38:55:65:104:-" | |
427 | |
428 if [[ "${empty_region_filter}" == "leader" ]] ; then | |
429 baseline_boundaries="1:26:38:55:65:104:-" | |
430 header_substring="Based on FR1, CDR1, FR2, CDR2, FR3 (1:26:38:55:65:104,-)" | |
431 fi | |
432 | |
433 echo "<p>${header_substring}</p></center>" >> $output | |
434 | |
435 mkdir $outdir/baseline/IGA_IGG_IGM | |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
436 if [[ "$(count_imgt_lines $outdir/${NEW_IMGT_PREFIX}.txz)" -gt "1" ]]; then |
81 | 437 cd $outdir/baseline/IGA_IGG_IGM |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
438 bash $dir/baseline/wrapper.sh 1 1 1 1 0 0 "${baseline_boundaries}" $outdir/${NEW_IMGT_PREFIX}.txz "IGA_IGG_IGM_IGE" "$dir/baseline/IMGTVHreferencedataset20161215.fa" "$outdir/baseline.pdf" "Sequence.ID" "$outdir/baseline.txt" |
81 | 439 else |
440 echo "No sequences" > "$outdir/baseline.txt" | |
441 fi | |
442 | |
443 mkdir $outdir/baseline/IGA | |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
444 if [[ "$(count_imgt_lines $outdir/${NEW_IMGT_PREFIX}_IGA.txz)" -gt "1" ]]; then |
81 | 445 cd $outdir/baseline/IGA |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
446 bash $dir/baseline/wrapper.sh 1 1 1 1 0 0 "${baseline_boundaries}" $outdir/${NEW_IMGT_PREFIX}_IGA.txz "IGA" "$dir/baseline/IMGTVHreferencedataset20161215.fa" "$outdir/baseline_IGA.pdf" "Sequence.ID" "$outdir/baseline_IGA.txt" |
81 | 447 else |
448 echo "No IGA sequences" > "$outdir/baseline_IGA.txt" | |
449 fi | |
450 | |
451 mkdir $outdir/baseline/IGG | |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
452 if [[ "$(count_imgt_lines $outdir/${NEW_IMGT_PREFIX}_IGG.txz)" -gt "1" ]]; then |
81 | 453 cd $outdir/baseline/IGG |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
454 bash $dir/baseline/wrapper.sh 1 1 1 1 0 0 "${baseline_boundaries}" $outdir/${NEW_IMGT_PREFIX}_IGG.txz "IGG" "$dir/baseline/IMGTVHreferencedataset20161215.fa" "$outdir/baseline_IGG.pdf" "Sequence.ID" "$outdir/baseline_IGG.txt" |
81 | 455 else |
456 echo "No IGG sequences" > "$outdir/baseline_IGG.txt" | |
457 fi | |
458 | |
459 mkdir $outdir/baseline/IGM | |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
460 if [[ "$(count_imgt_lines $outdir/${NEW_IMGT_PREFIX}_IGM.txz)" -gt "1" ]]; then |
81 | 461 cd $outdir/baseline/IGM |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
462 bash $dir/baseline/wrapper.sh 1 1 1 1 0 0 "${baseline_boundaries}" $outdir/${NEW_IMGT_PREFIX}_IGM.txz "IGM" "$dir/baseline/IMGTVHreferencedataset20161215.fa" "$outdir/baseline_IGM.pdf" "Sequence.ID" "$outdir/baseline_IGM.txt" |
81 | 463 else |
464 echo "No IGM sequences" > "$outdir/baseline_IGM.txt" | |
465 fi | |
466 | |
467 mkdir $outdir/baseline/IGE | |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
468 if [[ "$(count_imgt_lines $outdir/${NEW_IMGT_PREFIX}_IGE.txz)" -gt "1" ]]; then |
81 | 469 cd $outdir/baseline/IGE |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
470 bash $dir/baseline/wrapper.sh 1 1 1 1 0 0 "${baseline_boundaries}" $outdir/${NEW_IMGT_PREFIX}_IGE.txz "IGE" "$dir/baseline/IMGTVHreferencedataset20161215.fa" "$outdir/baseline_IGE.pdf" "Sequence.ID" "$outdir/baseline_IGE.txt" |
81 | 471 else |
472 echo "No IGE sequences" > "$outdir/baseline_IGE.txt" | |
473 fi | |
474 | |
475 cd $tmp | |
476 | |
477 echo "Cleaning up *.RData files" | |
478 find $outdir/baseline -name "*.RData" -type f -delete | |
479 | |
480 if [ -e $outdir/baseline.pdf ] | |
481 then | |
482 echo "<embed src='baseline.pdf' width='700px' height='1000px'>" >> $output | |
483 fi | |
484 | |
485 if [ -e $outdir/baseline_IGA.pdf ] | |
486 then | |
487 echo "<embed src='baseline_IGA.pdf' width='700px' height='1000px'>" >> $output | |
488 fi | |
489 | |
490 if [ -e $outdir/baseline_IGG.pdf ] | |
491 then | |
492 echo "<embed src='baseline_IGG.pdf' width='700px' height='1000px'>" >> $output | |
493 fi | |
494 | |
495 if [ -e $outdir/baseline_IGM.pdf ] | |
496 then | |
497 echo "<embed src='baseline_IGM.pdf' width='700px' height='1000px'>" >> $output | |
498 fi | |
499 | |
500 if [ -e $outdir/baseline_IGE.pdf ] | |
501 then | |
502 echo "<embed src='baseline_IGE.pdf' width='700px' height='1000px'>" >> $output | |
503 fi | |
504 fi | |
505 | |
506 echo "<br />" >> $output | |
507 cat $dir/shm_selection.htm >> $output | |
508 | |
509 echo "</div>" >> $output #antigen selection tab end | |
510 | |
511 echo "<div class='tabbertab' title='CSR'>" >> $output #CSR tab | |
512 | |
513 if [ -e $outdir/IGA.png ] | |
514 then | |
515 echo "<a href='IGA.pdf'><img src='IGA.png'/></a><br />" >> $output | |
516 fi | |
517 if [ -e $outdir/IGG.png ] | |
518 then | |
519 echo "<a href='IGG.pdf'><img src='IGG.png'/></a><br />" >> $output | |
520 fi | |
521 | |
522 echo "<br />" >> $output | |
523 cat $dir/shm_csr.htm >> $output | |
524 | |
525 echo "</div>" >> $output #CSR tab end | |
526 | |
527 if [[ "$fast" == "no" ]] ; then | |
528 | |
529 echo "---------------- change-o MakeDB ----------------" | |
530 | |
83
729738462297
"planemo upload commit c0ffc68aec5836d5b20b543106493056a87edf57"
rhpvorderman
parents:
81
diff
changeset
|
531 mkdir -p $outdir/change_o |
81 | 532 |
533 tmp="$PWD" | |
534 | |
535 cd $outdir/change_o | |
536 | |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
537 bash $dir/change_o/makedb.sh $outdir/${NEW_IMGT_PREFIX}.txz false false false $outdir/change_o/change-o-db.txt |
81 | 538 bash $dir/change_o/define_clones.sh bygroup $outdir/change_o/change-o-db.txt gene first ham none min complete 3.0 $outdir/change_o/change-o-db-defined_clones.txt $outdir/change_o/change-o-defined_clones-summary.txt |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
539 Rscript $dir/change_o/select_first_in_clone.r \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
540 $outdir/change_o/change-o-db-defined_clones.txt \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
541 $outdir/change_o/change-o-db-defined_first_clones.txt |
81 | 542 |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
543 python $dir/split_imgt_file.py --outdir $outdir --prefix ${NEW_IMGT_PREFIX}_first_seq_of_clone \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
544 $outdir/${NEW_IMGT_PREFIX}.txz $outdir/change_o/change-o-db-defined_first_clones.txt \ |
92
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
545 "-" |
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
546 |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
547 Rscript $dir/merge.r \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
548 $outdir/change_o/change-o-db-defined_clones.txt \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
549 $outdir/merged.txt \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
550 "all" "Sequence.ID,best_match" "SEQUENCE_ID" "Sequence.ID" \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
551 $outdir/change_o/change-o-db-defined_clones.txt |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
552 echo "Rscript $dir/merge.r $outdir/change_o/change-o-db-defined_clones.txt $outdir/$outdir/merged.txt 'all' 'Sequence.ID,best_match' 'Sequence.ID' 'Sequence.ID' '\t' $outdir/change_o/change-o-db-defined_clones.txt" |
81 | 553 |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
554 if [[ "$(count_imgt_lines $outdir/${NEW_IMGT_PREFIX}_IGA.txz)" -gt "1" ]]; then |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
555 bash $dir/change_o/makedb.sh $outdir/${NEW_IMGT_PREFIX}_IGA.txz false false false $outdir/change_o/change-o-db-IGA.txt |
81 | 556 bash $dir/change_o/define_clones.sh bygroup $outdir/change_o/change-o-db-IGA.txt gene first ham none min complete 3.0 $outdir/change_o/change-o-db-defined_clones-IGA.txt $outdir/change_o/change-o-defined_clones-summary-IGA.txt |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
557 Rscript $dir/change_o/select_first_in_clone.r \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
558 $outdir/change_o/change-o-db-defined_clones-IGA.txt \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
559 $outdir/change_o/change-o-db-defined_first_clones-IGA.txt |
81 | 560 |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
561 python $dir/split_imgt_file.py --outdir $outdir --prefix ${NEW_IMGT_PREFIX}_IGA_first_seq_of_clone \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
562 $outdir/${NEW_IMGT_PREFIX}.txz $outdir/change_o/change-o-db-defined_first_clones-IGA.txt \ |
92
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
563 "-" |
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
564 |
81 | 565 else |
566 echo "No IGA sequences" > "$outdir/change_o/change-o-db-defined_clones-IGA.txt" | |
567 echo "No IGA sequences" > "$outdir/change_o/change-o-defined_clones-summary-IGA.txt" | |
568 fi | |
569 | |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
570 if [[ "$(count_imgt_lines $outdir/${NEW_IMGT_PREFIX}_IGG.txz)" -gt "1" ]]; then |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
571 bash $dir/change_o/makedb.sh $outdir/${NEW_IMGT_PREFIX}_IGG.txz false false false $outdir/change_o/change-o-db-IGG.txt |
81 | 572 bash $dir/change_o/define_clones.sh bygroup $outdir/change_o/change-o-db-IGG.txt gene first ham none min complete 3.0 $outdir/change_o/change-o-db-defined_clones-IGG.txt $outdir/change_o/change-o-defined_clones-summary-IGG.txt |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
573 Rscript $dir/change_o/select_first_in_clone.r \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
574 $outdir/change_o/change-o-db-defined_clones-IGG.txt \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
575 $outdir/change_o/change-o-db-defined_first_clones-IGG.txt |
81 | 576 |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
577 python $dir/split_imgt_file.py --outdir $outdir --prefix ${NEW_IMGT_PREFIX}_IGG_first_seq_of_clone \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
578 $outdir/${NEW_IMGT_PREFIX}.txz $outdir/change_o/change-o-db-defined_first_clones-IGG.txt \ |
92
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
579 "-" |
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
580 |
81 | 581 else |
582 echo "No IGG sequences" > "$outdir/change_o/change-o-db-defined_clones-IGG.txt" | |
583 echo "No IGG sequences" > "$outdir/change_o/change-o-defined_clones-summary-IGG.txt" | |
584 fi | |
585 | |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
586 if [[ "$(count_imgt_lines $outdir/${NEW_IMGT_PREFIX}_IGM.txz)" -gt "1" ]]; then |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
587 bash $dir/change_o/makedb.sh $outdir/${NEW_IMGT_PREFIX}_IGM.txz false false false $outdir/change_o/change-o-db-IGM.txt |
81 | 588 bash $dir/change_o/define_clones.sh bygroup $outdir/change_o/change-o-db-IGM.txt gene first ham none min complete 3.0 $outdir/change_o/change-o-db-defined_clones-IGM.txt $outdir/change_o/change-o-defined_clones-summary-IGM.txt |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
589 Rscript $dir/change_o/select_first_in_clone.r \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
590 $outdir/change_o/change-o-db-defined_clones-IGM.txt \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
591 $outdir/change_o/change-o-db-defined_first_clones-IGM.txt |
81 | 592 |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
593 python $dir/split_imgt_file.py --outdir $outdir --prefix ${NEW_IMGT_PREFIX}_IGM_first_seq_of_clone \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
594 $outdir/${NEW_IMGT_PREFIX}.txz $outdir/change_o/change-o-db-defined_first_clones-IGM.txt \ |
92
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
595 "-" |
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
596 |
81 | 597 else |
598 echo "No IGM sequences" > "$outdir/change_o/change-o-db-defined_clones-IGM.txt" | |
599 echo "No IGM sequences" > "$outdir/change_o/change-o-defined_clones-summary-IGM.txt" | |
600 fi | |
601 | |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
602 if [[ "$(count_imgt_lines $outdir/${NEW_IMGT_PREFIX}_IGE.txz)" -gt "1" ]]; then |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
603 bash $dir/change_o/makedb.sh $outdir/${NEW_IMGT_PREFIX}_IGE.txz false false false $outdir/change_o/change-o-db-IGE.txt |
81 | 604 bash $dir/change_o/define_clones.sh bygroup $outdir/change_o/change-o-db-IGE.txt gene first ham none min complete 3.0 $outdir/change_o/change-o-db-defined_clones-IGE.txt $outdir/change_o/change-o-defined_clones-summary-IGE.txt |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
605 Rscript $dir/change_o/select_first_in_clone.r \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
606 $outdir/change_o/change-o-db-defined_clones-IGE.txt \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
607 $outdir/change_o/change-o-db-defined_first_clones-IGE.txt |
81 | 608 |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
609 python $dir/split_imgt_file.py --outdir $outdir --prefix ${NEW_IMGT_PREFIX}_IGE_first_seq_of_clone \ |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
610 $outdir/${NEW_IMGT_PREFIX}.txz $outdir/change_o/change-o-db-defined_first_clones-IGE.txt \ |
92
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
611 "-" |
cf8ad181628f
planemo upload commit 36be3b053802693392f935e6619ba3f2b1704e3c
rhpvorderman
parents:
91
diff
changeset
|
612 |
81 | 613 else |
614 echo "No IGE sequences" > "$outdir/change_o/change-o-db-defined_clones-IGE.txt" | |
615 echo "No IGE sequences" > "$outdir/change_o/change-o-defined_clones-summary-IGE.txt" | |
616 fi | |
617 | |
618 cd "$tmp" | |
619 | |
620 echo "<div class='tabbertab' title='Clonal Relation' style='width: 7000px;'>" >> $output #clonality tab | |
621 | |
622 function clonality_table { | |
623 local infile=$1 | |
624 local outfile=$2 | |
625 | |
626 echo "<table class='pure-table pure-table-striped'>" >> $outfile | |
627 echo "<thead><tr><th>Clone size</th><th>Nr of clones</th><th>Nr of sequences</th></tr></thead>" >> $outfile | |
628 | |
629 first='true' | |
630 | |
631 while read size clones seqs | |
632 do | |
633 if [[ "$first" == "true" ]]; then | |
634 first="false" | |
635 continue | |
636 fi | |
637 echo "<tr><td>$size</td><td>$clones</td><td>$seqs</td></tr>" >> $outfile | |
638 done < $infile | |
639 | |
640 echo "</table>" >> $outfile | |
641 } | |
642 echo "<div class='tabber'>" >> $output | |
643 | |
644 echo "<div class='tabbertab' title='All'>" >> $output | |
645 clonality_table $outdir/change_o/change-o-defined_clones-summary.txt $output | |
646 echo "</div>" >> $output | |
647 | |
648 echo "<div class='tabbertab' title='IGA'>" >> $output | |
649 clonality_table $outdir/change_o/change-o-defined_clones-summary-IGA.txt $output | |
650 echo "</div>" >> $output | |
651 | |
652 echo "<div class='tabbertab' title='IGG'>" >> $output | |
653 clonality_table $outdir/change_o/change-o-defined_clones-summary-IGG.txt $output | |
654 echo "</div>" >> $output | |
655 | |
656 echo "<div class='tabbertab' title='IGM'>" >> $output | |
657 clonality_table $outdir/change_o/change-o-defined_clones-summary-IGM.txt $output | |
658 echo "</div>" >> $output | |
659 | |
660 echo "<div class='tabbertab' title='IGE'>" >> $output | |
661 clonality_table $outdir/change_o/change-o-defined_clones-summary-IGM.txt $output | |
662 echo "</div>" >> $output | |
663 | |
664 echo "<div class='tabbertab' title='Overlap' style='width: 7000px;'>" >> $output | |
665 cat "$outdir/sequence_overview/index.html" | sed -e 's:</td>:</td>\n:g' | sed "s:href='\(.*\).html:href='sequence_overview/\1.html:g" >> $output # rewrite href to 'sequence_overview/..." | |
666 echo "</div>" >> $output | |
667 | |
668 echo "</div>" >> $output #clonality tabber end | |
669 | |
670 echo "<br />" >> $output | |
671 cat $dir/shm_clonality.htm >> $output | |
672 | |
673 echo "</div>" >> $output #clonality tab end | |
674 | |
675 fi | |
676 | |
91
f387cc1580c6
"planemo upload commit 6f5bdb4189fcc9028c90365d8edf8d1d7c1cf690"
rhpvorderman
parents:
90
diff
changeset
|
677 # Use python's zipfile utility to prevent needing another dependency in the |
f387cc1580c6
"planemo upload commit 6f5bdb4189fcc9028c90365d8edf8d1d7c1cf690"
rhpvorderman
parents:
90
diff
changeset
|
678 # container. |
f387cc1580c6
"planemo upload commit 6f5bdb4189fcc9028c90365d8edf8d1d7c1cf690"
rhpvorderman
parents:
90
diff
changeset
|
679 current_dir=$(pwd) |
f387cc1580c6
"planemo upload commit 6f5bdb4189fcc9028c90365d8edf8d1d7c1cf690"
rhpvorderman
parents:
90
diff
changeset
|
680 cd $outdir |
f387cc1580c6
"planemo upload commit 6f5bdb4189fcc9028c90365d8edf8d1d7c1cf690"
rhpvorderman
parents:
90
diff
changeset
|
681 python -m zipfile -c all_outputs.zip \ |
f387cc1580c6
"planemo upload commit 6f5bdb4189fcc9028c90365d8edf8d1d7c1cf690"
rhpvorderman
parents:
90
diff
changeset
|
682 merged.txt filtered.txt unmatched.txt shm_overview.txt motif_per_seq.txt \ |
f387cc1580c6
"planemo upload commit 6f5bdb4189fcc9028c90365d8edf8d1d7c1cf690"
rhpvorderman
parents:
90
diff
changeset
|
683 mutation_by_id.txt base_overview.html aid_motives.txt relative_mutations.txt \ |
f387cc1580c6
"planemo upload commit 6f5bdb4189fcc9028c90365d8edf8d1d7c1cf690"
rhpvorderman
parents:
90
diff
changeset
|
684 absolute_mutations.txt tandems_by_id.txt scatter.txt frequency_ranges_class.txt \ |
f387cc1580c6
"planemo upload commit 6f5bdb4189fcc9028c90365d8edf8d1d7c1cf690"
rhpvorderman
parents:
90
diff
changeset
|
685 frequency_ranges_subclasses.txt transitions_all_sum.txt transitions_IGA_sum.txt \ |
f387cc1580c6
"planemo upload commit 6f5bdb4189fcc9028c90365d8edf8d1d7c1cf690"
rhpvorderman
parents:
90
diff
changeset
|
686 transitions_IGA1_sum.txt transitions_IGA2_sum.txt transitions_IGG_sum.txt \ |
f387cc1580c6
"planemo upload commit 6f5bdb4189fcc9028c90365d8edf8d1d7c1cf690"
rhpvorderman
parents:
90
diff
changeset
|
687 transitions_IGG1_sum.txt transitions_IGG2_sum.txt transitions_IGG3_sum.txt \ |
f387cc1580c6
"planemo upload commit 6f5bdb4189fcc9028c90365d8edf8d1d7c1cf690"
rhpvorderman
parents:
90
diff
changeset
|
688 transitions_IGG4_sum.txt transitions_IGM_sum.txt transitions_IGE_sum.txt \ |
f387cc1580c6
"planemo upload commit 6f5bdb4189fcc9028c90365d8edf8d1d7c1cf690"
rhpvorderman
parents:
90
diff
changeset
|
689 aa_id_mutations.txt absent_aa_id.txt aa_histogram_sum.txt \ |
f387cc1580c6
"planemo upload commit 6f5bdb4189fcc9028c90365d8edf8d1d7c1cf690"
rhpvorderman
parents:
90
diff
changeset
|
690 aa_histogram_sum_IGA.txt aa_histogram_sum_IGG.txt aa_histogram_sum_IGM.txt \ |
f387cc1580c6
"planemo upload commit 6f5bdb4189fcc9028c90365d8edf8d1d7c1cf690"
rhpvorderman
parents:
90
diff
changeset
|
691 aa_histogram_sum_IGE.txt baseline.txt baseline_IGA.pdf baseline_IGA.txt \ |
f387cc1580c6
"planemo upload commit 6f5bdb4189fcc9028c90365d8edf8d1d7c1cf690"
rhpvorderman
parents:
90
diff
changeset
|
692 baseline_IGG.pdf baseline_IGG.txt baseline_IGM.pdf baseline_IGM.txt \ |
f387cc1580c6
"planemo upload commit 6f5bdb4189fcc9028c90365d8edf8d1d7c1cf690"
rhpvorderman
parents:
90
diff
changeset
|
693 baseline_IGE.pdf baseline_IGE.txt IGA_pie.txt IGG_pie.txt \ |
f387cc1580c6
"planemo upload commit 6f5bdb4189fcc9028c90365d8edf8d1d7c1cf690"
rhpvorderman
parents:
90
diff
changeset
|
694 sequence_overview/index.html change_o/change-o-db-defined_clones*.txt \ |
f387cc1580c6
"planemo upload commit 6f5bdb4189fcc9028c90365d8edf8d1d7c1cf690"
rhpvorderman
parents:
90
diff
changeset
|
695 *.txz |
f387cc1580c6
"planemo upload commit 6f5bdb4189fcc9028c90365d8edf8d1d7c1cf690"
rhpvorderman
parents:
90
diff
changeset
|
696 |
f387cc1580c6
"planemo upload commit 6f5bdb4189fcc9028c90365d8edf8d1d7c1cf690"
rhpvorderman
parents:
90
diff
changeset
|
697 cd $current_dir |
f387cc1580c6
"planemo upload commit 6f5bdb4189fcc9028c90365d8edf8d1d7c1cf690"
rhpvorderman
parents:
90
diff
changeset
|
698 |
f387cc1580c6
"planemo upload commit 6f5bdb4189fcc9028c90365d8edf8d1d7c1cf690"
rhpvorderman
parents:
90
diff
changeset
|
699 |
81 | 700 echo "<div class='tabbertab' title='Downloads'>" >> $output |
701 | |
702 echo "<table class='pure-table pure-table-striped'>" >> $output | |
703 echo "<thead><tr><th>info</th><th>link</th></tr></thead>" >> $output | |
91
f387cc1580c6
"planemo upload commit 6f5bdb4189fcc9028c90365d8edf8d1d7c1cf690"
rhpvorderman
parents:
90
diff
changeset
|
704 echo "<tr><td>All output files in a zip file</td><td><a href='all_outputs.zip' download='all_outputs.zip' >Download</a></td></tr>" >> $output |
81 | 705 echo "<tr><td>The complete dataset</td><td><a href='merged.txt' download='merged.txt' >Download</a></td></tr>" >> $output |
706 echo "<tr><td>The filtered dataset</td><td><a href='filtered.txt' download='filtered.txt' >Download</a></td></tr>" >> $output | |
707 echo "<tr><td>The alignment info on the unmatched sequences</td><td><a href='unmatched.txt' download='unmatched.txt' >Download</a></td></tr>" >> $output | |
708 | |
709 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>SHM Overview</td></tr>" >> $output | |
710 echo "<tr><td>The SHM Overview table as a dataset</td><td><a href='shm_overview.txt' download='shm_overview.txt' >Download</a></td></tr>" >> $output | |
711 echo "<tr><td>Motif data per sequence ID</td><td><a href='motif_per_seq.txt' download='motif_per_seq.txt' >Download</a></td></tr>" >> $output | |
712 echo "<tr><td>Mutation data per sequence ID</td><td><a href='mutation_by_id.txt' download='mutation_by_id.txt' >Download</a></td></tr>" >> $output | |
713 echo "<tr><td>Base count for every sequence</td><td><a href='base_overview.html'>View</a></td></tr>" >> $output | |
714 echo "<tr><td>The data used to generate the percentage of mutations in AID and pol eta motives plot</td><td><a href='aid_motives.txt' download='aid_motives.txt' >Download</a></td></tr>" >> $output | |
715 echo "<tr><td>The data used to generate the relative mutation patterns plot</td><td><a href='relative_mutations.txt' download='relative_mutations.txt' >Download</a></td></tr>" >> $output | |
716 echo "<tr><td>The data used to generate the absolute mutation patterns plot</td><td><a href='absolute_mutations.txt' download='absolute_mutations.txt' >Download</a></td></tr>" >> $output | |
717 echo "<tr><td>Data about tandem mutations by ID</td><td><a href='tandems_by_id.txt' download='tandems_by_id.txt' >Download</a></td></tr>" >> $output | |
718 | |
719 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>SHM Frequency</td></tr>" >> $output | |
720 echo "<tr><td>The data generate the frequency scatter plot</td><td><a href='scatter.txt' download='scatter.txt' >Download</a></td></tr>" >> $output | |
721 echo "<tr><td>The data used to generate the frequency by class plot</td><td><a href='frequency_ranges_classes.txt' download='frequency_ranges_classes.txt' >Download</a></td></tr>" >> $output | |
722 echo "<tr><td>The data for frequency by subclass</td><td><a href='frequency_ranges_subclasses.txt' download='frequency_ranges_subclasses.txt' >Download</a></td></tr>" >> $output | |
723 | |
724 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>Transition Tables</td></tr>" >> $output | |
725 echo "<tr><td>The data for the 'all' transition plot</td><td><a href='transitions_all_sum.txt' download='transitions_all_sum.txt' >Download</a></td></tr>" >> $output | |
726 echo "<tr><td>The data for the 'IGA' transition plot</td><td><a href='transitions_IGA_sum.txt' download='transitions_IGA_sum.txt' >Download</a></td></tr>" >> $output | |
727 echo "<tr><td>The data for the 'IGA1' transition plot</td><td><a href='transitions_IGA1_sum.txt' download='transitions_IGA1_sum.txt' >Download</a></td></tr>" >> $output | |
728 echo "<tr><td>The data for the 'IGA2' transition plot</td><td><a href='transitions_IGA2_sum.txt' download='transitions_IGA2_sum.txt' >Download</a></td></tr>" >> $output | |
729 echo "<tr><td>The data for the 'IGG' transition plot</td><td><a href='transitions_IGG_sum.txt' download='transitions_IGG_sum.txt' >Download</a></td></tr>" >> $output | |
730 echo "<tr><td>The data for the 'IGG1' transition plot</td><td><a href='transitions_IGG1_sum.txt' download='transitions_IGG1_sum.txt' >Download</a></td></tr>" >> $output | |
731 echo "<tr><td>The data for the 'IGG2' transition plot</td><td><a href='transitions_IGG2_sum.txt' download='transitions_IGG2_sum.txt' >Download</a></td></tr>" >> $output | |
732 echo "<tr><td>The data for the 'IGG3' transition plot</td><td><a href='transitions_IGG3_sum.txt' download='transitions_IGG3_sum.txt' >Download</a></td></tr>" >> $output | |
733 echo "<tr><td>The data for the 'IGG4' transition plot</td><td><a href='transitions_IGG4_sum.txt' download='transitions_IGG4_sum.txt' >Download</a></td></tr>" >> $output | |
734 echo "<tr><td>The data for the 'IGM' transition plot</td><td><a href='transitions_IGM_sum.txt' download='transitions_IGM_sum.txt' >Download</a></td></tr>" >> $output | |
735 echo "<tr><td>The data for the 'IGE' transition plot</td><td><a href='transitions_IGE_sum.txt' download='transitions_IGE_sum.txt' >Download</a></td></tr>" >> $output | |
736 | |
737 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>Antigen Selection</td></tr>" >> $output | |
738 echo "<tr><td>AA mutation data per sequence ID</td><td><a href='aa_id_mutations.txt' download='aa_id_mutations.txt' >Download</a></td></tr>" >> $output | |
739 echo "<tr><td>Presence of AA per sequence ID</td><td><a href='absent_aa_id.txt' download='absent_aa_id.txt' >Download</a></td></tr>" >> $output | |
740 | |
741 echo "<tr><td>The data used to generate the aa mutation frequency plot</td><td><a href='aa_histogram_sum.txt' download='aa_histogram_sum.txt' >Download</a></td></tr>" >> $output | |
742 echo "<tr><td>The data used to generate the aa mutation frequency plot for IGA</td><td><a href='aa_histogram_sum_IGA.txt' download='aa_histogram_sum_IGA.txt' >Download</a></td></tr>" >> $output | |
743 echo "<tr><td>The data used to generate the aa mutation frequency plot for IGG</td><td><a href='aa_histogram_sum_IGG.txt' download='aa_histogram_sum_IGG.txt' >Download</a></td></tr>" >> $output | |
744 echo "<tr><td>The data used to generate the aa mutation frequency plot for IGM</td><td><a href='aa_histogram_sum_IGM.txt' download='aa_histogram_sum_IGM.txt' >Download</a></td></tr>" >> $output | |
745 echo "<tr><td>The data used to generate the aa mutation frequency plot for IGE</td><td><a href='aa_histogram_sum_IGE.txt' download='aa_histogram_sum_IGE.txt' >Download</a></td></tr>" >> $output | |
746 | |
747 echo "<tr><td>Baseline PDF (<a href='http://selection.med.yale.edu/baseline/'>http://selection.med.yale.edu/baseline/</a>)</td><td><a href='baseline.pdf' download='baseline.pdf' >Download</a></td></tr>" >> $output | |
748 echo "<tr><td>Baseline data</td><td><a href='baseline.txt' download='baseline.txt' >Download</a></td></tr>" >> $output | |
749 echo "<tr><td>Baseline IGA PDF</td><td><a href='baseline_IGA.pdf' download='baseline_IGA.pdf' >Download</a></td></tr>" >> $output | |
750 echo "<tr><td>Baseline IGA data</td><td><a href='baseline_IGA.txt' download='baseline_IGA.txt' >Download</a></td></tr>" >> $output | |
751 echo "<tr><td>Baseline IGG PDF</td><td><a href='baseline_IGG.pdf' download='baseline_IGG.pdf' >Download</a></td></tr>" >> $output | |
752 echo "<tr><td>Baseline IGG data</td><td><a href='baseline_IGG.txt' download='baseline_IGG.txt' >Download</a></td></tr>" >> $output | |
753 echo "<tr><td>Baseline IGM PDF</td><td><a href='baseline_IGM.pdf' download='baseline_IGM.pdf' >Download</a></td></tr>" >> $output | |
754 echo "<tr><td>Baseline IGM data</td><td><a href='baseline_IGM.txt' download='baseline_IGM.txt' >Download</a></td></tr>" >> $output | |
755 echo "<tr><td>Baseline IGE PDF</td><td><a href='baseline_IGE.pdf' download='baseline_IGE.pdf' >Download</a></td></tr>" >> $output | |
756 echo "<tr><td>Baseline IGE data</td><td><a href='baseline_IGE.txt' download='baseline_IGE.txt' >Download</a></td></tr>" >> $output | |
757 | |
758 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>CSR</td></tr>" >> $output | |
759 echo "<tr><td>The data for the IGA subclass distribution plot</td><td><a href='IGA_pie.txt' download='IGA_pie.txt' >Download</a></td></tr>" >> $output | |
760 echo "<tr><td>The data for the IGG subclass distribution plot</td><td><a href='IGG_pie.txt' download='IGG_pie.txt' >Download</a></td></tr>" >> $output | |
761 | |
762 | |
763 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>Clonal Relation</td></tr>" >> $output | |
764 echo "<tr><td>Sequence overlap between subclasses</td><td><a href='sequence_overview/index.html'>View</a></td></tr>" >> $output | |
765 echo "<tr><td>The Change-O DB file with defined clones and subclass annotation</td><td><a href='change_o/change-o-db-defined_clones.txt' download='change_o/change-o-db-defined_clones.txt' >Download</a></td></tr>" >> $output | |
766 echo "<tr><td>The Change-O DB defined clones summary file</td><td><a href='change_o/change-o-defined_clones-summary.txt' download='change_o/change-o-defined_clones-summary.txt' >Download</a></td></tr>" >> $output | |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
767 echo "<tr><td>An IMGT archive with just just the first sequence of a clone</td><td><a href='${NEW_IMGT_PREFIX}_first_seq_of_clone.txz' download='${NEW_IMGT_PREFIX}_first_seq_of_clone.txz' >Download</a></td></tr>" >> $output |
81 | 768 |
769 echo "<tr><td>The Change-O DB file with defined clones of IGA</td><td><a href='change_o/change-o-db-defined_clones-IGA.txt' download='change_o/change-o-db-defined_clones-IGA.txt' >Download</a></td></tr>" >> $output | |
770 echo "<tr><td>The Change-O DB defined clones summary file of IGA</td><td><a href='change_o/change-o-defined_clones-summary-IGA.txt' download='change_o/change-o-defined_clones-summary-IGA.txt' >Download</a></td></tr>" >> $output | |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
771 echo "<tr><td>An IMGT archive with just just the first sequence of a clone (IGA)</td><td><a href='${NEW_IMGT_PREFIX}_IGA_first_seq_of_clone.txz' download='${NEW_IMGT_PREFIX}_IGA_first_seq_of_clone.txz' >Download</a></td></tr>" >> $output |
81 | 772 |
773 echo "<tr><td>The Change-O DB file with defined clones of IGG</td><td><a href='change_o/change-o-db-defined_clones-IGG.txt' download='change_o/change-o-db-defined_clones-IGG.txt' >Download</a></td></tr>" >> $output | |
774 echo "<tr><td>The Change-O DB defined clones summary file of IGG</td><td><a href='change_o/change-o-defined_clones-summary-IGG.txt' download='change_o/change-o-defined_clones-summary-IGG.txt' >Download</a></td></tr>" >> $output | |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
775 echo "<tr><td>An IMGT archive with just just the first sequence of a clone (IGG)</td><td><a href='${NEW_IMGT_PREFIX}_IGG_first_seq_of_clone.txz' download='${NEW_IMGT_PREFIX}_IGG_first_seq_of_clone.txz' >Download</a></td></tr>" >> $output |
81 | 776 |
777 echo "<tr><td>The Change-O DB file with defined clones of IGM</td><td><a href='change_o/change-o-db-defined_clones-IGM.txt' download='change_o/change-o-db-defined_clones-IGM.txt' >Download</a></td></tr>" >> $output | |
778 echo "<tr><td>The Change-O DB defined clones summary file of IGM</td><td><a href='change_o/change-o-defined_clones-summary-IGM.txt' download='change_o/change-o-defined_clones-summary-IGM.txt' >Download</a></td></tr>" >> $output | |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
779 echo "<tr><td>An IMGT archive with just just the first sequence of a clone (IGM)</td><td><a href='${NEW_IMGT_PREFIX}_IGM_first_seq_of_clone.txz' download='${NEW_IMGT_PREFIX}_IGM_first_seq_of_clone.txz' >Download</a></td></tr>" >> $output |
81 | 780 |
781 echo "<tr><td>The Change-O DB file with defined clones of IGE</td><td><a href='change_o/change-o-db-defined_clones-IGE.txt' download='change_o/change-o-db-defined_clones-IGE.txt' >Download</a></td></tr>" >> $output | |
782 echo "<tr><td>The Change-O DB defined clones summary file of IGE</td><td><a href='change_o/change-o-defined_clones-summary-IGE.txt' download='change_o/change-o-defined_clones-summary-IGE.txt' >Download</a></td></tr>" >> $output | |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
783 echo "<tr><td>An IMGT archive with just just the first sequence of a clone (IGE)</td><td><a href='${NEW_IMGT_PREFIX}_IGE_first_seq_of_clone.txz' download='${NEW_IMGT_PREFIX}_IGE_first_seq_of_clone.txz' >Download</a></td></tr>" >> $output |
81 | 784 |
785 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>Filtered IMGT output files</td></tr>" >> $output | |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
786 echo "<tr><td>An IMGT archive with just the matched and filtered sequences</td><td><a href='${NEW_IMGT_PREFIX}.txz' download='${NEW_IMGT_PREFIX}.txz' >Download</a></td></tr>" >> $output |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
787 echo "<tr><td>An IMGT archive with just the matched and filtered IGA sequences</td><td><a href='${NEW_IMGT_PREFIX}_IGA.txz' download='${NEW_IMGT_PREFIX}_IGA.txz' >Download</a></td></tr>" >> $output |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
788 echo "<tr><td>An IMGT archive with just the matched and filtered IGA1 sequences</td><td><a href='${NEW_IMGT_PREFIX}_IGA1.txz' download='${NEW_IMGT_PREFIX}_IGA1.txz' >Download</a></td></tr>" >> $output |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
789 echo "<tr><td>An IMGT archive with just the matched and filtered IGA2 sequences</td><td><a href='${NEW_IMGT_PREFIX}_IGA2.txz' download='${NEW_IMGT_PREFIX}_IGA2.txz' >Download</a></td></tr>" >> $output |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
790 echo "<tr><td>An IMGT archive with just the matched and filtered IGG sequences</td><td><a href='${NEW_IMGT_PREFIX}_IGG.txz' download='${NEW_IMGT_PREFIX}_IGG.txz' >Download</a></td></tr>" >> $output |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
791 echo "<tr><td>An IMGT archive with just the matched and filtered IGG1 sequences</td><td><a href='${NEW_IMGT_PREFIX}_IGG1.txz' download='${NEW_IMGT_PREFIX}_IGG1.txz' >Download</a></td></tr>" >> $output |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
792 echo "<tr><td>An IMGT archive with just the matched and filtered IGG2 sequences</td><td><a href='${NEW_IMGT_PREFIX}_IGG2.txz' download='${NEW_IMGT_PREFIX}_IGG2.txz' >Download</a></td></tr>" >> $output |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
793 echo "<tr><td>An IMGT archive with just the matched and filtered IGG3 sequences</td><td><a href='${NEW_IMGT_PREFIX}_IGG3.txz' download='${NEW_IMGT_PREFIX}_IGG3.txz' >Download</a></td></tr>" >> $output |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
794 echo "<tr><td>An IMGT archive with just the matched and filtered IGG4 sequences</td><td><a href='${NEW_IMGT_PREFIX}_IGG4.txz' download='${NEW_IMGT_PREFIX}_IGG4.txz' >Download</a></td></tr>" >> $output |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
795 echo "<tr><td>An IMGT archive with just the matched and filtered IGM sequences</td><td><a href='${NEW_IMGT_PREFIX}_IGM.txz' download='${NEW_IMGT_PREFIX}_IGM.txz' >Download</a></td></tr>" >> $output |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
796 echo "<tr><td>An IMGT archive with just the matched and filtered IGE sequences</td><td><a href='${NEW_IMGT_PREFIX}_IGE.txz' download='${NEW_IMGT_PREFIX}_IGE.txz' >Download</a></td></tr>" >> $output |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
797 echo "<tr><td>An IMGT archive with just the matched and filtered naive IGM sequences (mutations below 2%)</td><td><a href='${NEW_IMGT_PREFIX}_IGM_NAIVE.txz' download='${NEW_IMGT_PREFIX}_IGM_NAIVE.txz' >Download</a></td></tr>" >> $output |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
798 echo "<tr><td>An IMGT archive with just the matched and filtered naive memory IGM sequences (mutations 2% or higher)</td><td><a href='${NEW_IMGT_PREFIX}_IGM_NAIVE_MEMORY.txz' download='${NEW_IMGT_PREFIX}_IGM_NAIVE_MEMORY.txz' >Download</a></td></tr>" >> $output |
81 | 799 echo "</table>" >> $output |
800 | |
801 echo "<br />" >> $output | |
802 cat $dir/shm_downloads.htm >> $output | |
803 | |
804 echo "</div>" >> $output #downloads tab end | |
805 | |
806 echo "</div>" >> $output #tabs end | |
807 | |
808 echo "</html>" >> $output | |
809 | |
810 | |
811 echo "---------------- naive_output.r ----------------" | |
812 echo "---------------- naive_output.r ----------------<br />" >> $log | |
813 | |
814 if [[ "$naive_output" == "yes" ]] | |
815 then | |
816 echo "output naive output" | |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
817 if [[ "${class_filter}" == "101_101_all" ]] |
81 | 818 then |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
819 echo "copy ${NEW_IMGT_PREFIX}.txz to ${naive_output_all}" |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
820 cp $outdir/${NEW_IMGT_PREFIX}.txz ${naive_output_all} |
81 | 821 else |
822 echo "copy for classes" | |
93
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
823 cp $outdir/${NEW_IMGT_PREFIX}_IGA.txz ${naive_output_ca} |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
824 cp $outdir/${NEW_IMGT_PREFIX}_IGG.txz ${naive_output_cg} |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
825 cp $outdir/${NEW_IMGT_PREFIX}_IGM.txz ${naive_output_cm} |
8fcf31272f6e
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
rhpvorderman
parents:
92
diff
changeset
|
826 cp $outdir/${NEW_IMGT_PREFIX}_IGE.txz ${naive_output_ce} |
94
84e9e5c8c101
"planemo upload commit d4be85014b638f1d50b318d4b735be7f6e973140"
rhpvorderman
parents:
93
diff
changeset
|
827 cp $outdir/${NEW_IMGT_PREFIX}_IGM_NAIVE.txz ${naive_output_igm_naive} |
84e9e5c8c101
"planemo upload commit d4be85014b638f1d50b318d4b735be7f6e973140"
rhpvorderman
parents:
93
diff
changeset
|
828 cp $outdir/${NEW_IMGT_PREFIX}_IGM_NAIVE_MEMORY.txz ${naive_output_igm_naive_memory} |
81 | 829 fi |
830 fi | |
831 | |
832 echo "</table>" >> $outdir/base_overview.html | |
833 | |
834 mv $log $outdir/log.html | |
835 | |
836 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 />" > $log | |
837 echo "<table border = 1>" >> $log | |
838 echo "<thead><tr><th>Info</th><th>Sequences</th><th>Percentage</th></tr></thead>" >> $log | |
839 tIFS="$TMP" | |
840 IFS=$'\t' | |
841 while read step seq perc | |
842 do | |
843 echo "<tr>" >> $log | |
844 echo "<td>$step</td>" >> $log | |
845 echo "<td>$seq</td>" >> $log | |
846 echo "<td>${perc}%</td>" >> $log | |
847 echo "</tr>" >> $log | |
848 done < $outdir/filtering_steps.txt | |
849 echo "</table>" >> $log | |
850 echo "<br />" >> $log | |
851 cat $dir/shm_first.htm >> $log | |
852 echo "</center></html>" >> $log | |
853 | |
854 IFS="$tIFS" | |
855 | |
84
4db34e32dd47
"planemo upload commit 78ace939ed7437b8b360588032449a99aad949eb"
rhpvorderman
parents:
83
diff
changeset
|
856 echo "---------------- remove_files----------------" |
4db34e32dd47
"planemo upload commit 78ace939ed7437b8b360588032449a99aad949eb"
rhpvorderman
parents:
83
diff
changeset
|
857 echo "---------------- remove_files----------------<br />" >> $log |
4db34e32dd47
"planemo upload commit 78ace939ed7437b8b360588032449a99aad949eb"
rhpvorderman
parents:
83
diff
changeset
|
858 |
90
6809c63d9161
"planemo upload commit fd64827ff6e63df008f6f50ddb8576ad2b1dbb26"
rhpvorderman
parents:
89
diff
changeset
|
859 rm -r -v -f $outdir/baseline |
6809c63d9161
"planemo upload commit fd64827ff6e63df008f6f50ddb8576ad2b1dbb26"
rhpvorderman
parents:
89
diff
changeset
|
860 rm -r -v -f $PWD/files |
6809c63d9161
"planemo upload commit fd64827ff6e63df008f6f50ddb8576ad2b1dbb26"
rhpvorderman
parents:
89
diff
changeset
|
861 rm -v $PWD/aa.txt |
6809c63d9161
"planemo upload commit fd64827ff6e63df008f6f50ddb8576ad2b1dbb26"
rhpvorderman
parents:
89
diff
changeset
|
862 rm -v $PWD/aa_change_stats.txt |
6809c63d9161
"planemo upload commit fd64827ff6e63df008f6f50ddb8576ad2b1dbb26"
rhpvorderman
parents:
89
diff
changeset
|
863 rm -v $PWD/gapped_aa.txt |
6809c63d9161
"planemo upload commit fd64827ff6e63df008f6f50ddb8576ad2b1dbb26"
rhpvorderman
parents:
89
diff
changeset
|
864 rm -v $PWD/gapped_nt.txt |
6809c63d9161
"planemo upload commit fd64827ff6e63df008f6f50ddb8576ad2b1dbb26"
rhpvorderman
parents:
89
diff
changeset
|
865 rm -v $PWD/hotspots.txt |
6809c63d9161
"planemo upload commit fd64827ff6e63df008f6f50ddb8576ad2b1dbb26"
rhpvorderman
parents:
89
diff
changeset
|
866 rm -v $PWD/junction.txt |
6809c63d9161
"planemo upload commit fd64827ff6e63df008f6f50ddb8576ad2b1dbb26"
rhpvorderman
parents:
89
diff
changeset
|
867 rm -v $PWD/mutationanalysis.txt |
6809c63d9161
"planemo upload commit fd64827ff6e63df008f6f50ddb8576ad2b1dbb26"
rhpvorderman
parents:
89
diff
changeset
|
868 rm -v $PWD/mutationstats.txt |
6809c63d9161
"planemo upload commit fd64827ff6e63df008f6f50ddb8576ad2b1dbb26"
rhpvorderman
parents:
89
diff
changeset
|
869 rm -v $PWD/sequences.txt |
6809c63d9161
"planemo upload commit fd64827ff6e63df008f6f50ddb8576ad2b1dbb26"
rhpvorderman
parents:
89
diff
changeset
|
870 rm -v $PWD/summary.txt |
6809c63d9161
"planemo upload commit fd64827ff6e63df008f6f50ddb8576ad2b1dbb26"
rhpvorderman
parents:
89
diff
changeset
|
871 rm -v $PWD/Rplots.pdf |
6809c63d9161
"planemo upload commit fd64827ff6e63df008f6f50ddb8576ad2b1dbb26"
rhpvorderman
parents:
89
diff
changeset
|
872 |
6809c63d9161
"planemo upload commit fd64827ff6e63df008f6f50ddb8576ad2b1dbb26"
rhpvorderman
parents:
89
diff
changeset
|
873 filename="$dir/remove_files.txt" |
84
4db34e32dd47
"planemo upload commit 78ace939ed7437b8b360588032449a99aad949eb"
rhpvorderman
parents:
83
diff
changeset
|
874 |
4db34e32dd47
"planemo upload commit 78ace939ed7437b8b360588032449a99aad949eb"
rhpvorderman
parents:
83
diff
changeset
|
875 while read file; do |
90
6809c63d9161
"planemo upload commit fd64827ff6e63df008f6f50ddb8576ad2b1dbb26"
rhpvorderman
parents:
89
diff
changeset
|
876 rm -v -f $outdir/$file |
84
4db34e32dd47
"planemo upload commit 78ace939ed7437b8b360588032449a99aad949eb"
rhpvorderman
parents:
83
diff
changeset
|
877 done < "$filename" |
4db34e32dd47
"planemo upload commit 78ace939ed7437b8b360588032449a99aad949eb"
rhpvorderman
parents:
83
diff
changeset
|
878 |
81 | 879 echo "---------------- Done! ----------------" |
880 echo "---------------- Done! ----------------<br />" >> $outdir/log.html | |
881 | |
882 | |
883 | |
884 | |
885 | |
886 |