1 # -*-Perl-*- Test Harness script for Bioperl
10 test_begin(-tests => 9);
12 use_ok('Bio::Tools::SeqPattern');
15 my ( $pattern,$pattern_obj,$pattern_obj2, $pattern_obj3);
17 $pattern = '(CCCCT)N{1,200}(agyyg)N{1,80}(ag)';
18 ok $pattern_obj = Bio::Tools::SeqPattern->new(-SEQ =>$pattern, -TYPE =>'dna');
19 isa_ok $pattern_obj, 'Bio::Tools::SeqPattern';
21 $pattern_obj2 = $pattern_obj->revcom();
22 is $pattern_obj2->str, '(CT)N(CRRCT){1,80}N(AGGGG){1,200}';
24 $pattern_obj3 = $pattern_obj->revcom(1);
25 is $pattern_obj3->str, '(CT).{1,80}(C[GA][GA]CT).(AGGGG){1,200}';
27 $pattern = '(CCCCT)N{1,200}(agyyg)N{1,80}(bb)'; # test protein object expand
28 ok $pattern_obj = Bio::Tools::SeqPattern->new(-SEQ =>$pattern, -TYPE =>'protein');
29 isa_ok $pattern_obj, 'Bio::Tools::SeqPattern';
31 is $pattern_obj2->expand, '(CT).(C[AG][AG]CT){1,80}.(AGGGG){1,200}';
36 $pattern_obj2 = Bio::Tools::SeqPattern->new(-SEQ =>$pattern,
38 is $pattern_obj2->expand, 'A[EQ][DN]H';