4 use Data
::Dump
qw(ddx);
6 my ($flag,$minaln,$ia,$ib,$E,$line,$qSt,$qEd,$sSt,$sEd,@Q,@S)=(1,200);
9 my ($ia,$ib,$qSt,$qEd,$sSt,$sEd)=@_;
10 for my $i ($qSt .. $qEd) {
11 #$Q[$i] = $ia if (!defined($Q[$i])) or $Q[$i] < $ia;
14 for my $i ($sSt .. $sEd) {
15 #$S[$i] = $ib if (!defined($S[$i])) or $S[$i] < $ib;
20 open I
,'<','tig2cat.blast' or die $!;
22 Score = 2.188e+04 bits (11039), Expect = 0.0
23 Identities = 12026/12360 (97%), Gaps = 72/12360 (0%)
28 unless ($line =~/^ Score = /) {
29 defined($line = readline(I
)) or $flag=0;
32 $line =~ / Expect = ([\d\.+-e]+)$/ or die "[$line]";
34 $E = "1$E" if $E=~/^e/i;
37 $line =~ /^ Identities = (\d+)\/(\d
+) / or die;
39 next if ($ia<$minaln or $ib<$minaln);
41 unless ($line =~ /^ Strand = Plus \/ Plus
/) {
44 defined($line = readline(I
)) or $flag=0;
47 my (@QSt,@QEd,@SSt,@SEd);
48 while ($line = readline(I
)) {
49 last if $line =~/^ Score = /;
50 if ($line =~/^Query: (\d+) [^\d]+(\d+)$/) {
54 if ($line =~/^Sbjct: (\d+) [^\d]+(\d+)$/) {
59 $qSt=$QSt[0]; $qEd=$QEd[-1];
60 $sSt=$SSt[0]; $sEd=$SEd[-1];
61 setQS
($ia,$ib,$qSt,$qEd,$sSt,$sEd);
63 #print "$ia,$ib,$E,$qSt,$qEd,$sSt,$sEd\n";
68 my ($Ql,$Sl,%Qh,%Sh)=(0,0);
85 warn "Q:$Ql\nS:$Sl\n";
98 no repeat filter
(directly
++)
104 tiger75n1458
12958419