File: Computation.t

package info (click to toggle)
bioperl 1.7.7-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 35,888 kB
  • sloc: perl: 94,151; xml: 14,982; makefile: 20
file content (52 lines) | stat: -rw-r--r-- 1,199 bytes parent folder | download | duplicates (2)
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
# -*-Perl-*- Test Harness script for Bioperl
# $Id$

use strict;

BEGIN { 
    use Bio::Root::Test;

    test_begin(-tests => 12);

    use_ok('Bio::SeqFeature::Computation');
}

my ($comp_obj1, $comp_obj2, @sft);

ok $comp_obj1 = Bio::SeqFeature::Computation->new(
    -start => 1,
    -end   => 10,
);

is $comp_obj1->computation_id(332), 332, 'computation id';

ok $comp_obj1->add_score_value('P', 33), 'score value';

ok $comp_obj2 = Bio::SeqFeature::Computation->new(
    -start => 2,
    -end   => 10,
);

ok $comp_obj1->add_SeqFeature($comp_obj2, 'exon');
ok @sft = $comp_obj1->get_all_SeqFeature_types();

is $sft[0], 'exon', 'sft[0] is exon';


ok $comp_obj1 = Bio::SeqFeature::Computation->new(
    -start => 10,
    -end => 100,
    -strand => -1,
    -primary => 'repeat',
    -program_name => 'GeneMark',
    -program_date => '12-5-2000',
    -program_version => 'x.y',
    -database_name => 'Arabidopsis',
    -database_date => '12-dec-2000',
    -computation_id => 2231,
    -score    => { no_score => 334 },
);

is $comp_obj1->computation_id, 2231, 'computation id';
ok $comp_obj1->add_score_value('P', 33);
is ( ($comp_obj1->each_score_value('no_score'))[0], '334', 'score value');