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

Diff of /Sprout/DeleteGenomes.pl

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

revision 1.2, Tue Oct 3 02:48:59 2006 UTC revision 1.5, Fri Sep 13 18:54:12 2013 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl -w  #!/usr/bin/perl -w
2    
3  =head1 Delete Genomes from Sprout  =head1 Delete Genomes from Sapling
4    
5  This method deletes genomes from the Sprout database. Simply list the genomes  This method deletes genomes from the Sapling database. Simply list the genomes
6  as command-line parameters.  as command-line parameters.
7    
8  The currently-supported command-line options are as follows.  The currently-supported command-line options are as follows.
# Line 32  Line 32 
32    
33  use strict;  use strict;
34  use Tracer;  use Tracer;
 use DocUtils;  
 use TestUtils;  
35  use Cwd;  use Cwd;
36  use FIG;  use FIG;
37  use Stats;  use Stats;
38  use Sprout;  use Sapling;
 use SFXlate;  
39  use File::Copy;  use File::Copy;
40  use File::Path;  use File::Path;
41    
42  # Get the command-line options.  # Get the command-line options.
43  my ($options, @parameters) = StandardSetup(['ERDB', 'Sprout'],  my ($options, @parameters) = StandardSetup(['ERDB'],
44                                          {                                          {
45                                              showOnly => [0, 'Display DELETE statements without deleting.'],                                              showOnly => [0, 'Display DELETE statements without deleting.'],
46                                              trace => [2, 'tracing level'],                                              trace => [2, 'tracing level'],
# Line 51  Line 48 
48                                              '<genome1> <genome2> ...',                                              '<genome1> <genome2> ...',
49                                              @ARGV);                                              @ARGV);
50  # Get the Sprout object.  # Get the Sprout object.
51  my $sprout = SFXlate->new_sprout_only();  my $sprout = Sapling->new();
52  # Save the show-only flag.  # Save the show-only flag.
53  my $showOnly = $options->{showOnly};  my $showOnly = $options->{showOnly};
54  # Create the statistics object.  # Create the statistics object.
# Line 66  Line 63 
63          $retVal->Add('genomesNotFound');          $retVal->Add('genomesNotFound');
64      } else {      } else {
65          # Here we can delete it.          # Here we can delete it.
66          my $stats = $sprout->DeleteGenome($genomeID, $showOnly);          my $stats = $sprout->Delete(Genome => $genomeID, testMode => $showOnly);
67          # Update the statistics.          # Update the statistics.
68          $retVal->Add('genomesFound');          $retVal->Add('genomesFound');
69          $retVal->Accumulate($stats);          $retVal->Accumulate($stats);

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3