[Bio] / FigKernelScripts / make_interpro_ontology.pl Repository:
ViewVC logotype

Annotation of /FigKernelScripts/make_interpro_ontology.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (view) (download) (as text)

1 : mkubal 1.1 use FIG;
2 :     use lib PPO;
3 :     use lib Ontology;
4 :     use DBMaster;
5 :    
6 :     my $sqlite_db = "$FIG_Config::global/Ontology/ontology.sqlite";
7 :     my $dbmaster = DBMaster->new(-database => $sqlite_db);
8 :    
9 :     open(IN,"/vol/biodb/interpro/names.dat");
10 :     while($_ = <IN>){
11 :     chomp($_);
12 :     if($_ =~/^(IPR\d+)\s(.*)/){
13 :     my $id = $1;
14 :     my $term = $2;
15 :     my ($dt_objs,$dt_obj);
16 :     $dt_objs = $dbmaster->interpro->get_objects( { 'id' => $id } );
17 :     if(scalar(@$dt_objs) == 0){
18 :     $dt_obj = $dbmaster->go->create( { 'id' => $id,
19 :     'term' => $term
20 :     } );
21 :     }
22 :     }
23 :     }

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3