[Bio] / DomReg / add_pfam_to_DomReg.pl Repository:
ViewVC logotype

Annotation of /DomReg/add_pfam_to_DomReg.pl

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : mkubal 1.1 #!/usr/bin/env /home/bartels/FIGdisk/env/cee/bin/perl
2 :    
3 :     use strict;
4 :     use warnings;
5 :     use DBMaster;
6 :    
7 :     my $dbmaster = DBMaster->new( 'DomReg' );
8 :    
9 :     opendir(DIR,"/home/mkubal/Domain_Analysis/Timelogic_output/");
10 :     my @files = readdir(DIR);
11 :     foreach my $file (@files){
12 :     if($file =~/parsed/){
13 :     open(IN,"/home/mkubal/Domain_Analysis/Timelogic_output/$file");
14 :     while($_ = <IN>){
15 :     chomp($_);
16 :     my @parts = split(" ",$_);
17 :     my $peg = $parts[0];
18 :     my $name = $parts[1];
19 :     my $score = $parts[3];
20 :     my @location = split("_",$parts[2]);
21 :     my $start = $location[0];
22 :     my $stop = $location[1];
23 :    
24 :     my $db = "pfam";
25 :     my $url = "http://www.sanger.ac.uk//cgi-bin/Pfam/getacc?".$name;
26 :     my $version = "11-14-2006";
27 :    
28 :     my $dt_obj;
29 :     $dt_obj = $dbmaster->DomainType->get_objects( { 'name' => $name } );
30 :     if(!$dt_obj){
31 :     $dt_obj = $dbmaster->DomainType->create( { 'db' => $db,
32 :     'url' => $url,
33 :     'vs' => $version,
34 :     'name' => $name,
35 :     } );
36 :     }
37 :    
38 :     my $domain_obj = $dbmaster->Domain->create( { 'figid' => $peg,
39 :     'start' => $start,
40 :     'stop' => $stop,
41 :     'score' => $score,
42 :     'DomainType' => $dt_obj,
43 :     } );
44 :     }
45 :     close(IN);
46 :     }
47 :     }

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3