File: AAChange.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 (96 lines) | stat: -rw-r--r-- 1,852 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# -*-Perl-*- Test Harness script for Bioperl
# $Id$

use strict;

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


ok my $obj = Bio::Variation::AAChange->new();
isa_ok $obj, 'Bio::Variation::AAChange';

$obj->start(3);           
is $obj->start, 3;

$obj->end(3); 
is $obj->end, 3;

$obj->length(3);

is $obj->length, 3;

$obj->strand('1');  
is $obj->strand, '1';

is $obj->primary_tag, 'Variation';

$obj->source_tag('source');
is $obj->source_tag, 'source';

$obj->frame(2);   
is $obj->frame,2;

$obj->score(2);   
is $obj->score, 2;

$obj->isMutation(1); 
ok $obj->isMutation;

my $a1 = Bio::Variation::Allele->new(-seq => 'V');
$obj->allele_ori($a1);

is $obj->allele_ori->seq, 'V';

my $a2 = Bio::Variation::Allele->new('-seq' => 'A');
$obj->add_Allele($a2);

is $obj->allele_mut->seq, 'A';

is $obj->similarity_score, 0;

$obj->upStreamSeq('upStreamSeq'); 
is $obj->upStreamSeq, 'upStreamSeq';

$obj->dnStreamSeq('dnStreamSeq'); 
is $obj->dnStreamSeq, 'dnStreamSeq' ;

is $obj->label, 'substitution, conservative';

$obj->status('proven'); 
is $obj->status, 'proven';

$obj->proof('experimental'); 
is $obj->proof, 'experimental';

$obj->region('region'); 
is $obj->region, 'region';

$obj->region_value('region_value'); 
is $obj->region_value, 'region_value';

$obj->numbering('coding'); 
is $obj->numbering, 'coding';

my $obj2 = Bio::Variation::RNAChange->new(-start => 7, 
					  -end => 7,
					  -cds_end => 100,
					  -codon_pos => 1,
					  -upStreamSeq => 'acgcgcgcgc',
					  -dnStreamSeq => 'acgcgcgcgc'
					  );
$obj2->label('missense');
$obj->RNAChange($obj2);

is $obj->trivname, 'V3A', "Trivial name is [". $obj->trivname. "]";

$obj->mut_number(2);
is $obj->mut_number, 2;