2 ## Bioperl Test Harness Script for Modules
5 # Before `make install' is performed this script should be runnable with
6 # `make test'. After `make install' it should work as `perl test.t'
11 # to handle systems with no installed Test module
12 # we include the t dir (where a copy of Test.pm is located)
14 eval { require Test; };
21 use Bio::Structure::Entry;
22 use Bio::Structure::IO;
28 my $pdb_file = Bio::Root::IO->catfile("t","data","pdb1bpt.ent"); # BPTI
29 my $structio = Bio::Structure::IO->new(-file => $pdb_file, -format => 'PDB');
31 my $struc = $structio->next_structure;
33 ok(ref($struc), "Bio::Structure::Entry");
35 # some basic checks, Structure objects are tested in Structure.t
36 my ($chain) = $struc->chain;
37 ok($struc->residue, 97);
38 my ($atom) = $struc->get_atom_by_serial(367);
40 ok($struc->parent($atom)->id, "LYS-46");
41 my ($ann) = $struc->annotation->get_Annotations("author");
42 ok($ann->as_text, "Value: D.HOUSSET,A.WLODAWER,F.TAO,J.FUCHS,C.WOODWARD ");
44 my $pseq = $struc->seqres;
45 ok($pseq->subseq(1,20), "RPDFCLEPPYTGPCKARIIR");