[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.3 - (view) (download) (as text)

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3