2
## Bioperl Test Harness Script for Modules
3
## $Id: DNAMutation.t,v 1.6 2001/04/01 17:54:59 heikki Exp $
5
# Before `make install' is performed this script should be runnable with
6
# `make test'. After `make install' it should work as `perl test.t'
10
# to handle systems with no installed Test module
11
# we include the t dir (where a copy of Test.pm is located)
13
eval { require Test; };
21
use Bio::Variation::DNAMutation;
22
use Bio::Variation::Allele;
26
## End of black magic.
28
## Insert additional test code below but remember to change
29
## the print "1..x\n" in the BEGIN block to reflect the
30
## total number of tests that will be run.
32
my($obj,$a1,$a2,$obj2);
33
$obj = Bio::Variation::DNAMutation -> new;
49
ok $obj->primary_tag, 'Variation';
51
$obj->source_tag('source');
52
ok $obj->source_tag, 'source';
60
if( $obj->can('dna_mut') ) {
62
$obj->dna_mut('dna_mut');
63
ok( $obj->dna_mut,'dna_mut');
66
$a1 = Bio::Variation::Allele->new(-seq => 'c');
67
$obj->allele_ori($a1);
69
ok $obj->allele_ori->seq, 'c';
71
$a2 = Bio::Variation::Allele->new('-seq' => 'g');
72
$obj->allele_mut($a2);
74
ok $obj->allele_mut->seq, 'g';
76
$obj->upStreamSeq('agcacctcccggcgccagtttgctg');
77
ok $obj->upStreamSeq, 'agcacctcccggcgccagtttgctg';
79
$obj->dnStreamSeq('tgctgcagcagcagcagcagcagca');
80
ok $obj->dnStreamSeq, 'tgctgcagcagcagcagcagcagca';
83
ok $obj->label, 'point, transversion' ;
85
$obj->status('proven');
86
ok $obj->status, 'proven';
89
$obj->proof('experimental');
90
ok $obj->proof, 'experimental';
93
ok $obj->restriction_changes, '-BbvI, +BstXI, -Fnu4HI, -TseI';
95
$obj->region('region');
96
ok $obj->region, 'region';
98
$obj->region_value('region_value');
99
ok $obj->region_value, 'region_value';
101
$obj->region_dist(-5);
102
ok $obj->region_dist, -5;
104
$obj->numbering('coding');
105
ok $obj->numbering, 'coding';
110
ok $obj->mut_number, 2;
113
ok defined ($obj2 = Bio::Variation::DNAMutation -> new
114
('-mut_number' => 2));
116
ok $obj2->mut_number, 2;
122
$obj->add_Allele($a1);
123
$obj->add_Allele($a2);
125
ok scalar ($obj->each_Allele), 2;