Mercurial > repos > iuc > onto_tk_get_terms
comparison get_terms_by_relationship_type.pl @ 0:6c5e1431c7df draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/onto-toolkit commit 9422f839ae354d4c26b02d4494abdeaad518d0e6
author | iuc |
---|---|
date | Fri, 10 Nov 2017 11:31:06 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:6c5e1431c7df |
---|---|
1 #!/usr/bin/perl | |
2 | |
3 eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' | |
4 if 0; # not running under some shell | |
5 | |
6 use Carp; | |
7 use strict; | |
8 use warnings; | |
9 use Encode; | |
10 | |
11 use OBO::Parser::OBOParser; | |
12 | |
13 my $my_parser = OBO::Parser::OBOParser->new(); | |
14 my $ontology = $my_parser->work(shift(@ARGV)); | |
15 my $rel_type_name = shift(@ARGV); | |
16 my @relationships = @{$ontology->get_relationships()}; | |
17 | |
18 foreach my $r (@relationships) { | |
19 if($r->type() eq $rel_type_name){ | |
20 print $r->tail()->id(), "\t"; | |
21 print $r->type(),"\t"; | |
22 print $r->head()->id(), "\n"; | |
23 } | |
24 } | |
25 | |
26 exit 0; | |
27 | |
28 __END__ |