File: IUPAC.t

package info (click to toggle)
bioperl 1.6.1-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 40,768 kB
  • ctags: 12,005
  • sloc: perl: 174,299; xml: 13,923; sh: 1,941; lisp: 1,803; asm: 109; makefile: 53
file content (31 lines) | stat: -rw-r--r-- 598 bytes parent folder | download
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;