annotate isoDE2.sh @ 14:007e2dd3fe8b draft

Bug fix in output files headers
author saharlcc
date Mon, 03 Apr 2017 17:55:22 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
1 #!/bin/bash
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
2
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
3 isoEMDir=/galaxy/galaxy/tools-dependencies/bin/isoem2/
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
4 toolpath=${isoEMDir}/bin
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
5 isoDEPath=${isoEMDir}/bin
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
6 supportCalcPath=${isoEMDir}/src/calc
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
7 fpkmGeneCommand=""
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
8 fpkmIsoformCommand=""
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
9 tpmGeneCommand=""
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
10 tpmIsoformCommand=""
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
11
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
12 numberOfBootstrapIterationsPerSample=199
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
13
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
14 arg=($*)
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
15 i=0
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
16 while [ $i -lt $# ]
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
17 do
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
18 a=${arg[i]}
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
19 if [ "$a" == "-c1" ]; then
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
20 fpkmGeneCommand="$fpkmGeneCommand -c1"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
21 fpkmIsoformCommand="$fpkmIsoformCommand -c1"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
22 tpmGeneCommand="$tpmGeneCommand -c1"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
23 tpmIsoformCommand="$tpmIsoformCommand -c1"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
24
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
25 ((i++))
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
26 a=${arg[i]}
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
27 rep=1
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
28 while [[ `expr index "$a" "/"` -ne 0 && $i -lt $# ]]
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
29 do
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
30 condition1File=$a
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
31 ${toolpath}/convertToisoDEFormatWithIsoforms $condition1File c1_rep${rep}
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
32
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
33 fpkmGeneCommand="$fpkmGeneCommand c1_rep${rep}_fpkm_G"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
34 fpkmIsoformCommand="$fpkmIsoformCommand c1_rep${rep}_fpkm_I"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
35 tpmGeneCommand="$tpmGeneCommand c1_rep${rep}_tpm_G"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
36 tpmIsoformCommand="$tpmIsoformCommand c1_rep${rep}_tpm_I"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
37 ((rep++))
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
38
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
39 ((i++))
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
40 a=${arg[i]}
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
41 done
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
42 elif [ "$a" == "-c2" ]; then
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
43 fpkmGeneCommand="$fpkmGeneCommand -c2"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
44 fpkmIsoformCommand="$fpkmIsoformCommand -c2"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
45 tpmGeneCommand="$tpmGeneCommand -c2"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
46 tpmIsoformCommand="$tpmIsoformCommand -c2"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
47
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
48 ((i++))
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
49 a=${arg[i]}
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
50 rep=1
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
51 while [[ `expr index "$a" "/"` -ne 0 && $i -lt $# ]]
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
52 do
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
53 condition1File=$a
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
54 #echo $condition1File
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
55 ${toolpath}/convertToisoDEFormatWithIsoforms $condition1File c2_rep${rep}
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
56
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
57 fpkmGeneCommand="$fpkmGeneCommand c2_rep${rep}_fpkm_G"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
58 fpkmIsoformCommand="$fpkmIsoformCommand c2_rep${rep}_fpkm_I"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
59 tpmGeneCommand="$tpmGeneCommand c2_rep${rep}_tpm_G"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
60 tpmIsoformCommand="$tpmIsoformCommand c2_rep${rep}_tpm_I"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
61 ((rep++))
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
62
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
63 ((i++))
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
64 a=${arg[i]}
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
65 done
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
66 elif [ "$a" == "-pval" ]; then
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
67 ((i++))
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
68 pval=${arg[i]}
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
69 ((i++))
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
70
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
71
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
72 elif [ "$a" == "-geneFPKMout" ]; then
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
73 ((i++))
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
74 geneFPKMout_file=${arg[i]}
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
75 ((i++))
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
76
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
77
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
78 elif [ "$a" == "-geneTPMout" ]; then
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
79 ((i++))
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
80 geneTPMout_file=${arg[i]}
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
81 ((i++))
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
82
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
83 elif [ "$a" == "-isoFPKMout" ]; then
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
84 ((i++))
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
85 isoFPKMout_file=${arg[i]}
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
86 ((i++))
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
87
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
88 elif [ "$a" == "-isoTPMout" ]; then
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
89 ((i++))
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
90 isoTPMout_file=${arg[i]}
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
91 ((i++))
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
92 else
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
93
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
94 ((i++))
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
95 fi
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
96
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
97 done
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
98 ((rep--))
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
99 bootstrap=$(($rep*$numberOfBootstrapIterationsPerSample))
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
100 echo boostrap iterations $bootstrap
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
101 #support=`java -cp ${supportCalcPath} support 200 200 $pval`
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
102 #support=`java -cp ${supportCalcPath} support $bootstrap $bootstrap $pval`
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
103 #Calculator assumes IsoDE does all pairs when calculation the number of ratios. It multiplies the number of bootstrap samples per condition
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
104 # changed the second parameter to make the number of ratios equal to the number of bootstrap samples (match, not all pairs)
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
105 echo calculate support based on p-value and number or replicates
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
106 support=`java -cp ${supportCalcPath} support $bootstrap 1 $pval`
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
107 fpkmGeneCommand="$fpkmGeneCommand -b $support"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
108 fpkmIsoformCommand="$fpkmIsoformCommand -b $support"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
109 tpmGeneCommand="$tpmGeneCommand -b $support"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
110 tpmIsoformCommand="$tpmIsoformCommand -b $support"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
111
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
112 fpkmGeneCommand="$fpkmGeneCommand -dfc 2"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
113 fpkmIsoformCommand="$fpkmIsoformCommand -dfc 2"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
114 tpmGeneCommand="$tpmGeneCommand -dfc 2"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
115 tpmIsoformCommand="$tpmIsoformCommand -dfc 2"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
116
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
117
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
118 #if [ "${out_prefix}" == "$(basename ${out_prefix} )" ]; then
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
119 # pth=`pwd`
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
120 # out_prefix=${pth}/${out_prefix}
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
121 #fi
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
122
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
123
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
124 echo GENE FPKM
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
125 echo moving start
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
126 date
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
127
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
128 mkdir fpkm_G
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
129 cd fpkm_G
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
130 mv ../c*_fpkm_G .
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
131
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
132
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
133 echo isoDE start
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
134 date
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
135
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
136
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
137 ${isoDEPath}/isodecalls $fpkmGeneCommand -out "output.txt"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
138 #awk '{for (f=1; f<=NF; f++) {if (f == NF) printf "%s",$f; else printf "%s\t", $f }; print ""}' Bootstrap_Merge1_DIR/output.txt | sed 1,1d > ${geneFPKMout_file}
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
139
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
140 echo awk command
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
141 date
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
142
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
143
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
144 awk '{if (NR == 1) {print "Gene ID\tConfident log2 FC\t Single run log2 FC\t c1 average FPKM\tc2 average FPKM";} else {if ($6 == 0 && $7 == 0) {two="0";} else {two=$2;} print $1 "\t" two "\t" $5 "\t" $6 "\t" $7}}' Bootstrap_Merge1_DIR/output.txt > ${geneFPKMout_file}
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
145
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
146 cd ..
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
147
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
148
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
149 echo ISOFORM FPKM
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
150
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
151 echo moving start
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
152 date
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
153
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
154 mkdir fpkm_I
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
155 cd fpkm_I
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
156 mv ../c*_fpkm_I .
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
157
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
158
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
159 echo isoDE start
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
160 date
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
161
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
162 ${isoDEPath}/isodecalls $fpkmIsoformCommand -out "output.txt"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
163
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
164 echo awk command
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
165 date
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
166 pwd
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
167 awk '{if (NR == 1) {print "Isoform ID\tConfident log2 FC\t Single run log2 FC\t c1 average FPKM\tc2 average FPKM";} else {if ($6 == 0 && $7 == 0) {two="0";} else {two=$2;} print $1 "\t" two "\t" $5 "\t" $6 "\t" $7}}' Bootstrap_Merge1_DIR/output.txt > ${isoFPKMout_file}
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
168 cd ..
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
169
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
170
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
171 echo ISOFORM TPM
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
172 echo moving start
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
173 date
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
174
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
175 mkdir tpm_G
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
176 cd tpm_G
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
177 mv ../c*_tpm_G .
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
178
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
179 echo isoDE start
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
180 date
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
181
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
182 ${isoDEPath}/isodecalls $tpmGeneCommand -out "output.txt"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
183
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
184 echo awk command
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
185 date
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
186 pwd
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
187 awk '{if (NR == 1) {print "Gene ID\tConfident log2 FC\t Single run log2 FC\t c1 average TPM\tc2 average TPM";} else {if ($6 == 0 && $7 == 0) {two="0";} else {two=$2;} print $1 "\t" two "\t" $5 "\t" $6 "\t" $7}}' Bootstrap_Merge1_DIR/output.txt > ${geneTPMout_file}
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
188 cd ..
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
189
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
190
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
191 echo ISOFORM TPM
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
192 echo moving start
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
193 date
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
194
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
195 mkdir tpm_I
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
196 cd tpm_I
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
197 mv ../c*_tpm_I .
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
198
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
199 echo isoDE start
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
200 date
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
201
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
202 ${isoDEPath}/isodecalls $tpmIsoformCommand -out "output.txt"
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
203
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
204 echo awk command
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
205 date
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
206
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
207 awk '{if (NR == 1) {print "Isoform ID\tConfident log2 FC\t Single run log2 FC\t c1 average TPM\tc2 average TPM";} else {if ($6 == 0 && $7 == 0) {two="0";} else {two=$2;} print $1 "\t" two "\t" $5 "\t" $6 "\t" $7}}' Bootstrap_Merge1_DIR/output.txt > ${isoTPMout_file}
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
208
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
209 cd ..
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
210
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
211
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
212 echo final cleanup
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
213 date
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
214 rm -fr fpkm_G fpkm_I tpm_G cd tpm_I
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
215 echo done
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
216 date
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
217
007e2dd3fe8b Bug fix in output files headers
saharlcc
parents:
diff changeset
218