6 open OUT
,">$output" or die($!);
9 my @path = split /\//,$qc_dir;
10 my $now = $path[scalar @path - 2];
11 my @useless = splice @path,scalar @path - 2;
12 my $total_dir = join "/",@path;
13 my @content = readpipe
("ls -F $total_dir");
18 if ($_ =~ /^\d+CG\S+\/$/ or $_ =~ /^\d
+CG\S
+\@
$/){
21 my ($date) = $_ =~ /^(\d+)CG/;
27 if ($now =~ /^\d+CG/){
28 my ($nowtime) = $now =~ /^(\d+)CG/;
29 foreach my $dir (sort {$chips{$b}<=>$chips{$a}} keys %chips){
30 next if ($dir eq $now);
31 next unless (-e
"$total_dir/$dir/6record");
32 if ($chips{$dir} eq $nowtime){
34 }elsif ($chips{$dir} < $nowtime && scalar @dirs < 3){
40 my (%nFs,%aFs,%store);
41 foreach my $take_dir (@dirs){
42 my $list = "$total_dir/$take_dir/family.lst";
43 open LI
,"<$list" or die($!);
44 while (my $info = <LI
>){
46 next unless ($info =~ /\S+/);
47 my ($M,$F,$C) = split /\s+/,$info;
50 if ($take_dir eq $now){
54 $store{$M} = "$total_dir/$take_dir/4tsv";
55 $store{$F} = "$total_dir/$take_dir/4tsv";
60 my @now_fathers = sort keys %nFs;
61 my @all_fathers = sort keys %aFs;
63 print OUT
join("\t",@all_fathers),"\n";
64 foreach my $F1 (@now_fathers){
67 foreach my $F2 (@all_fathers){
71 my ($err,$total) = (0,0);
72 foreach my $locus (keys %one){
73 if (defined $two{$locus}){
75 unless ($one{$locus} eq $two{$locus}){
81 push @value,$err / $total;
86 print OUT
join("\t",@value),"\n";
90 ##########################################
93 my $file = "$store{$tag}/$aFs{$tag}.tsv";
94 open TE
,"<$file" or die($!);
97 my @data = split /\t/,$_;
98 next unless ($data[3] > 100);
99 my @geno = splice @data,4;
103 my @info = split /;/,$_;
104 my @alleles = split /\//,$info[0];
105 my @sort = sort @alleles;
106 my $allele = join "/",@sort;
109 foreach my $allele (keys %check){
110 if ($check{$allele} == scalar @geno){
111 $hash->{$data[0]} = $allele;