Add dna_to_aa_aln method and tests
[bioperl-live.git] / t / SeqFeature / Computation.t
blobc6fc9921fa68d1bc74f0a5a1aec26813df0a6b74
1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id$
4 use strict;
6 BEGIN { 
7     use lib '.';
8     use Bio::Root::Test;
10     test_begin(-tests => 12);
12     use_ok('Bio::SeqFeature::Computation');
15 my ($comp_obj1, $comp_obj2, @sft);
17 ok $comp_obj1 = Bio::SeqFeature::Computation->new(
18     -start => 1,
19     -end   => 10,
22 is $comp_obj1->computation_id(332), 332, 'computation id';
24 ok $comp_obj1->add_score_value('P', 33), 'score value';
26 ok $comp_obj2 = Bio::SeqFeature::Computation->new(
27     -start => 2,
28     -end   => 10,
31 ok $comp_obj1->add_SeqFeature($comp_obj2, 'exon');
32 ok @sft = $comp_obj1->get_all_SeqFeature_types();
34 is $sft[0], 'exon', 'sft[0] is exon';
37 ok $comp_obj1 = Bio::SeqFeature::Computation->new(
38     -start => 10,
39     -end => 100,
40     -strand => -1,
41     -primary => 'repeat',
42     -program_name => 'GeneMark',
43     -program_date => '12-5-2000',
44     -program_version => 'x.y',
45     -database_name => 'Arabidopsis',
46     -database_date => '12-dec-2000',
47     -computation_id => 2231,
48     -score    => { no_score => 334 },
51 is $comp_obj1->computation_id, 2231, 'computation id';
52 ok $comp_obj1->add_score_value('P', 33);
53 is ( ($comp_obj1->each_score_value('no_score'))[0], '334', 'score value');