5 my ($list,$store,$output) = @ARGV;
7 open LI
,"<$list" or die($!);
8 open OUT
,">$output" or die($!);
12 my @ID = split /\s+/,$_;
20 my $file = "$store/r$ID[2].cpie";
21 open IN
,"<$file" or die($!);
22 while (my $line = <IN
>){
24 next if ($line =~ /^#/);
25 my @data = split /[\t\/;]/,$line;
27 unless ($data[10] eq $data[11]){
32 my $file = "$store/p$ID[2].$tag[$i].tsv";
33 open IN
,"<$file" or die($!);
34 while (my $line = <IN
>){
36 my @data = split /\t/,$line;
37 next if ($data[3] eq '.' or $data[3] < 100);
38 my @tM = splice @data,4;
43 my @Depinfo = split /[;,]/,$_;
44 for my $i (1..scalar @Depinfo - 1){
45 if ($Depinfo[$i] eq '.'){$Depinfo[$i] = 0;}
46 $Dep{$i - 1} += $Depinfo[$i];
47 $depsum += $Depinfo[$i];
55 next if ($depcheck == 0);
58 my @values = sort {$b<=>$a} values %Dep;
59 if (scalar @values > 1){
60 if ($values[1] > $values[0] * 0.1){
68 print OUT
"$id\t$hete/$total\t",$hete/$total,"\n";
70 print OUT
"$id\t$hete/$total\t","NA","\n";