Branch Coverage

Bio/SearchIO/blast.pm
Criterion Covered Total %
branch 339 390 86.9


line true false branch
419 1 91 if defined $rpttype
462 5339 15331 if /^\s+$/
463 2 15329 if /CPU time:/
464 0 15329 if /^>\s*$/
465 4 15325 if /[*]+\s+No hits found\s+[*]+/
466 85 15240 if (/^((?:\S+?)?BLAST[NPX]?)\s+(.+)$/i or /^(P?GENEWISE|HFRAME|SWN|TSWN)\s+(.+)/i) { }
73 15167 elsif (/^Reference:\s+(.*)$/) { }
9 15158 elsif (/^RID:\s+(.*)$/) { }
67 15091 elsif (/^(Searching|Results from round)/) { }
102 14989 elsif (/^Query=\s*(.*)$/) { }
1 14988 elsif (/^>Unfiltered[+-]1$/) { }
56 14932 elsif (/Sequences producing significant alignments:/) { }
26 14906 elsif (/Sequences producing High-scoring Segment Pairs:/) { }
77 14829 elsif (/^Database:\s*(.+?)\s*$/) { }
922 13907 elsif (/^(?:Subject=|>)\s*(\S+)\s*(.*)?/) { }
19 13888 elsif (/\s+(Plus|Minus) Strand HSPs:/i) { }
0 13888 elsif ($self->in_element('hit') || $self->in_element('hsp') and /Score\s*=\s*(\S+)\s*bits\s* # Bit score (?:\((\d+)\))?, # Raw score \s+Log\-Length\sScore\s*=\s*(\d+) # Log-Length score /ox) { }
0 13888 elsif ($self->in_element('hit') || $self->in_element('hsp') and /Score\s*=\s*([^,\s]+), # Raw score \s*Expect\s*=\s*([^,\s]+), # E-value \s*P(?:\(\S+\))?\s*=\s*([^,\s]+) # P-value /ox) { }
423 13465 elsif ($self->in_element('hit') || $self->in_element('hsp') and /Score\s*=\s*(\S+)\s* # Bit score \(([\d\.]+)\s*bits\), # Raw score \s*Expect\s*=\s*([^,\s]+), # E-value \s*(?:Sum)?\s* # SUM P(?:\(\d+\))?\s*=\s*([^,\s]+) # P-value (?:\s*,\s+Group\s*\=\s*(\d+))? # HSP Group /ox) { }
70 13395 elsif ($self->in_element('hit') || $self->in_element('hsp') and /^\sFeatures\s\w+\sthis\spart/mosx) { }
1200 12195 elsif ($self->in_element('hit') || $self->in_element('hsp') and /Score\s*=\s*(\S+)\s*bits\s* # Bit score (?:\((\d+)\))?, # Missing for BLAT pseudo-BLAST fmt \s*Expect(?:\((\d+\+?)\))?\s*=\s*([^,\s]+) # E-value /ox) { }
1623 10572 elsif ($self->in_element('hsp') and m[Identities\s*=\s*(\d+)\s*/\s*(\d+)\s*[\d\%\(\)]+\s* (?:,\s*Positives\s*=\s*(\d+)/(\d+)\s*[\d\%\(\)]+\s*)? # pos only valid for Protein alignments (?:\,\s*Gaps\s*=\s*(\d+)/(\d+))? # Gaps ]iox) { }
372 10200 elsif ($self->in_element('hsp') and m[Strand\s*=\s*(Plus|Minus)\s*/\s*(Plus|Minus)]i) { }
342 9858 elsif ($self->in_element('hsp') and /Links\s*=\s*(\S+)/ox) { }
308 9550 elsif ($self->in_element('hsp') and m[Frame\s*=\s*([\+\-][1-3])\s*(/\s*([\+\-][1-3]))?]) { }
83 9467 elsif (/^Parameters:/ or /^\s+Database:\s+?/ or /^\s+Subset/ or /^\s*Lambda/ or /^\s*Histogram/ or $self->in_element('hsp') and /WARNING|NOTE/) { }
9058 409 elsif ($self->in_element('hsp')) { }
474 0 85 if ($reportversion and $reportversion =~ /WashU$/)
478 5 80 if ($self->{'_seentop'})
484 4 76 if ($reporttype =~ /RPS-BLAST/)
543 65 2 unless $1 =~ /Results from round/
546 1 1 if $self->in_element('hsp')
548 1 1 if $self->in_element('hit')
550 1 1 if (defined $seeniteration) { }
551 1 0 if $self->within_element('iteration')
564 8 94 if (defined $seenquery)
566 4 4 if $reportline
569 14 80 unless (defined $reporttype)
571 0 14 if (defined $seeniteration) { }
572 0 0 if $self->in_element('iteration')
584 0 142 if (/^Database:/)
590 94 48 if (/\((\-?[\d,]+)\s+letters.*\)/ or /^Length=(\-?[\d,]+)/) { }
597 13 35 $q =~ /\w$/ && $_ =~ /^\w/ ? :
606 89 5 if $nm
618 55 39 if defined $desc
626 27 67 defined $version && length $version ? :
627 89 5 if $acc
641 20 74 if $self->{'_blsdb_length'}
647 20 74 if $self->{'_blsdb_letters'}
653 20 74 if $self->{'_blsdb_letters'}
676 50 6 unless ($self->in_element('iteration'))
686 105 1249 if ($descline =~ /^\s*$/)
687 50 55 if $seen_block
693 3 1246 if ($descline =~ /^(\S+)\s+Begin:\s\d+\s+End:\s+\d+/msx)
699 1243 6 if ($descline =~ /(?
0 6 elsif ($descline =~ /^CONVERGED/i) { }
718 0 1243 if ($3)
744 23 3 unless ($self->in_element('iteration'))
766 75 80 if (/^\s+(\-?[\d\,]+|\S+)\s+sequences\; \s+(\-?[\d,]+|\S+)\s+ # Deal with NCBI 2.2.8 OSX problems total\s+letters/ox) { }
811 834 88 if $self->in_element('hsp')
813 834 88 if $self->in_element('hit')
818 2 920 if (not $self->within_element('result')) { }
2 918 elsif (not $self->within_element('iteration')) { }
852 14 628 if (not $tableid =~ /\Q$id\E/) { }
860 3 1458 if /^\s+$/
862 922 536 if (/Length\s*=\s*([\d,]+)/) { }
874 519 17 unless ($restofline =~ /\s$/)
877 12 524 $restofline =~ /\w$/ && $_ =~ /^\w/ ? :
902 0 0 if $self->in_element('hsp')
939 0 0 if $self->in_element('hsp')
947 0 0 if $evalue =~ /^e/
948 0 0 if $pvalue =~ /^e/
981 330 93 if $self->in_element('hsp')
1016 29 394 if (defined $group)
1033 66 4 if $self->in_element('hsp')
1063 1130 70 unless ($self->{'_seen_hsp_features'})
1064 305 825 if $self->in_element('hsp')
1090 31 1169 if defined $n
1096 0 1200 unless defined $score
1120 1251 372 if (defined $3) { }
1136 787 836 if (defined $6)
1148 44 1579 if (/(Frame\s*=\s*.+)$/)
1159 2 370 unless (defined $reporttype)
1182 4 304 unless (defined $reporttype)
1184 1 3 if ($frame1 and $frame2) { }
1201 3 3 if ($line =~ /^(?:Query|Sbjct):?\s+(\-?\d+)?\s*(\S+)\s+(\-?\d+)?/)
1213 1 2 $a_position < $b_position ? :
1215 2 1 $coord_length == $ali_length * 3 ? :
1224 187 121 if ($reporttype eq 'TBLASTX') { }
95 26 elsif ($reporttype eq 'TBLASTN' or $reporttype eq 'PSITBLASTN') { }
26 0 elsif ($reporttype eq 'BLASTX' or $reporttype eq 'RPS-BLAST(BLASTP)') { }
1235 0 26 if ($reporttype eq 'RPS-BLAST(BLASTP)')
1270 78 5 if $self->in_element('hsp')
1272 78 5 if $self->in_element('hit')
1277 6 77 if scalar @hit_signifs
1278 81 2 if $self->within_element('iteration')
1281 0 83 if /^\s+Subset/
1282 57 26 /^(\s+Database\:)|(\s*Lambda)/ ? :
1283 0 83 if (/^\s*Histogram/)
1299 15 2804 if (/^\s+[\d+\.]+\s+[\d+\.]+\s+[\d+\.]/ and $last eq '') { }
5 2799 elsif (/^((?:\S+)?BLAST[NPX]?)\s+(.+)$/i or /^(P?GENEWISE|HFRAME|SWN|TSWN)\s+(.+)/i) { }
4 2795 elsif (/^Query=/) { }
1317 4 0 if $reportline
1323 125 2670 if (/Number of Sequences:\s+([\d\,]+)/i or /of sequences in database:\s+(\-?[\d,]+)/i) { }
73 2597 elsif (/letters in database:\s+(\-?[\d,]+)/i) { }
0 2597 elsif ($blast eq 'btk') { }
985 1612 elsif ($blast eq 'wublast') { }
1612 0 elsif ($blast eq 'ncbi') { }
1351 29 956 if (/E=(\S+)/) { }
2 954 elsif (/nogaps/) { }
26 928 elsif (/ctxfactor=(\S+)/) { }
34 894 elsif (/(postsw|links|span[12]?|warnings|notes|gi|noseqs|qres|qype)/) { }
141 753 elsif (/(\S+)=(\S+)/) { }
26 727 elsif ($last =~ /(Frame|Strand)\s+MatID\s+Matrix name/i) { }
26 701 elsif ($last =~ /(Frame|Strand)\s+MatID\s+Length/i) { }
23 678 elsif (/(\S+\s+\S+)\s+DFA:\s+(\S+)\s+\((.+)\)/) { }
0 678 elsif (/^\s+Time to generate neighborhood:\s+ (\S+\s+\S+\s+\S+)/x) { }
23 655 elsif (/processors\s+used:\s+(\d+)/) { }
46 609 elsif (/^\s+(\S+)\s+cpu\s+time:\s+ # cputype (\S+\s+\S+\s+\S+) # cputime \s+Elapsed:\s+(\S+)/x) { }
23 586 elsif (/^\s+Start:/) { }
21 565 elsif (/^\s+Database:\s+(.+)$/) { }
21 544 elsif (/^\s+Posted:\s+(.+)/) { }
1400 24 84 if ($firstgapinfo and s/Q=(\d+),R=(\d+)\s+//x) { }
1425 0 72 if $type eq 'n/a'
1426 0 72 unless (@fields)
1442 26 58 unless (defined $frame)
1483 48 456 unless defined $f
1484 72 384 if ($f eq 'same')
1510 0 0 if (@fields <= 3) { }
1512 0 0 unless @fields
1544 23 0 if ($1 eq 'states in') { }
0 0 elsif ($1 eq 'size of') { }
1641 55 1557 if (/^Matrix:\s+(.+)\s*$/iox) { }
49 1508 elsif (/^Gapped/) { }
107 1401 elsif (/^Lambda/) { }
54 1347 elsif (/effective\s+search\s+space\s+used:\s+(\d+)/iox) { }
48 1299 elsif (/effective\s+search\s+space:\s+(\d+)/iox) { }
48 1251 elsif (/Gap\s+Penalties:\s+Existence:\s+(\d+)\, \s+Extension:\s+(\d+)/ox) { }
45 1206 elsif (/effective\s+HSP\s+length:\s+(\d+)/) { }
34 1172 elsif (/Number\s+of\s+HSP's\s+better\s+than\s+(\S+)\s+without\s+gapping:\s+(\d+)/) { }
7 1165 elsif (/Number\s+of\s+HSP's\s+gapped:\s+(\d+)/) { }
7 1158 elsif (/Number\s+of\s+HSP's\s+successfully\s+gapped:\s+(\d+)/) { }
6 1152 elsif (/Length\s+adjustment:\s+(\d+)/) { }
48 1104 elsif (/effective\s+length\s+of\s+query:\s+([\d\,]+)/i) { }
51 1053 elsif (/effective\s+length\s+of\s+database:\s+([\d\,]+)/i) { }
325 728 elsif (/^(T|A|X1|X2|X3|S1|S2):\s+(\d+(\.\d+)?)\s+(?:\(\s*(\d+\.\d+) bits\))?/) { }
14 714 elsif (/frameshift\s+window\, \s+decay\s+const:\s+(\d+)\,\s+([\.\d]+)/x) { }
52 662 elsif (/^Number\s+of\s+Hits\s+to\s+DB:\s+(\S+)/ox) { }
51 611 elsif (/^Number\s+of\s+extensions:\s+(\S+)/ox) { }
51 560 elsif (/^Number\s+of\s+successful\s+extensions:\s+ (\S+)/ox) { }
52 508 elsif (/^Number\s+of\s+sequences\s+better\s+than\s+ (\S+):\s+(\d+)/ox) { }
50 458 elsif (/^\s+Posted\s+date:\s+(.+)/) { }
225 233 elsif (not /^\s+$/) { }
1656 49 58 if ($gapped_stats) { }
1803 235 90 if (defined $4)
1905 0 27150 if ($i == 0 and /^\s+$/ or /^\s*(?:Lambda|Minus|Plus|Score)/i)
1908 0 0 if defined $_
1913 18116 9034 if (/^((Query|Sbjct):?\s+(\-?\d+)?\s*)(\S+)\s+(\-?\d+)?/) { }
0 9034 elsif (/^((Query|Sbjct):?\s+(\-?0+)\s*)/) { }
1917 48 18068 if ($str eq '-') { }
1918 24 24 if $type eq 'Sbjct'
1925 3246 14870 unless $$self{"_$type"}{'begin'}
1932 0 9034 unless defined $_ and defined $len
1963 96 6 if ($self->{'_seentop'})
1964 9 87 if $self->within_element('hsp')
1966 9 87 if $self->within_element('hit')
1969 2 94 if scalar @hit_signifs
1970 11 85 if $self->within_element('iteration')
1972 6 90 if ($bl2seq_fix)
2038 8178 338 defined $self->{'_will_handle_cache'}{$type} ? :
2041 8516 0 $will_handle ? :
2060 4258 0 if ($type)
2062 4258 0 if ($handler)
2073 96 4162 if ($type eq 'result') { }
2078 4162 0 if (defined $self->{'_values'})
2109 86 42921 if ($nm eq 'BlastOutput_program')
2110 83 3 if ($self->{'_last_data'} =~ /(t?blast[npx])/i)
2116 80 42927 if ($nm eq 'BlastOutput_version')
2122 1623 41384 if ($nm eq 'Hsp')
2129 4845 1647 if defined $self->{'_last_hspdata'}{$_}
2161 4258 38749 if ($type = $Bio::SearchIO::blast::MODEMAP{$nm}) { }
38562 187 elsif ($Bio::SearchIO::blast::MAPPING{$nm}) { }
2163 4258 0 if ($handler)
2171 2900 35662 if (ref($Bio::SearchIO::blast::MAPPING{$nm}) =~ /hash/i) { }
2188 96 42911 if defined $type and $type eq 'result'
2226 32019 33904 if ($self->in_element('hsp') and $data->{'Name'} =~ /^Hsp\_(qseq|hseq|midline)$/)
2230 31995 24 if defined $data->{'Data'}
2232 70 65853 unless defined $data->{'Data'} and not $data->{'Data'} =~ /^\s+$/
2254 2 2212 if not defined $name || defined $self->{'_elements'} or scalar @{$self->{'_elements'};} == 0
2256 1949 1185 if ($_ eq $name)
2279 119 263910 unless defined $self->{'_elements'}[0]
2323 0 5 unless (defined $self->writer)
2425 0 1524 unless defined $v
2442 1524 0 if (defined $v)
2449 0 1524 if (exists $self->{'_wublast'}) { }