Merge pull request #185 from elucify/ncbi-https
[bioperl-live.git] / t / Variation / RNAChange.t
blobcb64724b834a06361ca9d5463060f0a4473e53c8
1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id$
4 use strict;
6 BEGIN { 
7     use lib '.';
8     use Bio::Root::Test;
9     
10     test_begin(-tests => 31);
11         
12         use_ok('Bio::Variation::Allele');
13         use_ok('Bio::Variation::RNAChange');
14         use_ok('Bio::Variation::AAChange');
17 ok my $obj = Bio::Variation::RNAChange->new();
19 $obj->start(4);           
20 is $obj->start, 4;
22 $obj->end(4); 
23 is $obj->end, 4;
25 $obj->length(1);
27 is $obj->length, 1;
29 $obj->strand('1');  
30 is $obj->strand, '1';
32 is ($obj->primary_tag, 'Variation' );
34 $obj->source_tag('source');
35 is ($obj->source_tag, 'source' );
37 $obj->frame(2);   
38 is ($obj->frame, 2 );
40 $obj->score(2);   
41 is ($obj->score, 2 );
43 #test gff string
44 #$obj->dna_mut('dna_mut'); 
45 #if ($obj->dna_mut eq 'dna_mut' ) {
46 #    print "ok 11\n";  
47 #} else {
48 #    print "not ok 11\n";
51 my $a1 = Bio::Variation::Allele->new(-seq => 'g');
52 $obj->allele_ori($a1);
54 is( $obj->allele_ori->seq, 'g' );
56 my $a2 = Bio::Variation::Allele->new('-seq' => 'a');
57 $obj->allele_mut($a2);
59 is($obj->allele_mut->seq, 'a' );
61 $obj->upStreamSeq('gaagattcagccaagctcaaggatg'); 
62 is ($obj->upStreamSeq, 'gaagattcagccaagctcaaggatg' );
64 $obj->cds_end(1000); 
65 is ($obj->cds_end, 1000 );
67 $obj->dnStreamSeq('aagtgcagttagggctgggaagggt'); 
68 is ($obj->dnStreamSeq, 'aagtgcagttagggctgggaagggt' );
70 $obj->codon_pos(1); 
71 is ($obj->codon_pos, 1 );
73 my $obj3 = Bio::Variation::AAChange->new();
74 $obj3->start(2);
75 $obj->AAChange($obj3);
76 $obj3->allele_ori($a1);
77 $obj3->allele_mut($a2);
79 is ($obj->label, 'missense' , "label is". $obj->label);
82 $obj->status('proven'); 
83 is ($obj->status, 'proven' );
85 $obj->proof('experimental'); 
86 is ($obj->proof, 'experimental' );
87 is ($obj->restriction_changes, '-BccI' );
89 $obj->region('coding'); 
90 is ($obj->region, 'coding' );
91 $obj->numbering('coding'); 
92 is ($obj->numbering, 'coding' );
94 is ($obj->codon_ori, 'gaa', "Codon_ori is |". $obj->codon_ori. "|");
96 is($obj->codon_mut, 'aaa' , "Codon_mut is |". $obj->codon_mut. "|");
99 $obj->codon_pos(1); 
100 is ($obj->codon_pos, 1 );
101 is( $obj->codon_table, 1 );
103 $obj->codon_table(3);
104 is ( $obj->codon_table, 3 );
106 $obj->mut_number(2);
107 is ( $obj->mut_number, 2 );
109 $obj->verbose(2);
110 is ( $obj->verbose, 2 );