2 ## Bioperl Test Harness Script for Modules
8 eval { require Test::More; };
14 use_ok('Bio::Variation::Allele');
19 $a = Bio::Variation::Allele->new(-seq=>'ACTGACTGACTG',
20 -display_id => 'new-id',
22 -accession_number => 'X677667',
23 -desc=>'Sample Bio::Seq object');
24 isa_ok($a, 'Bio::Variation::Allele');
26 is $a->accession_number(), 'X677667';
27 is $a->seq(), 'ACTGACTGACTG';
28 is $a->display_id(),'new-id' ;
29 is $a->desc, 'Sample Bio::Seq object';
30 is $a->alphabet(), 'dna';
32 ok defined($trunc = $a->trunc(1,4));
33 is $trunc->seq(), 'ACTG', $trunc->seq();
35 ok defined($rev = $a->revcom());
36 is $rev->seq(), 'CAGTCAGTCAGT';
41 $a->repeat_unit('ACTG');
42 is $a->repeat_unit, 'ACTG';
45 is $a->repeat_count, 3;