File: RNAChange.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 (110 lines) | stat: -rw-r--r-- 2,217 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
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# -*-Perl-*- Test Harness script for Bioperl
# $Id: RNAChange.t 15112 2008-12-08 18:12:38Z sendu $

use strict;

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

ok my $obj = Bio::Variation::RNAChange->new();

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

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

$obj->length(1);

is $obj->length, 1;

$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 );

#test gff string
#$obj->dna_mut('dna_mut'); 
#if ($obj->dna_mut eq 'dna_mut' ) {
#    print "ok 11\n";  
#} else {
#    print "not ok 11\n";
#}

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

is( $obj->allele_ori->seq, 'g' );

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

is($obj->allele_mut->seq, 'a' );

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

$obj->cds_end(1000); 
is ($obj->cds_end, 1000 );

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

$obj->codon_pos(1); 
is ($obj->codon_pos, 1 );

my $obj3 = Bio::Variation::AAChange->new();
$obj3->start(2);
$obj->AAChange($obj3);
$obj3->allele_ori($a1);
$obj3->allele_mut($a2);

is ($obj->label, 'missense' , "label is". $obj->label);


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

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

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

is ($obj->codon_ori, 'gaa', "Codon_ori is |". $obj->codon_ori. "|");

is($obj->codon_mut, 'aaa' , "Codon_mut is |". $obj->codon_mut. "|");


$obj->codon_pos(1); 
is ($obj->codon_pos, 1 );
is( $obj->codon_table, 1 );

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

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

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