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

Annotation of /FigKernelScripts/make_cdd_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 :     `cp /vol/biodb/cdd/cddid.tbl.gz /vol/ontologies/temp`;
10 :     `gunzip /vol/ontologies/temp/cddid.tbl.gz`;
11 :    
12 :     open(IN,"/vol/ontologies/temp/cddid.tbl");
13 :     while($_ = <IN>){
14 :     chomp($_);
15 :     if($_ =~/^\d+/){
16 :     my @parts = split("\t",$_);
17 :     my $id = $parts[0];
18 :     my $term = $parts[2];
19 :     my $description = $parts[3];
20 :    
21 :     my ($dt_objs,$dt_obj);
22 :     $dt_objs = $dbmaster->cdd->get_objects( { 'id' => $id } );
23 :     print "term:$term\n";
24 :     if(scalar(@$dt_objs) == 0){
25 :     $dt_obj = $dbmaster->cdd->create( { 'id' => $id,
26 :     'term' => $term,
27 :     'description' => $description
28 :     } );
29 :     }
30 :     }
31 :     }
32 :    
33 :     `rm -f /vol/ontologies/temp/cddid* `;

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3