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

Diff of /FigKernelScripts/TransactFeatures.pl

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

revision 1.11, Mon Aug 15 20:42:31 2005 UTC revision 1.12, Mon Aug 15 21:08:56 2005 UTC
# Line 175  Line 175 
175    
176  Trace SQL commands.  Trace SQL commands.
177    
178    =item start
179    
180    ID of the first genome to process. This allows restarting a transaction run that failed
181    in the middle. The default is to run all transaction files.
182    
183  =back  =back
184    
185  =cut  =cut
# Line 197  Line 202 
202  use MoveAliases;  use MoveAliases;
203    
204  # Get the command-line options.  # Get the command-line options.
205  my ($options, @parameters) = Tracer::ParseCommand({ trace => 3, sql => 0, safe => 0, noAlias => 0 },  my ($options, @parameters) = Tracer::ParseCommand({ trace => 3, sql => 0, safe => 0, noAlias => 0,
206                                                        start => ' '},
207                                                    @ARGV);                                                    @ARGV);
208  # Get the command.  # Get the command.
209  my $mainCommand = lc shift @parameters;  my $mainCommand = lc shift @parameters;
# Line 240  Line 246 
246      my $orgsFound = 0;      my $orgsFound = 0;
247      my %transFiles = ();      my %transFiles = ();
248      my @transDirectory = OpenDir($parameters[0], 1);      my @transDirectory = OpenDir($parameters[0], 1);
249        # Pull out the "start" option value. This will be a space if all genomes should
250        # be processed, in which case it will always compare less than the genome ID.
251        my $startGenome = $options->{start};
252      # The next step is to create a hash of organism IDs to file names. This      # The next step is to create a hash of organism IDs to file names. This
253      # saves us some painful parsing later.      # saves us some painful parsing later.
254      for my $transFileName (@transDirectory) {      for my $transFileName (@transDirectory) {
255            # Parse the file name. This will only match if it's a real transaction file.
256          if ($transFileName =~ /^tbl_diff_(\d+\.\d+)$/) {          if ($transFileName =~ /^tbl_diff_(\d+\.\d+)$/) {
257                # Get the genome ID;
258                my $genomeID = $1;
259                # If we're skipping, only include this genome ID if it's equal to
260                # or greater than the start value.
261                if ($genomeID > $startGenome) {
262              $transFiles{$1} = "$parameters[0]/$transFileName";              $transFiles{$1} = "$parameters[0]/$transFileName";
263              $orgsFound++;              $orgsFound++;
264          }          }
265      }      }
266        }
267      Trace("$orgsFound genome transaction files found in directory $parameters[0].") if T(2);      Trace("$orgsFound genome transaction files found in directory $parameters[0].") if T(2);
268      if (! $orgsFound) {      if (! $orgsFound) {
269          Confess("No \"tbl_diff\" files found in directory $parameters[1].");          Confess("No \"tbl_diff\" files found in directory $parameters[1].");

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3