annotate check2.pl @ 3:5f235b95619f draft

Uploaded
author mkhan1980
date Mon, 04 Mar 2013 06:38:53 -0500
parents 2cceb9398d33
children f1696b304b8d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
1 #!/usr/bin/perl -w
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
2 use strict;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
3
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
4 # Define variables
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
5 my @temp=();
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
6 my $result1;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
7 my $result2;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
8 my $result3;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
9 my $result4;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
10 my $result5;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
11 my $result6;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
12 my $resultfinal;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
13 my $count;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
14 my $coun;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
15 my $cou;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
16 my @digit=();
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
17 my $digit;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
18 my $marks;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
19 my $log;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
20 my $coll;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
21 my @scorearray=();
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
22 my $scorearray;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
23 my $percent;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
24 my $kount;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
25 my @result=();
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
26 my $result;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
27 my %final=();
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
28 my $final;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
29 my @c=();
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
30 my @matrix1;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
31 my @matrix2;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
32 my $matrix1;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
33 my $matrix2;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
34 $coll=0;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
35 my $count2;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
36 my $var;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
37 my $entry1;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
38 my $entry2;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
39 my $reventry1;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
40 my $reventry2;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
41 my $revvar;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
42 my @revmatrix1;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
43 my $revkount;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
44 my $revcoun;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
45 my $revcount2;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
46 my @revtemp;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
47 my $revcoll;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
48 my @revdigit;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
49 my $revdigit;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
50 my $revmarks;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
51 my $revresult1;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
52 my $revresult2;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
53 my $revresult3;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
54 my $revresult4;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
55 my $revresult5;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
56 my $revresult6;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
57 my $revresultfinal;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
58 my @revscorearray;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
59 my $revscorearray;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
60
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
61
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
62
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
63 #define variables from configuration file
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
64 open (IN, "<$ARGV[0]");
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
65 open (IN2, "<$ARGV[1]");
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
66 open (OUT, ">$ARGV[2]");
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
67
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
68 #assign arrays to variables from configuration file
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
69 my @array5=<IN>;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
70
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
71 my @coordinates=<IN2>;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
72
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
73
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
74 #split the chromosome number and starting position from coordinates file into 2 separate strings
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
75
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
76 foreach my $coordinates(@coordinates) {
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
77
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
78 chomp($coordinates);
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
79
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
80 my @coordinates2=split(/\s+/, $coordinates);
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
81
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
82 my $coordinates2;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
83
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
84 $entry1=$coordinates2[0];
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
85 $entry2=$coordinates2[1];
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
86
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
87 }
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
88
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
89
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
90 print OUT "CTCF Site", "\t", "Chromosome no.", "\t", "Start", "\t", "End", "\t", "Score", "\t", "Strand", "\n";
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
91
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
92 chomp (@array5);
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
93
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
94 my $digits=join("", @array5);
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
95
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
96 my @yeslap = $digits =~ /(?=(\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w\w))/g;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
97
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
98
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
99 $var = "@yeslap\n";
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
100
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
101
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
102 @matrix1=qw/87.25 291.25 76.25 459.25 167.25 145.25 414.25 187.25 281.25 49.25 449.25 134.25 56.25 800.25 21.25 36.25 8.25 903.25 0.25 2.25 744.25 13.25 65.25 91.25 40.25 528.25 334.25 11.25 107.25 433.25 48.25 324.25 851.25 11.25 32.25 18.25 5.25 0.25 903.25 3.25 333.25 3.25 566.25 9.25 54.25 12.25 504.25 341.25 12.25 0.25 890.25 8.25 56.25 8.25 775.25 71.25 104.25 733.25 5.25 67.25 372.25 13.25 507.25 17.25 82.25 482.25 307.25 37.25 117.25 322.25 73.25 396.25 402.25 181.25 266.25 59.25/;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
103
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
104 $kount=0;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
105 $coun=0;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
106
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
107 # Define the pattern for CTCF. Because of pseudocount, a wildcard is allowed at
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
108 #each position.
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
109 my $pattern = "[ATGC][ATGC][ATGC][ATGC][ATGC][ATGC][ATGC][ATGC][ATGC][ATGC][ATGC][ATGC][ATGC][ATGC][ATGC][ATGC][ATGC][ATGC][ATGC]";
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
110
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
111 # Compare the pattern with the 19 bp nucleotide segments.
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
112
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
113 while($var =~ m/$pattern/gi)
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
114 {
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
115 $coun++;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
116 $count2++;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
117 my $endpos = pos $var;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
118
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
119 # Get the starting and ending positions of the matched pattern.
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
120
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
121 my $startpos=($endpos+1)-19;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
122 my $lastpos=$endpos;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
123
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
124
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
125 my $consensus = substr($var, ($startpos-1), 19);
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
126
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
127 push(@temp, $consensus, $startpos, $lastpos);
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
128
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
129 $coll=0;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
130 $kount++;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
131
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
132
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
133 # Split the matched pattern into 19 single bases.
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
134
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
135 @digit = split(//, $consensus);
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
136
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
137
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
138 # For each base, if the base is A, calculate the weight score of A according to
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
139 #its frequency in the CTCF Position Frequency Matrix.
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
140 foreach $digit (@digit)
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
141 {
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
142
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
143
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
144 if($digit =~ m/A/)
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
145 {
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
146
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
147
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
148 my $ref = \@matrix1;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
149 $marks = @{$ref}[$coll];
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
150
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
151
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
152 $result1 = sqrt(914);
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
153
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
154 $result2 = $result1*0.3;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
155
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
156 $result3 = $result2+$marks;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
157 $result4 = sqrt(914);
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
158 $result5 = $result4+914;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
159 $result6 = 0.3;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
160
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
161 $resultfinal = log($result3/$result5/$result6)/log(2);
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
162
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
163
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
164
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
165
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
166
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
167 push(@scorearray, $resultfinal);
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
168
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
169
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
170
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
171 }
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
172
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
173 if($digit =~ m/C/)
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
174
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
175 {
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
176
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
177 my $ref = \@matrix1;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
178
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
179 $marks = @{$ref}[$coll + 1];
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
180
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
181 $result1 = sqrt(914);
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
182 $result2 = $result1*0.2;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
183 $result3 = $result2+$marks;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
184 $result4 = sqrt(914);
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
185 $result5 = $result4+914;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
186 $result6 = 0.2;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
187
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
188 $resultfinal = log($result3/$result5/$result6)/log(2);
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
189
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
190 push(@scorearray, $resultfinal);
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
191
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
192
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
193 }
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
194
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
195
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
196 if($digit =~ m/G/)
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
197
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
198 {
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
199
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
200 my $ref = \@matrix1;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
201
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
202 $marks = @{$ref}[$coll+2];
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
203
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
204 $result1 = sqrt(914);
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
205 $result2 = $result1*0.2;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
206 $result3 = $result2+$marks;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
207 $result4 = sqrt(914);
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
208 $result5 = $result4+914;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
209 $result6 = 0.2;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
210
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
211 $resultfinal = log($result3/$result5/$result6)/log(2);
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
212
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
213
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
214 push(@scorearray, $resultfinal);
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
215
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
216 }
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
217
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
218 if($digit =~ m/T/)
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
219
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
220 {
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
221
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
222 my $ref = \@matrix1;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
223
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
224 $marks = @{$ref}[$coll+3];
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
225
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
226 $result1 = sqrt(914);
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
227 $result2 = $result1*0.3;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
228 $result3 = $result2+$marks;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
229 $result4 = sqrt(914);
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
230 $result5 = $result4+914;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
231 $result6 = 0.3;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
232
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
233 $resultfinal = log($result3/$result5/$result6)/log(2);
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
234
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
235
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
236 push(@scorearray, $resultfinal);
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
237
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
238 }
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
239
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
240 $coll=$coll + 4;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
241
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
242 }
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
243
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
244 @digit=();
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
245 my $tem=0;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
246
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
247
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
248 foreach $scorearray(@scorearray)
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
249 {
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
250
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
251 $tem = $tem + $scorearray;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
252
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
253
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
254 }
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
255
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
256 @scorearray = ();
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
257
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
258
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
259 my $fpercent = $tem;
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
260
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
261
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
262 if ($fpercent >= 18) {
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
263
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
264 print OUT $consensus, "\t", $entry1, "\t", $entry2 - 18 - $count2, "\t", $entry2 - $count2, "\t", "$fpercent", "\t", "-", "\n";
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
265
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
266
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
267 }
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
268
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
269 }
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
270
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
271
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
272 close ( OUT );
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
273 close ( IN );
2cceb9398d33 Uploaded
mkhan1980
parents:
diff changeset
274 close ( IN2 );