1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
# -*-Perl-*- Test Harness script for Bioperl
# $Id: IUPAC.t 15112 2008-12-08 18:12:38Z sendu $
use strict;
BEGIN {
use lib '.';
use Bio::Root::Test;
test_begin(-tests => 4);
use_ok('Bio::Tools::IUPAC');
use_ok('Bio::Seq');
}
# test IUPAC
my $ambiseq = Bio::Seq->new(-seq => 'ARTCGTTGR',
-alphabet => 'dna');
my $stream = Bio::Tools::IUPAC->new('-seq' => $ambiseq);
is $stream->count(), 4;
my $b = 1;
while (my $uniqueseq = $stream->next_seq()) {
if( ! $uniqueseq->isa('Bio::Seq') ) {
$b = 0;
last; # no point continuing if we get here
}
}
ok $b;
|