Branch Coverage

Bio/Structure/IO/pdb.pm
Criterion Covered Total %
branch 231 398 58.0


line true false branch
105 0 3 if $noheader
106 0 3 if $noatom
134 0 2 unless (defined $line)
138 0 2 if ($line =~ /^\s+$/)
140 0 0 if $line =~ /\S/
143 0 2 unless (defined $line)
146 0 2 unless $line =~ /^HEADER\s+\S+/
161 2 290 if /^(MODEL|ATOM|HETATM)/
164 0 290 if (/^OBSLTE / and $all_headers)
170 1 289 if (/^TITLE / and $all_headers)
176 0 290 if (/^CAVEAT / and $all_headers)
182 2 288 if (/^COMPND / and $all_headers)
189 2 288 if (/^SOURCE / and $all_headers)
195 1 289 if (/^KEYWDS / and $all_headers)
201 1 289 if (/^EXPDTA / and $all_headers)
207 2 288 if (/^AUTHOR / and $all_headers)
214 3 287 if (/^REVDAT / and $all_headers)
224 0 290 if (/^SPRSDE / and $all_headers)
230 2 288 if (/^JRNL / and $all_headers)
239 240 50 if (/^REMARK\s+(\d+)\s*/ and $all_headers)
241 2 238 if ($remark_num == 1)
252 240 0 if (/^REMARK\s+(\d+)\s*/)
254 240 0 if ($r_num != 1)
264 3 287 if (/^DBREF / and $all_headers)
278 0 290 if (/^SEQADV / and $all_headers)
286 8 282 if (/^SEQRES / and $all_headers)
292 0 290 if (/^MODRES / and $all_headers)
298 3 287 if (/^HET / and $all_headers)
304 1 289 if (/^HETNAM / and $all_headers)
310 0 290 if (/^HETSYN / and $all_headers)
316 4 286 if (/^FORMUL / and $all_headers)
323 2 288 if (/^HELIX / and $all_headers)
330 3 287 if (/^SHEET / and $all_headers)
337 0 290 if (/^TURN / and $all_headers)
345 3 287 if (/^SSBOND / and $all_headers)
353 3 287 if (/^LINK / and $all_headers)
361 0 290 if (/^HYDBND / and $all_headers)
369 0 290 if (/^SLTBRG / and $all_headers)
377 0 290 if (/^CISPEP / and $all_headers)
384 0 290 if (/^SITE / and $all_headers)
392 2 288 if (/^CRYST1/ and $all_headers)
399 6 284 if (/^(ORIGX\d) / and $all_headers)
406 6 284 if (/^(SCALE\d) / and $all_headers)
413 0 290 if (/^(MTRIX\d) / and $all_headers)
420 1 289 if (/^TVECT / and $all_headers)
431 2 0 if (%header)
439 2 0 if (%remark)
454 2 0 if (defined $buffer and $buffer =~ /^(ATOM |MODEL |HETATM)/) { }
461 2 0 if ($buffer and not $buffer =~ /^MODEL /)
475 19 4 if (/^CONECT/)
485 158 32 unless $conect[$k] =~ /^\d+$/
487 32 0 if ($k <= 3) { }
0 0 elsif ($k >= 4 and $k <= 5 or $k >= 7 and $k <= 8) { }
0 0 elsif ($k == 6 or $k == 9) { }
505 2 21 if (/^MASTER /)
511 2 21 if (/^END/)
534 0 1 unless (defined $struc)
538 0 1 unless (ref $struc and $struc->isa('Bio::Structure::StructureI'))
544 1 0 if (defined $ann) { }
550 0 0 unless ($id)
553 0 0 if (length $id > 4)
568 0 1 if exists $header{'obslte'}
571 1 0 if exists $header{'title'}
574 0 1 if exists $header{'caveat'}
577 1 0 if exists $header{'compnd'}
580 1 0 if exists $header{'source'}
583 1 0 if exists $header{'keywds'}
586 1 0 if exists $header{'expdta'}
589 1 0 if exists $header{'author'}
592 1 0 if exists $header{'revdat'}
595 0 1 if exists $header{'sprsde'}
600 0 1 unless (exists $header{'jrnl'})
604 1 0 if (not $jrnl_done) { }
605 1 0 if $ref->authors
607 1 0 if $ref->title
609 0 1 if $ref->editors
611 1 0 if $ref->location
613 0 1 if $ref->editors
615 1 0 if $ref->encoded_ref
619 0 0 unless ($remark_1_counter)
628 0 0 if $ref->authors
630 0 0 if $ref->title
632 0 0 if $ref->editors
634 0 0 if $ref->location
636 0 0 if $ref->editors
638 0 0 if $ref->encoded_ref
643 1 0 unless (defined $remark_1_counter)
651 25 13 unless $key =~ /^remark_(\d+)$/
652 0 13 if $1 == 1
659 1 0 if exists $header{'dbref'}
661 0 1 if exists $header{'seqadv'}
663 1 0 if exists $header{'seqres'}
665 0 1 if exists $header{'modres'}
667 1 0 if exists $header{'het'}
669 1 0 if exists $header{'hetnam'}
671 0 1 if exists $header{'hetsyn'}
673 1 0 if exists $header{'formul'}
675 0 1 if exists $header{'helix'}
677 0 1 if exists $header{'sheet'}
679 0 1 if exists $header{'turn'}
681 0 1 if exists $header{'ssbond'}
683 1 0 if exists $header{'link'}
685 0 1 if exists $header{'hydbnd'}
687 0 1 if exists $header{'sltbrg'}
689 0 1 if exists $header{'cispep'}
691 0 1 if exists $header{'site'}
693 1 0 if exists $header{'cryst1'}
698 3 0 if exists $header{$origxn}
704 3 0 if exists $header{$scalen}
710 0 3 if exists $header{$mtrixn}
713 1 0 if exists $header{'tvect'}
720 1 0 if (exists $header{'het'})
731 0 1 if ($struc->get_models > 1)
741 1 3 if ($chain_id eq 'default')
748 45 126 if ($het_res{$resname}) { }
749 0 45 if ($resname ne 'HOH' and $last_record eq 'ATOM ')
757 0 0 $atom_icode ? :
778 171 0 if (defined $pdb_atomname) { }
783 0 0 if (defined $element and $element ne 'H') { }
787 0 0 if (length $element == 2) { }
793 0 0 if ($atom->id =~ /^\dH/) { }
0 0 elsif (length $atom_id == 4) { }
796 0 0 if ($atom_id =~ /^(H\d\d)(\d)$/) { }
811 0 171 $atom->icode ? :
819 0 171 $atom->segID ? :
822 171 0 $atom->element ? :
825 0 171 $atom->charge ? :
833 3 1 if ($resname ne 'HOH')
840 0 3 $atom_icode ? :
845 0 1 if ($struc->get_models > 1)
860 12 0 if ($type eq 'bond') { }
0 0 elsif ($type eq 'hydrogenbonded') { }
0 0 elsif ($type eq 'saltbridged') { }
877 12 20 $b ? :
881 0 16 $hb ? :
884 0 8 $sb ? :
887 0 16 $hb ? :
890 0 8 $sb ? :
920 0 0 if (defined $value)
941 0 2 if (defined $value)
962 0 2 if (defined $value)
985 0 9 if ($begin == 12) { }
992 16 9 if (/^$record/) { }
994 7 9 if ($cont =~ /\d$/ and $begin == 11)
1029 13 2 if (/^JRNL /) { }
1033 4 9 if $subr eq 'AUTH'
1034 5 8 if $subr eq 'TITL'
1035 0 13 if $subr eq 'EDIT'
1036 2 11 if $subr eq 'REF'
1037 0 13 if $subr eq 'PUBL'
1038 2 11 if $subr eq 'REFN'
1039 0 13 if $subr eq 'PMID'
1040 0 13 if $subr eq 'DOI'
1082 57 2 if (/^REMARK 1 /) { }
1083 8 49 if (/^REMARK 1\s+REFERENCE\s+(\d+)\s*/) { }
1085 7 1 if ($refnum != 1)
1102 11 38 if $subr eq 'AUTH'
1103 20 29 if $subr eq 'TITL'
1104 0 49 if $subr eq 'EDIT'
1105 8 41 if $subr eq 'REF'
1106 0 49 if $subr eq 'PUBL'
1107 8 41 if $subr eq 'REFN'
1108 0 49 if $subr eq 'PMID'
1109 0 49 if $subr eq 'DOI'
1113 1 1 unless (defined $refnum)
1170 0 659 if (/^MODEL\s+(\d+)/)
1174 0 0 if (/^MODEL\s+\d+\s+\S+/)
1180 653 6 if (/^(ATOM |HETATM|SIGATM)/)
1186 2175 7620 if $line_elements[$k] =~ /^\s*$/
1190 527 126 unless defined $chainID
1191 5 648 if ($chainID ne $chain_name)
1196 0 5 if (exists $_ch_in_model{$chainID}) { }
1208 0 653 if $icode
1209 157 496 if ($res_name_num ne $residue_name)
1217 0 653 if ($noatom)
1222 0 0 if ($altloc and $altloc =~ /\S+/ and $atomname eq $atom_name)
1226 653 0 if (/^(ATOM |HETATM)/) { }
1240 653 0 unless ($old)
1251 0 0 if ($atom_name ne $atomname)
1264 0 659 if (/^(ANISOU|SIGUIJ)/)
1265 0 0 if ($noatom)
1273 0 0 if $line_elements[$k] =~ /^\s*$/
1278 0 0 if ($altloc and $altloc =~ /\S+/ and $atomname eq $atom_name)
1282 0 0 if (/^ANISOU/) { }
1283 0 0 if ($atom_name ne $atomname)
1294 0 0 if ($atom_name ne $atomname)
1307 4 655 if (/^TER /)
1312 0 655 if (/^ENDMDL/)
1317 2 653 if (/^(CONECT|MASTER)/)
1342 0 38 if (defined $string and defined $annotation)
1348 4 34 if ($string) { }
1349 2 2 if (length $string > $rol_length) { }
1358 0 21 if ($t == 0)
1380 10 28 if ($cont) { }
1382 6 4 if ($ann_length > $rol_length) { }
1391 6 9 if ($first_line) { }
1397 4 2 if ($rol_begin - $c_end == 1)
1403 6 3 if ($rol_begin - $c_end == 1) { }
1421 0 28 if ($ann_length < $rol_length) { }