my @c = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
my @g = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
my @t = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+my @n = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
$calls{'A'} = \@a;
$calls{'C'} = \@c;
$calls{'G'} = \@g;
$calls{'T'} = \@t;
+$calls{'N'} = \@t;
my $count = 0;
my $length;
while( my $read = <>) {
chomp $read;
+ my @a = split(/\s+/,$read);
+ $read = $a[0];
$length = length($read);
$count++;
for(0..$length-1) {
my $base = uc(substr($read,$_,1));
- $calls{$base}[$_] += 1;
+ if($base eq 'A' || $base eq 'C' || $base eq 'G' || $base eq 'T' || $base eq 'N') {
+ $calls{$base}[$_] += 1;
+ }
}
}