[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.2 - (download) (as text) (annotate)
Wed Dec 12 22:52:51 2007 UTC (12 years, 7 months ago) by mkubal
Branch: MAIN
CVS Tags: rast_rel_2008_06_18, rast_rel_2008_06_16, rast_rel_2008_04_23
Changes since 1.1: +2 -2 lines
specify database as argument

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

my $sqlite_db = shift(@ARGV);
my $dbmaster = DBMaster->new(-database => $sqlite_db, -backend => 'SQLite');

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