File: SNP.t

package info (click to toggle)
bioperl 1.4-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 20,336 kB
  • ctags: 8,476
  • sloc: perl: 119,890; xml: 6,001; lisp: 121; makefile: 57
file content (44 lines) | stat: -rw-r--r-- 875 bytes parent folder | download | duplicates (2)
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
40
41
42
43
44
# -*-Perl-*-
## Bioperl Test Harness Script for Modules
## $Id: SNP.t,v 1.1 2003/05/14 12:04:06 heikki Exp $

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 tests => 13 }


use Bio::Variation::SNP;

ok(1);

my($a);

#
# SNP
#

ok $a = new Bio::Variation::SNP;
ok $a->id('123'), 123;
eval { $a->di('123'); };
ok 1 if $@;
ok $a->validated('by-cluster'), 'by-cluster';
my @alleles = ('A', 'T');
ok $a->validated(\@alleles), \@alleles;
ok $a->desc('abc'), 'abc'; # Bio::Variation::Allele method
ok $a->chromosome('X'), 'X'; # Bio::Variation::Allele method
ok my $s = $a->add_subsnp;
ok $s->is_subsnp;
ok $s->handle('HGBASE'), 'HGBASE';
ok $a->add_subsnp;
ok $a->each_subsnp, 2;