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

View of /FigKernelScripts/build_protein_families.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (download) (as text) (annotate)
Tue Oct 25 17:41:33 2005 UTC (14 years, 2 months ago) by overbeek
Branch: MAIN
CVS Tags: caBIG-00-00-00
Changes since 1.2: +22 -0 lines
more more more proteinfamily stuff

use FIG;

$usage = "usage: build_protein_families Sources";

(
 ($sources = shift @ARGV)
)
    || die $usage;

&FIG::verify_dir("$FIG_Config::global/ProteinFamilies~");
&FIG::run("cp $FIG_Config::global/ProteinFamilies/local* $FIG_Config::global/ProteinFamilies~");
&FIG::run("build_syn $sources /tmp/syn$$");
&FIG::run("make_fam_tabs $sources /tmp/syn$$ $FIG_Config::global/ProteinFamilies");
&load_idmaps($sources);
unlink("/tmp/syn$$");
&FIG::run("load_protein_families");




sub load_idmaps {
 my $sources=shift;
 opendir(SOURCES, $sources) || die "Can't open $sources while trying to load id.maps";
 my @idmaps = map { "$sources/$_/id.map" } grep { ($_ !~ /^\./) && (-s "$sources/$_/id.map") } readdir(SOURCES);
 open(OUT, ">$FIG_Config::global/ProteinFamilies/id.map") || die "Can't open $FIG_Config::global/ProteinFamilies/id.map for writing";
 foreach my $file (@idmaps)
 {
  open(IN, $file) || die "can't open $idmaps";
  while (<IN>) {$_.="\n" unless ($_ =~ /\n$/); print OUT}
  close IN;
 }
}






MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3