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

Diff of /FigKernelScripts/load_coupling.pl

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

revision 1.5, Wed Jun 22 21:23:43 2005 UTC revision 1.6, Wed Aug 17 19:32:24 2005 UTC
# Line 27  Line 27 
27                     { fc_pegs_ix => "peg1, peg2" },                     { fc_pegs_ix => "peg1, peg2" },
28                     $scores                     $scores
29            );            );
30  Trace("Re-creating PCH table.") if T(2);  
31    Trace("Estimating size of PCH table.") if T(2);
32    
33    @files = grep { (-s $_) } map { "$pchD/$_" }  OpenDir($pchD, 1);
34    
35    my($row_size, $max_rows) = $dbf->estimate_table_size(\@files);
36    
37    Trace("Re-creating PCH table with row_size=$row_size max_rows=$max_rows.") if T(2);
38    
39  $dbf->reload_table('all', "pchs",  $dbf->reload_table('all', "pchs",
40                     "peg1 varchar(32), peg2 varchar(32), peg3 varchar(32), peg4 varchar(32),                     "peg1 varchar(32), peg2 varchar(32), peg3 varchar(32), peg4 varchar(32),
41                         inden13 varchar(6), inden24 varchar(6), para3  integer, para4 integer, rep char(1)",                         inden13 varchar(6), inden24 varchar(6), para3  integer, para4 integer, rep char(1)",
42                      { pchs_ix => "peg1, peg2" }                      { pchs_ix => "peg1, peg2" }, undef, undef, undef, [$row_size, $max_rows]
43            );            );
44    
45  Trace("Reading PCH directory.") if T(2);  Trace("Reading PCH directory.") if T(2);
46  @files = grep { (-s "$pchD/$_") } OpenDir($pchD, 1);  
47  foreach $file (@files) {  foreach $file (@files) {
48      Trace("Loading PCH data from $file.") if T(3);      Trace("Loading PCH data from $file.") if T(3);
49      $dbf->load_table( tbl => "pchs",      $dbf->load_table( tbl => "pchs",
50                        file => "$pchD/$file" );                        file => $file );
51  }  }
52  Trace("Finishing PCH load.") if T(2);  Trace("Finishing PCH load.") if T(2);
53  $dbf->finish_load('all', 'pchs');  $dbf->finish_load('all', 'pchs');

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3