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

View of /FigKernelScripts/make_interpro_ontology.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (as text) (annotate)
Fri Dec 7 16:54:54 2007 UTC (12 years, 7 months ago) by mkubal
Branch: MAIN
use local sqlite

use FIG;
use lib PPO;
use lib Ontology;
use DBMaster;

my $sqlite_db = "$FIG_Config::global/Ontology/ontology.sqlite";
my $dbmaster = DBMaster->new(-database => $sqlite_db);

open(IN,"/vol/biodb/interpro/names.dat");
while($_ = <IN>){
    chomp($_);
    if($_ =~/^(IPR\d+)\s(.*)/){
	my $id = $1;
	my $term = $2;
	my ($dt_objs,$dt_obj);
	$dt_objs =  $dbmaster->interpro->get_objects( { 'id' => $id } );
	if(scalar(@$dt_objs) == 0){ 
	   $dt_obj = $dbmaster->go->create( { 'id'    => $id,
					       'term' => $term
					       } );
       }
    }
}

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3