2 ## Bioperl Test Harness Script for Modules
8 # to handle systems with no installed Test module
9 # we include the t dir (where a copy of Test.pm is located)
11 eval { require Test; };
18 use Bio::Variation::Allele;
24 $a = Bio::Variation::Allele->new(-seq=>'ACTGACTGACTG',
25 -display_id => 'new-id',
27 -accession_number => 'X677667',
28 -desc=>'Sample Bio::Seq object');
30 ok ref($a), 'Bio::Variation::Allele';
32 ok $a->accession_number(), 'X677667';
33 ok $a->seq(), 'ACTGACTGACTG';
34 ok $a->display_id(),'new-id' ;
35 ok $a->desc, 'Sample Bio::Seq object';
36 ok $a->alphabet(), 'dna';
38 ok defined($trunc = $a->trunc(1,4));
39 ok $trunc->seq(), 'ACTG', "Expecting ACTG. Got ". $trunc->seq();
41 ok defined($rev = $a->revcom());
42 ok $rev->seq(), 'CAGTCAGTCAGT';
47 $a->repeat_unit('ACTG');
48 ok $a->repeat_unit, 'ACTG';
51 ok $a->repeat_count, 3;