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

Diff of /FigKernelScripts/build_protein_families.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2, Thu Jul 14 18:58:39 2005 UTC revision 1.3, Tue Oct 25 17:41:33 2005 UTC
# Line 11  Line 11 
11  &FIG::run("cp $FIG_Config::global/ProteinFamilies/local* $FIG_Config::global/ProteinFamilies~");  &FIG::run("cp $FIG_Config::global/ProteinFamilies/local* $FIG_Config::global/ProteinFamilies~");
12  &FIG::run("build_syn $sources /tmp/syn$$");  &FIG::run("build_syn $sources /tmp/syn$$");
13  &FIG::run("make_fam_tabs $sources /tmp/syn$$ $FIG_Config::global/ProteinFamilies");  &FIG::run("make_fam_tabs $sources /tmp/syn$$ $FIG_Config::global/ProteinFamilies");
14    &load_idmaps($sources);
15  unlink("/tmp/syn$$");  unlink("/tmp/syn$$");
16  &FIG::run("load_protein_families");  &FIG::run("load_protein_families");
17    
18    
19    
20    
21    sub load_idmaps {
22     my $sources=shift;
23     opendir(SOURCES, $sources) || die "Can't open $sources while trying to load id.maps";
24     my @idmaps = map { "$sources/$_/id.map" } grep { ($_ !~ /^\./) && (-s "$sources/$_/id.map") } readdir(SOURCES);
25     open(OUT, ">$FIG_Config::global/ProteinFamilies/id.map") || die "Can't open $FIG_Config::global/ProteinFamilies/id.map for writing";
26     foreach my $file (@idmaps)
27     {
28      open(IN, $file) || die "can't open $idmaps";
29      while (<IN>) {$_.="\n" unless ($_ =~ /\n$/); print OUT}
30      close IN;
31     }
32    }
33    
34    
35    
36    
37    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3