5 open I1
, "<", "scaffold75SNP.18.gt";
6 open I2
, "<", "scaffold1458SNP.18.gt";
7 open O
, ">", "scaffold75_1458SNP.16.gt";
9 print O
"#Scaffold\tPosition\tJHH001\tGZXJ03\tGZXJ05\tGZXJ26\tGZXJ27\tGZXJ28\tGZXJ29\tGZXJ30\tGZXJ33\tBHX011\tBHX019\tGZXJ04\tGZXJ06\tGZXJ31\tGZXJ32\tGZXJ38\n";
15 my @b = split /\//, $a[$_];
16 $a[$_] = "$a[2]/$a[2]" if (($b[0] eq 0) and ($b[1] eq 0));
17 $a[$_] = "$a[3]/$a[3]" if (($b[0] eq 1) and ($b[1] eq 1));
18 $a[$_] = "$a[2]/$a[3]" if (($b[0] eq 0) and ($b[1] eq 1));
19 $a[$_] = "$a[3]/$a[2]" if (($b[0] eq 1) and ($b[1] eq 0));
23 print O
(join "\t", @a), "\n";
31 my @b = split /\//, $a[$_];
32 $a[$_] = "$a[2]/$a[2]" if (($b[0] eq 0) and ($b[1] eq 0));
33 $a[$_] = "$a[3]/$a[3]" if (($b[0] eq 1) and ($b[1] eq 1));
34 $a[$_] = "$a[2]/$a[3]" if (($b[0] eq 0) and ($b[1] eq 1));
35 $a[$_] = "$a[3]/$a[2]" if (($b[0] eq 1) and ($b[1] eq 0));
39 print O
(join "\t", @a), "\n";