0 26 2 2699645 1 3 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 21 7 2699676 3 1 1 1 3 1 3 1 1 3 1 1 1 1 3 1 1 3 1 1 3 1 1 1 1 1 1 1
0 14 14 2699968 1 1 3 3 1 1 1 3 3 1 3 1 1 3 1 3 3 1 1 3 1 3 3 3 1 1 3 3
0 13 15 2700027 1 1 3 3 1 1 1 3 3 1 3 1 1 3 1 3 3 1 1 3 1 3 3 3 3 1 3 3
0 26 2 2700157 1 3 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 17 11 2700202 3 3 1 1 3 3 3 1 1 3 3 1 1 1 3 1 3 3 1 1 3 1 1 1 1 1 1 1
0 18 10 2700302 3 1 1 1 3 1 3 3 1 3 3 1 1 1 3 1 3 3 1 1 3 1 1 1 1 1 1 1
0 15 13 2700608 1 3 3 3 1 3 1 1 3 1 1 3 1 3 1 3 1 1 1 3 1 1 1 3 1 3 3 3
0 15 13 2700613 1 1 3 3 1 3 1 1 3 1 1 3 1 3 3 3 1 1 1 3 1 1 1 3 1 3 3 3
####
2699645 2
0
2699676 7
0
2699968 14
####
while($count < 155){
my $output_file = "$output_dir"."compute_minor_alleles_28_males."."$count".".txt";
open(OUT, ">$output_file");
print OUT "position\tminor allele frequency\n";
my $input_file = "$input_dir"."temp_file_". "$count."."txt";
open (CG, "<$input_file") or die "Cannot open $input_file:$!\n";
while (my $cg = ){
if ($cg =~ /NA/){
next;
}
chomp($cg); #get rid of newline character
@info = split(" ", $cg);