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

« back to all changes in this revision

Viewing changes to t/Ontology/IO/obo.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:
30
30
is ($roots[0]->name(), "Sequence_Ontology");
31
31
is ($roots[0]->identifier(), "SO:0000000");
32
32
 
33
 
my @terms = $ont->get_child_terms($roots[0]);
 
33
my @terms = sort {$a->name cmp $b->name} $ont->get_child_terms($roots[0]);
34
34
is (scalar(@terms), 5);
35
35
my ($term) = grep { $_->name() eq "variation_operation"; } @terms;
36
36
ok $term;
43
43
($term) = grep { $_->name() eq "located_sequence_feature"; } @terms;
44
44
ok $term;
45
45
 
46
 
@terms = $ont->get_child_terms($terms[0]);
 
46
@terms = sort {$a->name cmp $b->name} $ont->get_child_terms($terms[4]);
47
47
is (scalar(@terms), 5);
48
48
($term) = grep { $_->name() eq "translocate"; } @terms;
49
49
ok $term;
57
57
ok $term;
58
58
 
59
59
my $featterm = $terms[0];
60
 
@terms = $ont->get_child_terms($featterm);
 
60
@terms = sort {$a->name cmp $b->name} $ont->get_child_terms($featterm);
61
61
is (scalar(@terms), 2);
62
62
 
63
63
# substitution has two parents, see whether this is handled
174
174
 
175
175
 
176
176
## -- getting relationships for various ontologies
177
 
my @onto_pred = $ontologies[0]->get_predicate_terms();
178
 
my @bio_pred =  $bioont->get_predicate_terms();
 
177
my @onto_pred = sort {$a->name cmp $b->name} $ontologies[0]->get_predicate_terms();
 
178
my @bio_pred =  sort {$a->name cmp $b->name} $bioont->get_predicate_terms();
179
179
is(scalar @onto_pred,6,'Got predicates for gene_ontology');
180
180
is(scalar @bio_pred,2,'Got predicates for biological_process');
181
 
is($onto_pred[3]->name(),'REGULATES','Got regulates predicate');
182
 
is($bio_pred[1]->name(),'POSITIVELY_REGULATES','Got positively regulates predicate');
 
181
is($onto_pred[4]->name(),'REGULATES','Got regulates predicate');
 
182
is($bio_pred[0]->name(),'POSITIVELY_REGULATES','Got positively regulates predicate');
183
183
 
184
184
 
185
185
my @bio_rel = $bioont->get_relationships();