File: Allele.t

package info (click to toggle)
libbio-variation-perl 1.7.5-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 444 kB
  • sloc: perl: 3,217; xml: 946; makefile: 2
file content (44 lines) | stat: -rw-r--r-- 889 bytes parent folder | download | duplicates (6)
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-*- Test Harness script for Bioperl
# $Id$


use strict;

BEGIN {
    use lib '.';
    use Bio::Root::Test;
    
    test_begin(-tests => 14);
	
	use_ok('Bio::Variation::Allele');	
}

my($a,$trunc,$rev);

$a = Bio::Variation::Allele->new(-seq=>'ACTGACTGACTG',
			-display_id => 'new-id',
			-alphabet => 'dna',
			-accession_number => 'X677667',
                        -desc=>'Sample Bio::Seq object');
isa_ok($a, 'Bio::Variation::Allele');

is $a->accession_number(), 'X677667';
is $a->seq(), 'ACTGACTGACTG';
is $a->display_id(),'new-id' ;
is $a->desc, 'Sample Bio::Seq object';
is $a->alphabet(), 'dna';

ok defined($trunc = $a->trunc(1,4));
is $trunc->seq(), 'ACTG';

ok defined($rev = $a->revcom());
is $rev->seq(), 'CAGTCAGTCAGT';

$a->is_reference(1);
ok $a->is_reference;

$a->repeat_unit('ACTG');
is $a->repeat_unit, 'ACTG';

$a->repeat_count(3);
is $a->repeat_count, 3;