annotate check.pl @ 4:c30f1e611791 draft

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