annotate wrapper.sh @ 41:b8ac74723ab0 draft

Uploaded
author davidvanzessen
date Tue, 14 Mar 2017 09:30:16 -0400
parents ca2512e1e3ab
children 1cf60ae234b4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
1 #!/bin/bash
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
2 #set -e
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
3 dir="$(cd "$(dirname "$0")" && pwd)"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
4 input=$1
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
5 method=$2
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
6 log=$3 #becomes the main html page at the end
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
7 outdir=$4
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
8 output="$outdir/index.html" #copied to $log location at the end
34
96c1276ceefe Uploaded
davidvanzessen
parents: 33
diff changeset
9 title="$5"
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
10 include_fr1=$6
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
11 functionality=$7
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
12 unique=$8
28
c0ecc31829bd Uploaded
davidvanzessen
parents: 26
diff changeset
13 naive_output=$9
c0ecc31829bd Uploaded
davidvanzessen
parents: 26
diff changeset
14 naive_output_ca=${10}
c0ecc31829bd Uploaded
davidvanzessen
parents: 26
diff changeset
15 naive_output_cg=${11}
c0ecc31829bd Uploaded
davidvanzessen
parents: 26
diff changeset
16 naive_output_cm=${12}
c0ecc31829bd Uploaded
davidvanzessen
parents: 26
diff changeset
17 naive_output_ce=${13}
c0ecc31829bd Uploaded
davidvanzessen
parents: 26
diff changeset
18 naive_output_all=${14}
c0ecc31829bd Uploaded
davidvanzessen
parents: 26
diff changeset
19 filter_unique=${15}
c0ecc31829bd Uploaded
davidvanzessen
parents: 26
diff changeset
20 class_filter=${16}
c0ecc31829bd Uploaded
davidvanzessen
parents: 26
diff changeset
21 empty_region_filter=${17}
c0ecc31829bd Uploaded
davidvanzessen
parents: 26
diff changeset
22 fast=${18}
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
23 mkdir $outdir
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
24
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
25 tar -xzf $dir/style.tar.gz -C $outdir
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
26
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
27 echo "---------------- read parameters ----------------"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
28 echo "---------------- read parameters ----------------<br />" > $log
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
29
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
30 echo "unpacking IMGT file"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
31
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
32 type="`file $input`"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
33 if [[ "$type" == *"Zip archive"* ]] ; then
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
34 echo "Zip archive"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
35 echo "unzip $input -d $PWD/files/"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
36 unzip $input -d $PWD/files/
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
37 elif [[ "$type" == *"XZ compressed data"* ]] ; then
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
38 echo "ZX archive"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
39 echo "tar -xJf $input -C $PWD/files/"
34
96c1276ceefe Uploaded
davidvanzessen
parents: 33
diff changeset
40 mkdir -p "$PWD/files/$title"
96c1276ceefe Uploaded
davidvanzessen
parents: 33
diff changeset
41 tar -xJf $input -C "$PWD/files/$title"
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
42 fi
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
43
35
744e5e2e3556 Uploaded
davidvanzessen
parents: 34
diff changeset
44 cat "`find $PWD/files/ -name "1_*"`" > $PWD/summary.txt
744e5e2e3556 Uploaded
davidvanzessen
parents: 34
diff changeset
45 cat "`find $PWD/files/ -name "3_*"`" > $PWD/sequences.txt
40
ca2512e1e3ab Uploaded
davidvanzessen
parents: 39
diff changeset
46 cat "`find $PWD/files/ -name "4_*"`" > $PWD/gapped_aa.txt
35
744e5e2e3556 Uploaded
davidvanzessen
parents: 34
diff changeset
47 cat "`find $PWD/files/ -name "5_*"`" > $PWD/aa.txt
744e5e2e3556 Uploaded
davidvanzessen
parents: 34
diff changeset
48 cat "`find $PWD/files/ -name "6_*"`" > $PWD/junction.txt
744e5e2e3556 Uploaded
davidvanzessen
parents: 34
diff changeset
49 cat "`find $PWD/files/ -name "7_*"`" > $PWD/mutationanalysis.txt
744e5e2e3556 Uploaded
davidvanzessen
parents: 34
diff changeset
50 cat "`find $PWD/files/ -name "8_*"`" > $PWD/mutationstats.txt
744e5e2e3556 Uploaded
davidvanzessen
parents: 34
diff changeset
51 cat "`find $PWD/files/ -name "10_*"`" > $PWD/hotspots.txt
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
52
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
53 if [[ ${#BLASTN_DIR} -ge 5 ]] ; then
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
54 echo "On server, using BLASTN_DIR env: ${BLASTN_DIR}"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
55 else
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
56 BLASTN_DIR="/home/galaxy/Downloads/ncbi-blast-2.4.0+/bin"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
57 echo "Dev Galaxy set BLASTN_DIR to: ${BLASTN_DIR}"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
58 fi
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
59
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
60 echo "---------------- class identification ----------------"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
61 echo "---------------- class identification ----------------<br />" >> $log
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
62
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
63 python $dir/gene_identification.py --input $PWD/summary.txt --output $outdir/identified_genes.txt
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
64
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
65 echo "---------------- merge_and_filter.r ----------------"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
66 echo "---------------- merge_and_filter.r ----------------<br />" >> $log
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
67
40
ca2512e1e3ab Uploaded
davidvanzessen
parents: 39
diff changeset
68 Rscript $dir/merge_and_filter.r $PWD/summary.txt $PWD/sequences.txt $PWD/mutationanalysis.txt $PWD/mutationstats.txt $PWD/hotspots.txt "$PWD/gapped_aa.txt" $outdir/identified_genes.txt $outdir/merged.txt $outdir/before_unique_filter.txt $outdir/unmatched.txt $method $functionality $unique ${filter_unique} ${class_filter} ${empty_region_filter} 2>&1
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
69
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
70 if [[ "$fast" == "no" ]] ; then
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
71
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
72 echo "---------------- creating new IMGT zips ----------------"
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
73 echo "---------------- creating new IMGT zips ----------------<br />" >> $log
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
74
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
75 mkdir $outdir/new_IMGT
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
76
36
43d182135230 Uploaded
davidvanzessen
parents: 35
diff changeset
77 cat "`find $PWD/files/ -name "1_*"`" > "$outdir/new_IMGT/1_Summary.txt"
43d182135230 Uploaded
davidvanzessen
parents: 35
diff changeset
78 cat "`find $PWD/files/ -name "2_*"`" > "$outdir/new_IMGT/2_IMGT-gapped-nt-sequences.txt"
43d182135230 Uploaded
davidvanzessen
parents: 35
diff changeset
79 cat "`find $PWD/files/ -name "3_*"`" > "$outdir/new_IMGT/3_Nt-sequences.txt"
43d182135230 Uploaded
davidvanzessen
parents: 35
diff changeset
80 cat "`find $PWD/files/ -name "4_*"`" > "$outdir/new_IMGT/4_IMGT-gapped-AA-sequences.txt"
43d182135230 Uploaded
davidvanzessen
parents: 35
diff changeset
81 cat "`find $PWD/files/ -name "5_*"`" > "$outdir/new_IMGT/5_AA-sequences.txt"
43d182135230 Uploaded
davidvanzessen
parents: 35
diff changeset
82 cat "`find $PWD/files/ -name "6_*"`" > "$outdir/new_IMGT/6_Junction.txt"
43d182135230 Uploaded
davidvanzessen
parents: 35
diff changeset
83 cat "`find $PWD/files/ -name "7_*"`" > "$outdir/new_IMGT/7_V-REGION-mutation-and-AA-change-table.txt"
43d182135230 Uploaded
davidvanzessen
parents: 35
diff changeset
84 cat "`find $PWD/files/ -name "8_*"`" > "$outdir/new_IMGT/8_V-REGION-nt-mutation-statistics.txt"
43d182135230 Uploaded
davidvanzessen
parents: 35
diff changeset
85 cat "`find $PWD/files/ -name "9_*"`" > "$outdir/new_IMGT/9_V-REGION-AA-change-statistics.txt"
43d182135230 Uploaded
davidvanzessen
parents: 35
diff changeset
86 cat "`find $PWD/files/ -name "10_*"`" > "$outdir/new_IMGT/10_V-REGION-mutation-hotspots.txt"
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
87
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
88 mkdir $outdir/new_IMGT_IGA
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
89 cp $outdir/new_IMGT/* $outdir/new_IMGT_IGA
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
90
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
91 mkdir $outdir/new_IMGT_IGA1
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
92 cp $outdir/new_IMGT/* $outdir/new_IMGT_IGA1
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
93
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
94 mkdir $outdir/new_IMGT_IGA2
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
95 cp $outdir/new_IMGT/* $outdir/new_IMGT_IGA2
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
96
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
97 mkdir $outdir/new_IMGT_IGG
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
98 cp $outdir/new_IMGT/* $outdir/new_IMGT_IGG
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
99
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
100 mkdir $outdir/new_IMGT_IGG1
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
101 cp $outdir/new_IMGT/* $outdir/new_IMGT_IGG1
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
102
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
103 mkdir $outdir/new_IMGT_IGG2
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
104 cp $outdir/new_IMGT/* $outdir/new_IMGT_IGG2
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
105
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
106 mkdir $outdir/new_IMGT_IGG3
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
107 cp $outdir/new_IMGT/* $outdir/new_IMGT_IGG3
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
108
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
109 mkdir $outdir/new_IMGT_IGG4
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
110 cp $outdir/new_IMGT/* $outdir/new_IMGT_IGG4
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
111
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
112 mkdir $outdir/new_IMGT_IGM
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
113 cp $outdir/new_IMGT/* $outdir/new_IMGT_IGM
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
114
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
115 mkdir $outdir/new_IMGT_IGE
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
116 cp $outdir/new_IMGT/* $outdir/new_IMGT_IGE
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
117
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
118 Rscript $dir/new_imgt.r $outdir/new_IMGT/ $outdir/merged.txt "-" 2>&1
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
119
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
120 Rscript $dir/new_imgt.r $outdir/new_IMGT_IGA/ $outdir/merged.txt "IGA" 2>&1
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
121 Rscript $dir/new_imgt.r $outdir/new_IMGT_IGA1/ $outdir/merged.txt "IGA1" 2>&1
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
122 Rscript $dir/new_imgt.r $outdir/new_IMGT_IGA2/ $outdir/merged.txt "IGA2" 2>&1
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
123
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
124 Rscript $dir/new_imgt.r $outdir/new_IMGT_IGG/ $outdir/merged.txt "IGG" 2>&1
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
125 Rscript $dir/new_imgt.r $outdir/new_IMGT_IGG1/ $outdir/merged.txt "IGG1" 2>&1
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
126 Rscript $dir/new_imgt.r $outdir/new_IMGT_IGG2/ $outdir/merged.txt "IGG2" 2>&1
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
127 Rscript $dir/new_imgt.r $outdir/new_IMGT_IGG3/ $outdir/merged.txt "IGG3" 2>&1
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
128 Rscript $dir/new_imgt.r $outdir/new_IMGT_IGG4/ $outdir/merged.txt "IGG4" 2>&1
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
129
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
130 Rscript $dir/new_imgt.r $outdir/new_IMGT_IGM/ $outdir/merged.txt "IGM" 2>&1
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
131
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
132 Rscript $dir/new_imgt.r $outdir/new_IMGT_IGE/ $outdir/merged.txt "IGE" 2>&1
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
133
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
134
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
135 tmp="$PWD"
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
136 cd $outdir/new_IMGT/ #tar weirdness...
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
137 tar -cJf ../new_IMGT.txz *
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
138
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
139 cd $outdir/new_IMGT_IGA/
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
140 tar -cJf ../new_IMGT_IGA.txz *
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
141
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
142 cd $outdir/new_IMGT_IGA1/
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
143 tar -cJf ../new_IMGT_IGA1.txz *
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
144
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
145 cd $outdir/new_IMGT_IGA2/
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
146 tar -cJf ../new_IMGT_IGA2.txz *
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
147
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
148 cd $outdir/new_IMGT_IGG/
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
149 tar -cJf ../new_IMGT_IGG.txz *
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
150
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
151 cd $outdir/new_IMGT_IGG1/
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
152 tar -cJf ../new_IMGT_IGG1.txz *
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
153
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
154 cd $outdir/new_IMGT_IGG2/
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
155 tar -cJf ../new_IMGT_IGG2.txz *
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
156
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
157 cd $outdir/new_IMGT_IGG3/
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
158 tar -cJf ../new_IMGT_IGG3.txz *
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
159
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
160 cd $outdir/new_IMGT_IGG4/
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
161 tar -cJf ../new_IMGT_IGG4.txz *
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
162
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
163 cd $outdir/new_IMGT_IGM/
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
164 tar -cJf ../new_IMGT_IGM.txz *
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
165
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
166 cd $outdir/new_IMGT_IGE/
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
167 tar -cJf ../new_IMGT_IGE.txz *
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
168
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
169 cd $tmp
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
170 fi
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
171
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
172 echo "---------------- shm_csr.r ----------------"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
173 echo "---------------- shm_csr.r ----------------<br />" >> $log
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
174
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
175 classes="IGA,IGA1,IGA2,IGG,IGG1,IGG2,IGG3,IGG4,IGM,IGE,unmatched"
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
176 echo "R mutation analysis"
1
faae21ba5c63 Uploaded
davidvanzessen
parents: 0
diff changeset
177 Rscript $dir/shm_csr.r $outdir/merged.txt $classes $outdir ${empty_region_filter} 2>&1
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
178
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
179 echo "---------------- shm_csr.py ----------------"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
180 echo "---------------- shm_csr.py ----------------<br />" >> $log
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
181
1
faae21ba5c63 Uploaded
davidvanzessen
parents: 0
diff changeset
182 python $dir/shm_csr.py --input $outdir/merged.txt --genes $classes --empty_region_filter "${empty_region_filter}" --output $outdir/hotspot_analysis.txt
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
183
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
184 echo "---------------- aa_histogram.r ----------------"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
185 echo "---------------- aa_histogram.r ----------------<br />" >> $log
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
186
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
187 Rscript $dir/aa_histogram.r $outdir/aa_id_mutations.txt $outdir/absent_aa_id.txt "IGA,IGG,IGM,IGE" $outdir/ 2>&1
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
188 if [ -e "$outdir/aa_histogram_.png" ]; then
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
189 mv $outdir/aa_histogram_.png $outdir/aa_histogram.png
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
190 mv $outdir/aa_histogram_.txt $outdir/aa_histogram.txt
29
80c4eebf7bc9 Uploaded
davidvanzessen
parents: 28
diff changeset
191 mv $outdir/aa_histogram_absent_.txt $outdir/aa_histogram_absent.txt
80c4eebf7bc9 Uploaded
davidvanzessen
parents: 28
diff changeset
192 mv $outdir/aa_histogram_count_.txt $outdir/aa_histogram_count.txt
80c4eebf7bc9 Uploaded
davidvanzessen
parents: 28
diff changeset
193 mv $outdir/aa_histogram_sum_.txt $outdir/aa_histogram_sum.txt
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
194 fi
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
195
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
196 genes=(IGA IGA1 IGA2 IGG IGG1 IGG2 IGG3 IGG4 IGM IGE)
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
197
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
198 funcs=(sum mean median)
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
199 funcs=(sum)
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
200
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
201 echo "---------------- sequence_overview.r ----------------"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
202 echo "---------------- sequence_overview.r ----------------<br />" >> $log
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
203
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
204 mkdir $outdir/sequence_overview
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
205
7
ad9be244b104 Uploaded
davidvanzessen
parents: 6
diff changeset
206 Rscript $dir/sequence_overview.r $outdir/before_unique_filter.txt $outdir/merged.txt $outdir/sequence_overview $classes $outdir/hotspot_analysis_sum.txt ${empty_region_filter} 2>&1
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
207
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
208 echo "<table border='1'>" > $outdir/base_overview.html
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
209
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
210 while IFS=$'\t' read ID class seq A C G T
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
211 do
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
212 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
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
213 done < $outdir/sequence_overview/ntoverview.txt
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
214
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
215 echo "<html><center><h1>$title</h1></center>" > $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
216 echo "<meta name='viewport' content='width=device-width, initial-scale=1'>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
217 echo "<script type='text/javascript' src='jquery-1.11.0.min.js'></script>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
218 echo "<script type='text/javascript' src='tabber.js'></script>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
219 echo "<script type='text/javascript' src='script.js'></script>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
220 echo "<link rel='stylesheet' type='text/css' href='style.css'>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
221 echo "<link rel='stylesheet' type='text/css' href='pure-min.css'>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
222
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
223 matched_count="`cat $outdir/merged.txt | grep -v 'unmatched' | tail -n +2 | wc -l`"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
224 unmatched_count="`cat $outdir/unmatched.txt | tail -n +2 | wc -l`"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
225 total_count=$((matched_count + unmatched_count))
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
226 perc_count=$((unmatched_count / total_count * 100))
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
227 perc_count=`bc -l <<< "scale=2; ${unmatched_count} / ${total_count} * 100"`
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
228 perc_count=`bc -l <<< "scale=2; (${unmatched_count} / ${total_count} * 100 ) / 1"`
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
229
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
230 echo "<center><h2>Total: ${total_count}</h2></center>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
231 echo "<center><h2>Matched: ${matched_count} Unmatched: ${unmatched_count}</h2></center>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
232 echo "<center><h2>Percentage unmatched: ${perc_count}</h2></center>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
233
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
234 echo "---------------- main tables ----------------"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
235 echo "---------------- main tables ----------------<br />" >> $log
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
236
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
237 echo "<div class='tabber'>" >> $output
23
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
238 echo "<div class='tabbertab' title='SHM Overview' style='width: 3000px;'>" >> $output
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
239
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
240 for func in ${funcs[@]}
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
241 do
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
242
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
243 echo "---------------- $func table ----------------"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
244 echo "---------------- $func table ----------------<br />" >> $log
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
245
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
246 cat $outdir/mutations_${func}.txt $outdir/hotspot_analysis_${func}.txt > $outdir/data_${func}.txt
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
247
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
248 echo "---------------- pattern_plots.r ----------------"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
249 echo "---------------- pattern_plots.r ----------------<br />" >> $log
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
250
39
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
251 Rscript $dir/pattern_plots.r $outdir/data_${func}.txt $outdir/aid_motives $outdir/relative_mutations $outdir/abolute_mutations $outdir/shm_overview.txt 2>&1
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
252
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
253 echo "<table class='pure-table pure-table-striped'>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
254 echo "<thead><tr><th>info</th>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
255
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
256 if [ "${class_filter}" != "101_101" ] ; then
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
257
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
258 for gene in ${genes[@]}
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
259 do
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
260 tmp=`cat $outdir/${gene}_${func}_n.txt`
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
261 echo "<th><a href='matched_${gene}_${func}.txt'>${gene} (N = $tmp)</a></th>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
262 done
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
263
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
264 tmp=`cat $outdir/all_${func}_n.txt`
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
265 echo "<th><a href='matched_all_${func}.txt'>all (N = $tmp)</a></th>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
266 tmp=`cat $outdir/unmatched_${func}_n.txt`
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
267 echo "<th><a href='unmatched.txt'>unmatched (N = ${unmatched_count})</a></th><tr></thead>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
268
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
269 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
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
270 do
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
271 if [ "$name" == "FR R/S (ratio)" ] || [ "$name" == "CDR R/S (ratio)" ] ; then #meh
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
272 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
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
273 elif [ "$name" == "Median of Number of Mutations (%)" ] ; then
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
274 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
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
275 else
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
276 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
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
277 fi
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
278 done < $outdir/data_${func}.txt
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
279
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
280 else
3
275ab5175fd6 Uploaded
davidvanzessen
parents: 2
diff changeset
281 tmp=`cat $outdir/all_${func}_n.txt`
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
282 echo "<th><a href='matched_all_${func}.txt'>all (N = $tmp)</a></th>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
283
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
284 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
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
285 do
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
286 if [ "$name" == "FR R/S (ratio)" ] || [ "$name" == "CDR R/S (ratio)" ] ; then #meh
3
275ab5175fd6 Uploaded
davidvanzessen
parents: 2
diff changeset
287 echo "<tr><td>$name</td><td>${allx}/${ally}</td></tr>" >> $output
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
288 elif [ "$name" == "Median of Number of Mutations (%)" ] ; then
3
275ab5175fd6 Uploaded
davidvanzessen
parents: 2
diff changeset
289 echo "<tr><td>$name</td><td>${allz}%</td></tr>" >> $output
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
290 else
3
275ab5175fd6 Uploaded
davidvanzessen
parents: 2
diff changeset
291 echo "<tr><td>$name</td><td>${allx}/${ally} (${allz}%)</td></tr>" >> $output
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
292 fi
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
293 done < $outdir/data_${func}.txt
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
294
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
295 fi
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
296 echo "</table>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
297 #echo "<a href='data_${func}.txt'>Download data</a>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
298 done
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
299
39
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
300 echo "<img src='aid_motives.png' /><br />" >> $output
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
301 echo "<img src='relative_mutations.png' /><br />" >> $output
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
302 echo "<img src='abolute_mutations.png' /><br />" >> $output
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
303 echo "<br />" >> $output
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
304 cat $dir/shm_overview.htm >> $output
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
305 echo "</div>" >> $output #SHM overview tab end
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
306
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
307 echo "---------------- images ----------------"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
308 echo "---------------- images ----------------<br />" >> $log
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
309
23
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
310 echo "<div class='tabbertab' title='SHM Frequency' style='width: 3000px;'>" >> $output
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
311
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
312 if [ -a $outdir/scatter.png ]
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
313 then
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
314 echo "<img src='scatter.png'/><br />" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
315 fi
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
316 if [ -a $outdir/frequency_ranges.png ]
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
317 then
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
318 echo "<img src='frequency_ranges.png'/><br />" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
319 fi
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
320
39
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
321 echo "<br />" >> $output
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
322 cat $dir/shm_frequency.htm >> $output
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
323
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
324 echo "</div>" >> $output #SHM frequency tab end
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
325
23
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
326 echo "<div class='tabbertab' title='Transition tables' style='width: 3000px;'>" >> $output
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
327
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
328 echo "<table border='0'>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
329
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
330 for gene in ${genes[@]}
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
331 do
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
332 echo "<tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
333 echo "<td><h1>${gene}</h1></td>" >> $output
23
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
334
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
335 if [ -e $outdir/transitions_heatmap_${gene}.png ]
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
336 then
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
337 echo "<td><img src='transitions_heatmap_${gene}.png' /></td>" >> $output
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
338 else
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
339 echo "<td></td>" >> $output
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
340 fi
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
341
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
342 if [ -e $outdir/transitions_stacked_${gene}.png ]
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
343 then
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
344 echo "<td><img src='transitions_stacked_${gene}.png' /></td>" >> $output
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
345 else
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
346 echo "<td></td>" >> $output
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
347 fi
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
348
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
349 echo "<td><table style='border-left-width: 1;' class='pure-table transition-table pure-table-bordered'>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
350 echo "<tr><td></td><td colspan="5"><center>To</center></td></tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
351 first="true"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
352 while IFS=, read from a c g t
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
353 do
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
354 if [ "$first" == "true" ] ; then
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
355 echo "<tr><td rowspan='5'>From</td><td>$from</td><td>$a</td><td>$c</td><td>$g</td><td>$t</td></tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
356 first="false"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
357 else
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
358 echo "<tr><td>$from</td><td>$a</td><td>$c</td><td>$g</td><td>$t</td></tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
359 fi
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
360 done < $outdir/transitions_${gene}_sum.txt
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
361 echo "</table></td>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
362
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
363 echo "</tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
364 done
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
365
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
366 echo "<tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
367 echo "<td><h1>All</h1></td>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
368 echo "<td><img src='transitions_heatmap_all.png' /></td>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
369 echo "<td><img src='transitions_stacked_all.png' /></td>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
370 echo "<td><table style='border-left-width: 1;' class='pure-table transition-table pure-table-bordered'>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
371 echo "<tr><td></td><td colspan="5"><center>To</center></td></tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
372 first="true"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
373 while IFS=, read from a c g t
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
374 do
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
375 if [ "$first" == "true" ] ; then
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
376 echo "<tr><td rowspan='5'>From</td><td>$from</td><td>$a</td><td>$c</td><td>$g</td><td>$t</td></tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
377 first="false"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
378 else
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
379 echo "<tr><td>$from</td><td>$a</td><td>$c</td><td>$g</td><td>$t</td></tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
380 fi
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
381 done < $outdir/transitions_all_sum.txt
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
382 echo "</table></td>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
383
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
384 echo "</tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
385
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
386 echo "</table>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
387
39
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
388 echo "<br />" >> $output
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
389 cat $dir/shm_transition.htm >> $output
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
390
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
391 echo "</div>" >> $output #transition tables tab end
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
392
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
393 echo "<div class='tabbertab' title='Antigen Selection'>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
394
23
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
395 if [ -e $outdir/aa_histogram.png ]
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
396 then
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
397 echo "<img src='aa_histogram.png'/><br />" >> $output
23
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
398 fi
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
399
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
400 if [ -e $outdir/aa_histogram_IGA.png ]
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
401 then
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
402 echo "<img src='aa_histogram_IGA.png'/><br />" >> $output
23
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
403 fi
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
404
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
405 if [ -e $outdir/aa_histogram_IGG.png ]
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
406 then
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
407 echo "<img src='aa_histogram_IGG.png'/><br />" >> $output
23
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
408 fi
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
409
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
410 if [ -e $outdir/aa_histogram_IGM.png ]
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
411 then
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
412 echo "<img src='aa_histogram_IGM.png'/><br />" >> $output
23
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
413 fi
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
414
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
415 if [ -e $outdir/aa_histogram_IGE.png ]
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
416 then
6
2ddb9a21f635 Uploaded
davidvanzessen
parents: 5
diff changeset
417 echo "<img src='aa_histogram_IGE.png'/><br />" >> $output
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
418 fi
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
419
23
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
420
33
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
421
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
422 if [[ "$fast" == "no" ]] ; then
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
423
41
b8ac74723ab0 Uploaded
davidvanzessen
parents: 40
diff changeset
424
b8ac74723ab0 Uploaded
davidvanzessen
parents: 40
diff changeset
425
33
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
426 echo "---------------- baseline ----------------"
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
427 echo "---------------- baseline ----------------<br />" >> $log
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
428 tmp="$PWD"
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
429
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
430 mkdir $outdir/baseline
37
767dd9327009 Uploaded
davidvanzessen
parents: 36
diff changeset
431
41
b8ac74723ab0 Uploaded
davidvanzessen
parents: 40
diff changeset
432 echo "<center><h1>BASELINe</h1>" >> $output
b8ac74723ab0 Uploaded
davidvanzessen
parents: 40
diff changeset
433 header_substring="Based on CDR1, FR2, CDR2, FR3 (27:27:38:55:65:104:-)"
b8ac74723ab0 Uploaded
davidvanzessen
parents: 40
diff changeset
434
37
767dd9327009 Uploaded
davidvanzessen
parents: 36
diff changeset
435 baseline_boundaries="27:27:38:55:65:104:-"
767dd9327009 Uploaded
davidvanzessen
parents: 36
diff changeset
436
767dd9327009 Uploaded
davidvanzessen
parents: 36
diff changeset
437 if [[ "${empty_region_filter}" == "leader" ]] ; then
767dd9327009 Uploaded
davidvanzessen
parents: 36
diff changeset
438 baseline_boundaries="1:26:38:55:65:104:-"
41
b8ac74723ab0 Uploaded
davidvanzessen
parents: 40
diff changeset
439 header_substring="Based on FR1, CDR1, FR2, CDR2, FR3 (1:26:38:55:65:104,-)"
37
767dd9327009 Uploaded
davidvanzessen
parents: 36
diff changeset
440 fi
41
b8ac74723ab0 Uploaded
davidvanzessen
parents: 40
diff changeset
441
b8ac74723ab0 Uploaded
davidvanzessen
parents: 40
diff changeset
442 echo "<p>${header_substring}</p></center>" >> $output
23
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
443
33
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
444 mkdir $outdir/baseline/IGA_IGG_IGM
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
445 if [[ $(wc -l < $outdir/new_IMGT/1_Summary.txt) -gt "1" ]]; then
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
446 cd $outdir/baseline/IGA_IGG_IGM
41
b8ac74723ab0 Uploaded
davidvanzessen
parents: 40
diff changeset
447 bash $dir/baseline/wrapper.sh 1 1 1 1 0 0 "${baseline_boundaries}" $outdir/new_IMGT.txz "IGA_IGG_IGM_IGE" "$dir/baseline/IMGTVHreferencedataset20161215.fa" "$outdir/baseline.pdf" "Sequence.ID" "$outdir/baseline.txt"
33
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
448 else
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
449 echo "No sequences" > "$outdir/baseline.txt"
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
450 fi
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
451
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
452 mkdir $outdir/baseline/IGA
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
453 if [[ $(wc -l < $outdir/new_IMGT_IGA/1_Summary.txt) -gt "1" ]]; then
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
454 cd $outdir/baseline/IGA
37
767dd9327009 Uploaded
davidvanzessen
parents: 36
diff changeset
455 bash $dir/baseline/wrapper.sh 1 1 1 1 0 0 "${baseline_boundaries}" $outdir/new_IMGT_IGA.txz "IGA" "$dir/baseline/IMGTVHreferencedataset20161215.fa" "$outdir/baseline_IGA.pdf" "Sequence.ID" "$outdir/baseline_IGA.txt"
33
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
456 else
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
457 echo "No IGA sequences" > "$outdir/baseline_IGA.txt"
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
458 fi
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
459
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
460 mkdir $outdir/baseline/IGG
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
461 if [[ $(wc -l < $outdir/new_IMGT_IGG/1_Summary.txt) -gt "1" ]]; then
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
462 cd $outdir/baseline/IGG
37
767dd9327009 Uploaded
davidvanzessen
parents: 36
diff changeset
463 bash $dir/baseline/wrapper.sh 1 1 1 1 0 0 "${baseline_boundaries}" $outdir/new_IMGT_IGG.txz "IGG" "$dir/baseline/IMGTVHreferencedataset20161215.fa" "$outdir/baseline_IGG.pdf" "Sequence.ID" "$outdir/baseline_IGG.txt"
33
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
464 else
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
465 echo "No IGG sequences" > "$outdir/baseline_IGG.txt"
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
466 fi
23
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
467
33
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
468 mkdir $outdir/baseline/IGM
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
469 if [[ $(wc -l < $outdir/new_IMGT_IGM/1_Summary.txt) -gt "1" ]]; then
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
470 cd $outdir/baseline/IGM
37
767dd9327009 Uploaded
davidvanzessen
parents: 36
diff changeset
471 bash $dir/baseline/wrapper.sh 1 1 1 1 0 0 "${baseline_boundaries}" $outdir/new_IMGT_IGM.txz "IGM" "$dir/baseline/IMGTVHreferencedataset20161215.fa" "$outdir/baseline_IGM.pdf" "Sequence.ID" "$outdir/baseline_IGM.txt"
33
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
472 else
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
473 echo "No IGM sequences" > "$outdir/baseline_IGM.txt"
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
474 fi
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
475
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
476 mkdir $outdir/baseline/IGE
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
477 if [[ $(wc -l < $outdir/new_IMGT_IGE/1_Summary.txt) -gt "1" ]]; then
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
478 cd $outdir/baseline/IGE
37
767dd9327009 Uploaded
davidvanzessen
parents: 36
diff changeset
479 bash $dir/baseline/wrapper.sh 1 1 1 1 0 0 "${baseline_boundaries}" $outdir/new_IMGT_IGE.txz "IGE" "$dir/baseline/IMGTVHreferencedataset20161215.fa" "$outdir/baseline_IGE.pdf" "Sequence.ID" "$outdir/baseline_IGE.txt"
33
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
480 else
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
481 echo "No IGE sequences" > "$outdir/baseline_IGE.txt"
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
482 fi
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
483
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
484 cd $tmp
23
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
485
33
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
486 echo "Cleaning up *.RData files"
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
487 find $outdir/baseline -name "*.RData" -type f -delete
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
488
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
489 if [ -e $outdir/baseline.pdf ]
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
490 then
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
491 echo "<embed src='baseline.pdf' width='700px' height='1000px'>" >> $output
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
492 fi
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
493
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
494 if [ -e $outdir/baseline_IGA.pdf ]
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
495 then
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
496 echo "<embed src='baseline_IGA.pdf' width='700px' height='1000px'>" >> $output
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
497 fi
23
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
498
33
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
499 if [ -e $outdir/baseline_IGG.pdf ]
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
500 then
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
501 echo "<embed src='baseline_IGG.pdf' width='700px' height='1000px'>" >> $output
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
502 fi
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
503
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
504 if [ -e $outdir/baseline_IGM.pdf ]
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
505 then
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
506 echo "<embed src='baseline_IGM.pdf' width='700px' height='1000px'>" >> $output
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
507 fi
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
508
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
509 if [ -e $outdir/baseline_IGE.pdf ]
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
510 then
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
511 echo "<embed src='baseline_IGE.pdf' width='700px' height='1000px'>" >> $output
22fabe161cf3 Uploaded
davidvanzessen
parents: 32
diff changeset
512 fi
23
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
513 fi
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
514
39
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
515 echo "<br />" >> $output
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
516 cat $dir/shm_selection.htm >> $output
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
517
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
518 echo "</div>" >> $output #antigen selection tab end
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
519
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
520 echo "<div class='tabbertab' title='CSR'>" >> $output #CSR tab
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
521
23
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
522 if [ -e $outdir/IGA.png ]
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
523 then
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
524 echo "<img src='IGA.png'/><br />" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
525 fi
23
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
526 if [ -e $outdir/IGG.png ]
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
527 then
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
528 echo "<img src='IGG.png'/><br />" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
529 fi
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
530
39
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
531 echo "<br />" >> $output
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
532 cat $dir/shm_csr.htm >> $output
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
533
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
534 echo "</div>" >> $output #CSR tab end
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
535
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
536 if [[ "$fast" == "no" ]] ; then
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
537
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
538 echo "---------------- change-o MakeDB ----------------"
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
539
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
540 mkdir $outdir/change_o
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
541
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
542 tmp="$PWD"
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
543
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
544 cd $outdir/change_o
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
545
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
546 bash $dir/change_o/makedb.sh $outdir/new_IMGT.txz false false false $outdir/change_o/change-o-db.txt
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
547 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
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
548
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
549 Rscript $dir/merge.r $outdir/change_o/change-o-db-defined_clones.txt $outdir/merged.txt "all" "Sequence.ID,best_match" "SEQUENCE_ID" "Sequence.ID" $outdir/change_o/change-o-db-defined_clones.txt 2>&1
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
550
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
551 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 2>&1"
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
552
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
553 if [[ $(wc -l < $outdir/new_IMGT_IGA/1_Summary.txt) -gt "1" ]]; then
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
554 bash $dir/change_o/makedb.sh $outdir/new_IMGT_IGA.txz false false false $outdir/change_o/change-o-db-IGA.txt
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
555 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
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
556 else
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
557 echo "No IGA sequences" > "$outdir/change_o/change-o-db-defined_clones-IGA.txt"
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
558 echo "No IGA sequences" > "$outdir/change_o/change-o-defined_clones-summary-IGA.txt"
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
559 fi
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
560
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
561 if [[ $(wc -l < $outdir/new_IMGT_IGG/1_Summary.txt) -gt "1" ]]; then
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
562 bash $dir/change_o/makedb.sh $outdir/new_IMGT_IGG.txz false false false $outdir/change_o/change-o-db-IGG.txt
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
563 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
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
564 else
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
565 echo "No IGG sequences" > "$outdir/change_o/change-o-db-defined_clones-IGG.txt"
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
566 echo "No IGG sequences" > "$outdir/change_o/change-o-defined_clones-summary-IGG.txt"
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
567 fi
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
568
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
569 if [[ $(wc -l < $outdir/new_IMGT_IGM/1_Summary.txt) -gt "1" ]]; then
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
570 bash $dir/change_o/makedb.sh $outdir/new_IMGT_IGM.txz false false false $outdir/change_o/change-o-db-IGM.txt
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
571 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
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
572 else
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
573 echo "No IGM sequences" > "$outdir/change_o/change-o-db-defined_clones-IGM.txt"
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
574 echo "No IGM sequences" > "$outdir/change_o/change-o-defined_clones-summary-IGM.txt"
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
575 fi
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
576
6
2ddb9a21f635 Uploaded
davidvanzessen
parents: 5
diff changeset
577 if [[ $(wc -l < $outdir/new_IMGT_IGE/1_Summary.txt) -gt "1" ]]; then
2ddb9a21f635 Uploaded
davidvanzessen
parents: 5
diff changeset
578 bash $dir/change_o/makedb.sh $outdir/new_IMGT_IGE.txz false false false $outdir/change_o/change-o-db-IGE.txt
2ddb9a21f635 Uploaded
davidvanzessen
parents: 5
diff changeset
579 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
2ddb9a21f635 Uploaded
davidvanzessen
parents: 5
diff changeset
580 else
2ddb9a21f635 Uploaded
davidvanzessen
parents: 5
diff changeset
581 echo "No IGE sequences" > "$outdir/change_o/change-o-db-defined_clones-IGE.txt"
2ddb9a21f635 Uploaded
davidvanzessen
parents: 5
diff changeset
582 echo "No IGE sequences" > "$outdir/change_o/change-o-defined_clones-summary-IGE.txt"
2ddb9a21f635 Uploaded
davidvanzessen
parents: 5
diff changeset
583 fi
2ddb9a21f635 Uploaded
davidvanzessen
parents: 5
diff changeset
584
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
585 PWD="$tmp"
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
586
39
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
587 echo "<div class='tabbertab' title='Clonal Relation' style='width: 7000px;'>" >> $output #clonality tab
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
588
16
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
589 function clonality_table {
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
590 local infile=$1
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
591 local outfile=$2
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
592
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
593 echo "<table class='pure-table pure-table-striped'>" >> $outfile
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
594 echo "<thead><tr><th>Clone size</th><th>Nr of clones</th><th>Nr of sequences</th></tr></thead>" >> $outfile
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
595
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
596 first='true'
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
597
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
598 while read size clones seqs
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
599 do
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
600 if [[ "$first" == "true" ]]; then
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
601 first="false"
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
602 continue
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
603 fi
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
604 echo "<tr><td>$size</td><td>$clones</td><td>$seqs</td></tr>" >> $outfile
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
605 done < $infile
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
606
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
607 echo "</table>" >> $outfile
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
608 }
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
609 echo "<div class='tabber'>" >> $output
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
610
16
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
611 echo "<div class='tabbertab' title='All'>" >> $output
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
612 clonality_table $outdir/change_o/change-o-defined_clones-summary.txt $output
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
613 echo "</div>" >> $output
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
614
16
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
615 echo "<div class='tabbertab' title='IGA'>" >> $output
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
616 clonality_table $outdir/change_o/change-o-defined_clones-summary-IGA.txt $output
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
617 echo "</div>" >> $output
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
618
16
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
619 echo "<div class='tabbertab' title='IGG'>" >> $output
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
620 clonality_table $outdir/change_o/change-o-defined_clones-summary-IGG.txt $output
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
621 echo "</div>" >> $output
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
622
16
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
623 echo "<div class='tabbertab' title='IGM'>" >> $output
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
624 clonality_table $outdir/change_o/change-o-defined_clones-summary-IGM.txt $output
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
625 echo "</div>" >> $output
6
2ddb9a21f635 Uploaded
davidvanzessen
parents: 5
diff changeset
626
16
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
627 echo "<div class='tabbertab' title='IGE'>" >> $output
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
628 clonality_table $outdir/change_o/change-o-defined_clones-summary-IGM.txt $output
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
629 echo "</div>" >> $output
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
630
39
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
631 echo "<div class='tabbertab' title='Overlap' style='width: 7000px;'>" >> $output
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
632 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/..."
16
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
633 echo "</div>" >> $output
39
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
634
16
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
635 echo "</div>" >> $output #clonality tabber end
39
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
636
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
637 echo "<br />" >> $output
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
638 cat $dir/shm_clonality.htm >> $output
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
639
16
4e596473c25c Uploaded
davidvanzessen
parents: 14
diff changeset
640 echo "</div>" >> $output #clonality tab end
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
641
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
642 fi
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
643
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
644 echo "<div class='tabbertab' title='Downloads'>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
645
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
646 echo "<table class='pure-table pure-table-striped'>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
647 echo "<thead><tr><th>info</th><th>link</th></tr></thead>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
648 echo "<tr><td>The complete dataset</td><td><a href='merged.txt' download='merged.txt' >Download</a></td></tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
649 echo "<tr><td>The filtered dataset</td><td><a href='filtered.txt' download='filtered.txt' >Download</a></td></tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
650 echo "<tr><td>The alignment info on the unmatched sequences</td><td><a href='unmatched.txt' download='unmatched.txt' >Download</a></td></tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
651
2
e85fec274cde Uploaded
davidvanzessen
parents: 1
diff changeset
652 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>SHM Overview</td></tr>" >> $output
23
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
653 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
2
e85fec274cde Uploaded
davidvanzessen
parents: 1
diff changeset
654 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
e85fec274cde Uploaded
davidvanzessen
parents: 1
diff changeset
655 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
e85fec274cde Uploaded
davidvanzessen
parents: 1
diff changeset
656 echo "<tr><td>Base count for every sequence</td><td><a href='base_overview.html'>View</a></td></tr>" >> $output
39
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
657 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
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
658 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
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
659 echo "<tr><td>The data used to generate the absolute mutation patterns plot</td><td><a href='absolute_mutations.txt' download='abolute_mutations.txt' >Download</a></td></tr>" >> $output
2
e85fec274cde Uploaded
davidvanzessen
parents: 1
diff changeset
660
e85fec274cde Uploaded
davidvanzessen
parents: 1
diff changeset
661 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>SHM Frequency</td></tr>" >> $output
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
662 echo "<tr><td>The data generate the frequency scatter plot</td><td><a href='scatter.txt' download='scatter.txt' >Download</a></td></tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
663 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
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
664 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
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
665
2
e85fec274cde Uploaded
davidvanzessen
parents: 1
diff changeset
666 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>Transition Tables</td></tr>" >> $output
23
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
667 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
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
668 echo "<tr><td>The data for the 'IGA' transition plot</td><td><a href='transitions_IGA_sum.txt' download='transitions_all_sum.txt' >Download</a></td></tr>" >> $output
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
669 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
30
33a7c49d48a7 Uploaded
davidvanzessen
parents: 29
diff changeset
670 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
23
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
671 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
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
672 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
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
673 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
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
674 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
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
675 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
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
676 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
81453585dfc3 Uploaded
davidvanzessen
parents: 21
diff changeset
677 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
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
678
2
e85fec274cde Uploaded
davidvanzessen
parents: 1
diff changeset
679 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>Antigen Selection</td></tr>" >> $output
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
680 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
39
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
681 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
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
682
29
80c4eebf7bc9 Uploaded
davidvanzessen
parents: 28
diff changeset
683 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
80c4eebf7bc9 Uploaded
davidvanzessen
parents: 28
diff changeset
684 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
80c4eebf7bc9 Uploaded
davidvanzessen
parents: 28
diff changeset
685 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
80c4eebf7bc9 Uploaded
davidvanzessen
parents: 28
diff changeset
686 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
80c4eebf7bc9 Uploaded
davidvanzessen
parents: 28
diff changeset
687 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
80c4eebf7bc9 Uploaded
davidvanzessen
parents: 28
diff changeset
688
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
689 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
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
690 echo "<tr><td>Baseline data</td><td><a href='baseline.txt' download='baseline.txt' >Download</a></td></tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
691 echo "<tr><td>Baseline IGA PDF</td><td><a href='baseline_IGA.pdf' download='baseline_IGA.pdf' >Download</a></td></tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
692 echo "<tr><td>Baseline IGA data</td><td><a href='baseline_IGA.txt' download='baseline_IGA.txt' >Download</a></td></tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
693 echo "<tr><td>Baseline IGG PDF</td><td><a href='baseline_IGG.pdf' download='baseline_IGG.pdf' >Download</a></td></tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
694 echo "<tr><td>Baseline IGG data</td><td><a href='baseline_IGG.txt' download='baseline_IGG.txt' >Download</a></td></tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
695 echo "<tr><td>Baseline IGM PDF</td><td><a href='baseline_IGM.pdf' download='baseline_IGM.pdf' >Download</a></td></tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
696 echo "<tr><td>Baseline IGM data</td><td><a href='baseline_IGM.txt' download='baseline_IGM.txt' >Download</a></td></tr>" >> $output
31
fe44a905aee9 Uploaded
davidvanzessen
parents: 30
diff changeset
697 echo "<tr><td>Baseline IGE PDF</td><td><a href='baseline_IGE.pdf' download='baseline_IGE.pdf' >Download</a></td></tr>" >> $output
6
2ddb9a21f635 Uploaded
davidvanzessen
parents: 5
diff changeset
698 echo "<tr><td>Baseline IGE data</td><td><a href='baseline_IGE.txt' download='baseline_IGE.txt' >Download</a></td></tr>" >> $output
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
699
2
e85fec274cde Uploaded
davidvanzessen
parents: 1
diff changeset
700 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>CSR</td></tr>" >> $output
39
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
701 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
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
702 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
2
e85fec274cde Uploaded
davidvanzessen
parents: 1
diff changeset
703
39
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
704 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>Clonal Relation</td></tr>" >> $output
2
e85fec274cde Uploaded
davidvanzessen
parents: 1
diff changeset
705 echo "<tr><td>Sequence overlap between subclasses</td><td><a href='sequence_overview/index.html'>View</a></td></tr>" >> $output
e85fec274cde Uploaded
davidvanzessen
parents: 1
diff changeset
706 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
e85fec274cde Uploaded
davidvanzessen
parents: 1
diff changeset
707 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
e85fec274cde Uploaded
davidvanzessen
parents: 1
diff changeset
708 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
e85fec274cde Uploaded
davidvanzessen
parents: 1
diff changeset
709 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
e85fec274cde Uploaded
davidvanzessen
parents: 1
diff changeset
710 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
e85fec274cde Uploaded
davidvanzessen
parents: 1
diff changeset
711 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
e85fec274cde Uploaded
davidvanzessen
parents: 1
diff changeset
712 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
e85fec274cde Uploaded
davidvanzessen
parents: 1
diff changeset
713 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
6
2ddb9a21f635 Uploaded
davidvanzessen
parents: 5
diff changeset
714 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
2ddb9a21f635 Uploaded
davidvanzessen
parents: 5
diff changeset
715 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
2
e85fec274cde Uploaded
davidvanzessen
parents: 1
diff changeset
716
e85fec274cde Uploaded
davidvanzessen
parents: 1
diff changeset
717 echo "<tr><td colspan='2' style='background-color:#E0E0E0;'>Filtered IMGT output files</td></tr>" >> $output
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
718 echo "<tr><td>An IMGT archive with just the matched and filtered sequences</td><td><a href='new_IMGT.txz' download='new_IMGT.txz' >Download</a></td></tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
719 echo "<tr><td>An IMGT archive with just the matched and filtered IGA sequences</td><td><a href='new_IMGT_IGA.txz' download='new_IMGT_IGA.txz' >Download</a></td></tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
720 echo "<tr><td>An IMGT archive with just the matched and filtered IGA1 sequences</td><td><a href='new_IMGT_IGA1.txz' download='new_IMGT_IGA1.txz' >Download</a></td></tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
721 echo "<tr><td>An IMGT archive with just the matched and filtered IGA2 sequences</td><td><a href='new_IMGT_IGA2.txz' download='new_IMGT_IGA2.txz' >Download</a></td></tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
722 echo "<tr><td>An IMGT archive with just the matched and filtered IGG sequences</td><td><a href='new_IMGT_IGG.txz' download='new_IMGT_IGG.txz' >Download</a></td></tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
723 echo "<tr><td>An IMGT archive with just the matched and filtered IGG1 sequences</td><td><a href='new_IMGT_IGG1.txz' download='new_IMGT_IGG1.txz' >Download</a></td></tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
724 echo "<tr><td>An IMGT archive with just the matched and filtered IGG2 sequences</td><td><a href='new_IMGT_IGG2.txz' download='new_IMGT_IGG2.txz' >Download</a></td></tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
725 echo "<tr><td>An IMGT archive with just the matched and filtered IGG3 sequences</td><td><a href='new_IMGT_IGG3.txz' download='new_IMGT_IGG3.txz' >Download</a></td></tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
726 echo "<tr><td>An IMGT archive with just the matched and filtered IGG4 sequences</td><td><a href='new_IMGT_IGG4.txz' download='new_IMGT_IGG4.txz' >Download</a></td></tr>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
727 echo "<tr><td>An IMGT archive with just the matched and filtered IGM sequences</td><td><a href='new_IMGT_IGM.txz' download='new_IMGT_IGM.txz' >Download</a></td></tr>" >> $output
31
fe44a905aee9 Uploaded
davidvanzessen
parents: 30
diff changeset
728 echo "<tr><td>An IMGT archive with just the matched and filtered IGE sequences</td><td><a href='new_IMGT_IGE.txz' download='new_IMGT_IGE.txz' >Download</a></td></tr>" >> $output
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
729
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
730 echo "</table>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
731
39
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
732 echo "<br />" >> $output
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
733 cat $dir/shm_downloads.htm >> $output
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
734
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
735 echo "</div>" >> $output #downloads tab end
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
736
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
737 echo "</div>" >> $output #tabs end
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
738
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
739 echo "</html>" >> $output
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
740
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
741
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
742 echo "---------------- naive_output.r ----------------"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
743 echo "---------------- naive_output.r ----------------<br />" >> $log
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
744
5
012a738edf5a Uploaded
davidvanzessen
parents: 4
diff changeset
745 if [[ "$naive_output" == "yes" ]]
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
746 then
28
c0ecc31829bd Uploaded
davidvanzessen
parents: 26
diff changeset
747 echo "output naive output"
18
949a30f04d9b Uploaded
davidvanzessen
parents: 16
diff changeset
748 if [[ "${class_filter}" == "101_101" ]]
949a30f04d9b Uploaded
davidvanzessen
parents: 16
diff changeset
749 then
28
c0ecc31829bd Uploaded
davidvanzessen
parents: 26
diff changeset
750 echo "copy new_IMGT.txz to ${naive_output_all}"
21
c281993e515b Uploaded
davidvanzessen
parents: 20
diff changeset
751 cp $outdir/new_IMGT.txz ${naive_output_all}
18
949a30f04d9b Uploaded
davidvanzessen
parents: 16
diff changeset
752 else
28
c0ecc31829bd Uploaded
davidvanzessen
parents: 26
diff changeset
753 echo "copy for classes"
18
949a30f04d9b Uploaded
davidvanzessen
parents: 16
diff changeset
754 cp $outdir/new_IMGT_IGA.txz ${naive_output_ca}
949a30f04d9b Uploaded
davidvanzessen
parents: 16
diff changeset
755 cp $outdir/new_IMGT_IGG.txz ${naive_output_cg}
949a30f04d9b Uploaded
davidvanzessen
parents: 16
diff changeset
756 cp $outdir/new_IMGT_IGM.txz ${naive_output_cm}
949a30f04d9b Uploaded
davidvanzessen
parents: 16
diff changeset
757 cp $outdir/new_IMGT_IGE.txz ${naive_output_ce}
949a30f04d9b Uploaded
davidvanzessen
parents: 16
diff changeset
758 fi
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
759 fi
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
760
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
761 echo "</table>" >> $outdir/base_overview.html
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
762
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
763 mv $log $outdir/log.html
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
764
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
765 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
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
766 echo "<table border = 1>" >> $log
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
767 echo "<thead><tr><th>Info</th><th>Sequences</th><th>Percentage</th></tr></thead>" >> $log
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
768 tIFS="$TMP"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
769 IFS=$'\t'
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
770 while read step seq perc
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
771 do
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
772 echo "<tr>" >> $log
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
773 echo "<td>$step</td>" >> $log
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
774 echo "<td>$seq</td>" >> $log
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
775 echo "<td>${perc}%</td>" >> $log
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
776 echo "</tr>" >> $log
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
777 done < $outdir/filtering_steps.txt
39
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
778 echo "</table>" >> $log
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
779 echo "<br />" >> $log
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
780 cat $dir/shm_first.htm >> $log
a24f8c93583a Uploaded
davidvanzessen
parents: 37
diff changeset
781 echo "</center></html>" >> $log
0
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
782
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
783 IFS="$tIFS"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
784
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
785
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
786 echo "---------------- Done! ----------------"
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
787 echo "---------------- Done! ----------------<br />" >> $outdir/log.html
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
788
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
789
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
790
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
791
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
792
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
793
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
794
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
795
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
796
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
797
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
798
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
799
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
800
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
801
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
802
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
803
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
804
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
805
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
806
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
807
c33d93683a09 Uploaded
davidvanzessen
parents:
diff changeset
808