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

View of /FigKernelScripts/load_coupling.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (as text) (annotate)
Sun May 15 11:49:37 2005 UTC (14 years, 6 months ago) by overbeek
Branch: MAIN
minor fixes in computing functional coupling

# -*- perl -*-

use FIG;
my $fig = new FIG;

$usage = "usage: load_coupling PCHdir Scores";

(
 ($pchD   = shift @ARGV) && (-d $pchD) &&
 ($scores = shift @ARGV) && (-s $scores)
)
    || die $usage;

use DBrtns;


my $dbf = $fig->{_dbf};

$dbf->drop_table( tbl => "fc_pegs" );
$dbf->create_table( tbl => 'fc_pegs',
		    flds => "peg1 varchar(32), peg2 varchar(32), score integer"
		  );
$dbf->load_table( tbl => "fc_pegs",
                  file => $scores );
$dbf->create_index( idx  => "fc_pegs_ix",
		    tbl  => "fc_pegs",
		    type => "btree",
		    flds => "peg1,peg2" );

$dbf->vacuum_it("fc_pegs");

$dbf->drop_table( tbl => "pchs" );
$dbf->create_table( tbl => 'pchs',
		    flds => "peg1 varchar(32), peg2 varchar(32), peg3 varchar(32), peg4 varchar(32),
                             inden13 varchar(6), inden24 varchar(6), para3  integer, para4 integer"
		  );

opendir(PCHD,$pchD) || die "could not open $pchD";
@files = grep { ($_ !~ /^\./) && (-s "$pchD/$_") } readdir(PCHD);
foreach $file (@files)
{
    $dbf->load_table( tbl => "pchs",
                  file => "$pchD/$file" );
}
$dbf->create_index( idx  => "pchs_ix",
		    tbl  => "pchs",
		    type => "btree",
		    flds => "peg1,peg2" );

$dbf->vacuum_it("pchs");


MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3