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

Annotation of /FigKernelScripts/build_protein_families.pl

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : overbeek 1.1 use FIG;
2 :    
3 :     $usage = "usage: build_protein_families Sources";
4 :    
5 :     (
6 :     ($sources = shift @ARGV)
7 :     )
8 :     || die $usage;
9 :    
10 :     &FIG::verify_dir("$FIG_Config::global/ProteinFamilies~");
11 :     &FIG::run("cp $FIG_Config::global/ProteinFamilies/local* $FIG_Config::global/ProteinFamilies~");
12 :     &FIG::run("build_syn $sources /tmp/syn$$");
13 :     &FIG::run("make_fam_tabs $sources /tmp/syn$$ $FIG_Config::global/ProteinFamilies");
14 : overbeek 1.3 &load_idmaps($sources);
15 : overbeek 1.2 unlink("/tmp/syn$$");
16 :     &FIG::run("load_protein_families");
17 : overbeek 1.3
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 :    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3