~ubuntu-branches/ubuntu/trusty/bioperl/trusty

« back to all changes in this revision

Viewing changes to t/SeqFeature/Computation.t

  • Committer: Package Import Robot
  • Author(s): Charles Plessy
  • Date: 2013-09-22 13:39:48 UTC
  • mfrom: (3.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20130922133948-c6z62zegjyp7ztou
Tags: 1.6.922-1
* New upstream release.
* Replaces and Breaks grinder (<< 0.5.3-3~) because of overlaping contents.
  Closes: #722910
* Stop Replacing and Breaking bioperl ( << 1.6.9 ): not needed anymore. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*-Perl-*- Test Harness script for Bioperl
 
2
# $Id$
 
3
 
 
4
use strict;
 
5
 
 
6
BEGIN { 
 
7
    use lib '.';
 
8
    use Bio::Root::Test;
 
9
 
 
10
    test_begin(-tests => 12);
 
11
 
 
12
    use_ok('Bio::SeqFeature::Computation');
 
13
}
 
14
 
 
15
my ($comp_obj1, $comp_obj2, @sft);
 
16
 
 
17
ok $comp_obj1 = Bio::SeqFeature::Computation->new(
 
18
    -start => 1,
 
19
    -end   => 10,
 
20
);
 
21
 
 
22
is $comp_obj1->computation_id(332), 332, 'computation id';
 
23
 
 
24
ok $comp_obj1->add_score_value('P', 33), 'score value';
 
25
 
 
26
ok $comp_obj2 = Bio::SeqFeature::Computation->new(
 
27
    -start => 2,
 
28
    -end   => 10,
 
29
);
 
30
 
 
31
ok $comp_obj1->add_SeqFeature($comp_obj2, 'exon');
 
32
ok @sft = $comp_obj1->get_all_SeqFeature_types();
 
33
 
 
34
is $sft[0], 'exon', 'sft[0] is exon';
 
35
 
 
36
 
 
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 },
 
49
);
 
50
 
 
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');