[Bio] / Sprout / AttrDBRefresh.pl Repository:
ViewVC logotype

Diff of /Sprout/AttrDBRefresh.pl

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

revision 1.18, Sun Sep 30 03:44:39 2007 UTC revision 1.19, Sun Sep 30 20:52:26 2007 UTC
# Line 126  Line 126 
126    
127  If specified, Predicted docking results will be removed from the attribute database.  If specified, Predicted docking results will be removed from the attribute database.
128    
129    =item resume
130    
131    If specified, attribute data already in the file will not be reloaded. This option only
132    makes sense if C<load> is specified.
133    
134  =back  =back
135    
136  =cut  =cut
# Line 162  Line 167 
167                                                mapSubkey => ["", "instructions for fixing subkey values"],                                                mapSubkey => ["", "instructions for fixing subkey values"],
168                                                mapObjectID => ["", "instructions for fixing object ID values"],                                                mapObjectID => ["", "instructions for fixing object ID values"],
169                                                dockClean => ["", "if specified, Predicted docking results will be removed from the database"],                                                dockClean => ["", "if specified, Predicted docking results will be removed from the database"],
170                                                  resume => ["", "if specified, key-value pairs already in the database will not be inserted when loading from the load file"]
171                                             },                                             },
172                                             "",                                             "",
173                                             @ARGV);                                             @ARGV);
# Line 301  Line 307 
307          if (! -f $loadFileName) {          if (! -f $loadFileName) {
308              Confess("Cannot load: file \"$loadFileName\" is not found or not a file.");              Confess("Cannot load: file \"$loadFileName\" is not found or not a file.");
309          } else {          } else {
310              # Set up options. We may need to specify the append option.              # Set up options. We may need to specify the append and resume options, and
311                # we need to archive.
312              my %loadOptions;              my %loadOptions;
313              if ($options->{appendLoad}) {              if ($options->{appendLoad}) {
314                  $loadOptions{append} = 1;                  $loadOptions{append} = 1;
315              }              }
316                if ($options->{resume}) {
317                    $loadOptions{resume} = 1;
318                }
319                # Insure we have the archive directory available.
320                my $archiveDirectory = "$FIG_Config::fig/AttribData";
321                Tracer::Insure($archiveDirectory, 0777);
322                # Create an archive file name from the current time and the PID.
323                my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time());
324                $loadOptions{archive} = "$archiveDirectory/attrSave$$.$mon.$mday.$year.$hour.$min.$sec.log";
325              # Now we can load.              # Now we can load.
326              Trace("Loading attribute data from $loadFileName.") if T(2);              Trace("Loading attribute data from $loadFileName.") if T(2);
327              my $stats = $ca->LoadAttributesFrom($loadFileName, %loadOptions);              my $stats = $ca->LoadAttributesFrom($loadFileName, %loadOptions);

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3