1 # -*-Perl-*- Test Harness script for Bioperl
10 test_begin(-tests => 37);
12 use_ok('Bio::Variation::DNAMutation');
13 use_ok('Bio::Variation::Allele');
16 my($obj,$a1,$a2,$obj2);
17 $obj = Bio::Variation::DNAMutation -> new;
33 is $obj->primary_tag, 'Variation';
35 $obj->source_tag('source');
36 is $obj->source_tag, 'source';
44 if( $obj->can('dna_mut') ) {
46 $obj->dna_mut('dna_mut');
47 is( $obj->dna_mut,'dna_mut');
50 $a1 = Bio::Variation::Allele->new(-seq => 'c');
51 $obj->allele_ori($a1);
53 is $obj->allele_ori->seq, 'c';
55 $a2 = Bio::Variation::Allele->new('-seq' => 'g');
56 $obj->allele_mut($a2);
58 is $obj->allele_mut->seq, 'g';
60 $obj->upStreamSeq('agcacctcccggcgccagtttgctg');
61 is $obj->upStreamSeq, 'agcacctcccggcgccagtttgctg';
63 $obj->dnStreamSeq('tgctgcagcagcagcagcagcagca');
64 is $obj->dnStreamSeq, 'tgctgcagcagcagcagcagcagca';
67 is $obj->label, 'point, transversion' ;
69 $obj->status('proven');
70 is $obj->status, 'proven';
73 $obj->proof('experimental');
74 is $obj->proof, 'experimental';
77 is $obj->restriction_changes, '-BbvI, +BstXI, -Fnu4HI, -TseI';
79 $obj->region('region');
80 is $obj->region, 'region';
82 $obj->region_value('region_value');
83 is $obj->region_value, 'region_value';
85 $obj->region_dist(-5);
86 is $obj->region_dist, -5;
88 $obj->numbering('coding');
89 is $obj->numbering, 'coding';
94 is $obj->mut_number, 2;
97 ok defined ($obj2 = Bio::Variation::DNAMutation -> new
98 ('-mut_number' => 2));
100 is $obj2->mut_number, 2;
106 $obj->add_Allele($a1);
107 $obj->add_Allele($a2);
109 is scalar ($obj->each_Allele), 2;
112 $obj = Bio::Variation::DNAMutation->new
116 '-upStreamSeq' => 'gt',
117 '-dnStreamSeq' => 'at',
118 '-proof' => 'experimental',
123 is $obj->start(), 23;
125 is $obj->length(), 2;
126 is $obj->upStreamSeq(), 'gt';
127 is $obj->dnStreamSeq(), 'at';
128 is $obj->proof(), 'experimental';
129 is $obj->mut_number(), 2;