[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.12, Mon Aug 15 21:08:56 2005 UTC revision 1.15, Mon Sep 12 00:24:37 2005 UTC
# Line 7  Line 7 
7  a command. The second specifies a directory full of transaction files. The third  a command. The second specifies a directory full of transaction files. The third
8  specifies a file that tells us which feature IDs are available for each organism.  specifies a file that tells us which feature IDs are available for each organism.
9    
10  C<TransactFeatures> I<[options]> I<command> I<transactionDirectory> I<idFile>  C<TransactFeatures> [I<options>] I<command> I<transactionDirectory> I<idFile>
11    
12  The supported commands are  The supported commands are
13    
# Line 16  Line 16 
16  =item count  =item count
17    
18  Count the number of IDs needed to process the ADD and CHANGE transactions. This  Count the number of IDs needed to process the ADD and CHANGE transactions. This
19  will produce an listing of the number of feature IDs needed for each  will produce a listing of the number of feature IDs needed for each
20  organism and feature type. This command is mostly a sanity check: it provides  organism and feature type. This command is mostly a sanity check: it provides
21  useful statistics without changing anything.  useful statistics without changing anything.
22    
# Line 28  Line 28 
28    
29  =item process  =item process
30    
31  Process the transactions and update the FIG data store. This will also create  Process the transactions and update the FIG data store. This will also update
32  a copy of each transaction file in which the pseudo-IDs have been replaced by  the NR file and queue features for similarity generation.
 real IDs.  
33    
34  =item annotate  =item fudge
35    
36  Annotate the features created by the transactions so as to indicate how they were  Convert transactions that have already been applied to new transactions that can
37  derived.  be used to test the transaction processor.
   
 =item check  
   
 Verify that the locations and translations of the new and changed features are  
 correct.  
   
 =item fix  
   
 Fix the locations and translations of the new and changed features.  
   
 =item aliasMove  
   
 Move the aliases from the old features to the ones that replaced them.  
   
 =item attribute  
   
 Move the attributes from the old features to the ones that replaced them.  
   
 =item attributeCheck  
   
 Same as C<attribute>, but no changes are made to the database.  
38    
39  =back  =back
40    
# Line 175  Line 153 
153    
154  Trace SQL commands.  Trace SQL commands.
155    
156    =item tblFiles
157    
158    Output TBL files containing the corrected IDs. (B<process> command only)
159    
160  =item start  =item start
161    
162  ID of the first genome to process. This allows restarting a transaction run that failed  ID of the first genome to process. This allows restarting a transaction run that failed
# Line 187  Line 169 
169  use strict;  use strict;
170  use Tracer;  use Tracer;
171  use DocUtils;  use DocUtils;
 use TestUtils;  
172  use Cwd;  use Cwd;
173  use File::Copy;  use File::Copy;
174  use File::Path;  use File::Path;
# Line 196  Line 177 
177  use TransactionProcessor;  use TransactionProcessor;
178  use ApplyTransactions;  use ApplyTransactions;
179  use CountTransactions;  use CountTransactions;
180  use AnnotateTransactions;  use FudgeTransactions;
 use AttributeTransactions;  
 use FixTransactions;  
 use MoveAliases;  
181    
182  # Get the command-line options.  # Get the command-line options.
183  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,
184                                                      start => ' '},                                                      start => ' ', tblFiles => 0},
185                                                    @ARGV);                                                    @ARGV);
186  # Get the command.  # Get the command.
187  my $mainCommand = lc shift @parameters;  my $mainCommand = lc shift @parameters;
# Line 222  Line 200 
200      $controlBlock = CountTransactions->new($options, $mainCommand, @parameters);      $controlBlock = CountTransactions->new($options, $mainCommand, @parameters);
201  } elsif ($mainCommand eq 'process') {  } elsif ($mainCommand eq 'process') {
202      $controlBlock = ApplyTransactions->new($options, $mainCommand, @parameters);      $controlBlock = ApplyTransactions->new($options, $mainCommand, @parameters);
203  } elsif ($mainCommand eq 'annotate') {  } elsif ($mainCommand eq 'fudge') {
204      $controlBlock = AnnotateTransactions->new($options, $mainCommand, @parameters);      $controlBlock = FudgeTransactions->new($options, $mainCommand, @parameters);
 } elsif ($mainCommand eq 'fix' || $mainCommand eq 'check') {  
     $controlBlock = FixTransactions->new($options, $mainCommand, @parameters);  
 } elsif ($mainCommand eq 'aliasmove') {  
     $controlBlock = MoveAliases->new($options, $mainCommand, @parameters);  
 } elsif ($mainCommand eq 'attribute') {  
     $controlBlock = AttributeTransactions->new($options, $mainCommand, @parameters);  
 } elsif ($mainCommand eq 'attributecheck') {  
     $controlBlock = AttributeTransactions->new($options, $mainCommand, @parameters);  
205  } else {  } else {
206      Confess("Invalid command \"$mainCommand\" specified on command line.");      Confess("Invalid command \"$mainCommand\" specified on command line.");
207  }  }
# Line 258  Line 228 
228              my $genomeID = $1;              my $genomeID = $1;
229              # If we're skipping, only include this genome ID if it's equal to              # If we're skipping, only include this genome ID if it's equal to
230              # or greater than the start value.              # or greater than the start value.
231              if ($genomeID > $startGenome) {              if ($genomeID ge $startGenome) {
232                  $transFiles{$1} = "$parameters[0]/$transFileName";                  $transFiles{$1} = "$parameters[0]/$transFileName";
233                  $orgsFound++;                  $orgsFound++;
234              }              }
# Line 304  Line 274 
274                  }                  }
275                  $controlBlock->IncrementStat($command);                  $controlBlock->IncrementStat($command);
276              }              }
277                # Close the transaction input file.
278                close TRANS;
279              # Terminate processing for this genome.              # Terminate processing for this genome.
280              my $orgStats = $controlBlock->EndGenome();              my $orgStats = $controlBlock->EndGenome();
281              Trace("Statistics for $genomeID\n\n" . $orgStats->Show() . "\n") if T(3);              Trace("Statistics for $genomeID\n\n" . $orgStats->Show() . "\n") if T(3);
             # Close the transaction input file.  
             close TRANS;  
282          }          }
283      }      }
284      # Terminate processing.      # Terminate processing.

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3