7 $fname =~ /\b(chr\w+)\b/;
12 warn "($chrid,$fname)\n";
13 my (@OutFH,@remained);
15 open IN
,'<',$fname or die $!;
19 open $t,'>',"dat/${chrid}.s$_.msmcdat" or die $!;
26 my @dat = split /\t/,$_;
27 #print "[$dat[-1]]\n";
28 #next if length $dat[-1] != 54;
29 next unless $dat[2] > 0;
30 unless ($dat[-1] =~ /^[ATCG]+$/) {
31 warn "[!]$dat[-1].\n";
32 $remained[$_] += $dat[2] for @indcnt;
37 my $str = substr $dat[-1],0,$cnt;
39 ++$test{$_} for (split //,$str);
40 if ( (sort {$a<=>$b} values %test)[0] == $cnt ) {
41 $remained[$c] += $dat[2];
45 my $value3 = $dat[2] + $remained[$c];
47 print $FH join("\t",@dat[0,1],$value3,$str),"\n";
53 close $OutFH[$_] for @indcnt;
56 ls
-1 20141118_high_coverage
.chr*.msmcdat
|xargs
-n1
./cutmsmcdat
.pl
58 msmc2
--fixedRecombination
-o out
.s5
.msmc2 chr1s5
.msmcdat
60 msmc
--fixedRecombination
-o out1
/s5 dat/chr
*.s5
.msmcdat
61 msmc2
-o out2
/s5 dat/chr
*.s5
.msmcdat