File: SeqAnal.t

package info (click to toggle)
bioperl 1.0-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 10,784 kB
  • ctags: 4,962
  • sloc: perl: 70,732; xml: 3,279; lisp: 107; makefile: 53
file content (39 lines) | stat: -rw-r--r-- 839 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
32
33
34
35
36
37
38
39
#-*-Perl-*-
## Bioperl Test Harness Script for Modules

# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.t'

use strict;

BEGIN {     
    # to handle systems with no installed Test module
    # we include the t dir (where a copy of Test.pm is located)
    # as a fallback
    eval { require Test; };
    if( $@ ) {
	use lib 't';
    }
    use Test;
    plan test => 1;
}

use Bio::Tools::SeqAnal;
use Bio::Tools::IUPAC;
use Bio::Seq;

# test IUPAC

my $ambiseq = new Bio::Seq (-seq => 'ARTCGTTGR', -type =>
			    'Dna'); 

my $stream  = new Bio::Tools::IUPAC('-seq' => $ambiseq);

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;