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
|
# -*-Perl-*-
## Bioperl Test Harness Script for Modules
## $Id: AAReverseMutate.t,v 1.4 2001/01/25 22:13:39 jason Exp $
use strict;
BEGIN {
# to handle systems with no installed Test module
# we include the t dir (where a copy of Test.pm is located)
# as a fallback
eval { require Test; };
if( $@ ) {
use lib 't';
}
use Test;
plan tests => 16;
}
use Bio::Variation::AAReverseMutate;
ok(1);
my $obj = new Bio::Variation::AAReverseMutate
('-aa_ori' => 'F',
'-aa_mut' => 'S'
);
ok defined $obj;
ok $obj->isa('Bio::Variation::AAReverseMutate');
ok $obj->aa_ori, 'F';
ok $obj->aa_mut, 'S';
my @points = $obj->each_Variant;
# F>S has two solutions
ok scalar @points, 2;
$obj->codon_ori('ttc');
ok defined $obj;
#now there should be only one left
@points = $obj->each_Variant;
ok scalar @points, 1;
$obj->codon_table(3);
ok $obj->codon_table, 3;
#Check the returned object
my $rna = pop @points;
ok $rna->isa('Bio::Variation::RNAChange');
ok $rna->length, 1;
ok $rna->allele_ori->seq, 't';
ok $rna->allele_mut->seq, 'c';
ok $rna->codon_ori, 'ttc', "Codon_ori is |". $rna->codon_ori. "|";
ok $rna->codon_pos, 2;
$obj->codon_table(11);
ok $obj->codon_table, 11;
|