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

Diff of /Sprout/GenomeStats.pl

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

revision 1.24, Tue Oct 3 02:48:59 2006 UTC revision 1.27, Sun Oct 8 20:55:06 2006 UTC
# Line 6  Line 6 
6  the genomes in each of the genome groups. Genomes that are new to this version  the genomes in each of the genome groups. Genomes that are new to this version
7  of the Sprout will be specially marked. In order for this to work, both the  of the Sprout will be specially marked. In order for this to work, both the
8  current and previous Sprout databases must be available on this machine.  current and previous Sprout databases must be available on this machine.
 This is one positional parameter: the name of a directory in which to place  
 the include files.  
9    
10  The currently-supported command-line options are as follows.  The currently-supported command-line options are as follows.
11    
# Line 73  Line 71 
71    
72  Path to the CGI script for displaying detailed statistics.  Path to the CGI script for displaying detailed statistics.
73    
74    =item noNewCheck
75    
76    If specified, the check for new genomes in the group is suppressed. This
77    may need to be done if there's been a change in the database definition. Note
78    that all this really does is keep the B<NEW!> symbol from showing. It does
79    not affect which genomes show up in the table.
80    
81  =back  =back
82    
83  =cut  =cut
# Line 104  Line 109 
109                                              linkCGI => ['../FIG/genome_statistics.cgi',                                              linkCGI => ['../FIG/genome_statistics.cgi',
110                                                          'path to CGI script for detailed statistics'],                                                          'path to CGI script for detailed statistics'],
111                                              groupFile => ["$FIG_Config::sproutData/groups.tbl",                                              groupFile => ["$FIG_Config::sproutData/groups.tbl",
112                                                            "location of the NMPDR group description file"],                                                            'location of the NMPDR group description file'],
113                                                noNewCheck => [0, 'if specified, skips the check for new genomes'],
114                                                targetDir => ["$FIG_Config::nmpdr_base/next/html/includes",
115                                                              'target directory'],
116                                              },                                              },
117                                             "<targetDir>",                                             "",
118                                             @ARGV);                                             @ARGV);
119  # Verify the directory name.  # Verify the directory name.
120  my $targetDir = $parameters[0];  my $targetDir = $options->{targetDir};
121  if (! $targetDir) {  if (! $targetDir) {
122      Confess("No target directory specified.");      Confess("No target directory specified.");
123  } elsif (! -d $targetDir) {  } elsif (! -d $targetDir) {
124      Confess("Target directory $targetDir not found.");      Confess("Target directory $targetDir not found.");
125  } else {  } else {
126        # Get the new Sprout.
127        my $sprout = SFXlate->new_sprout_only();
128        my %newGroupHash = $sprout->GetGroups();
129        # Extract the genome group data from the new Sprout.
130        if (! $options->{strict}) {
131            %newGroupHash = Sprout::Fix(%newGroupHash);
132        }
133        # This hash will be used to determine which genomes are new.
134        my %oldGroupHash = ();
135        if ($options->{noNewCheck}) {
136            # Here we can't look at the old Sprout. Set up the hash
137            # so it looks like the old Sprout's data is the same as ours.
138            %oldGroupHash = map { $_ => $newGroupHash{$_} } keys %newGroupHash;
139        } else {
140      # Get the old Sprout.      # Get the old Sprout.
141      my $oldSprout = SFXlate->new_sprout_only($FIG_Config::oldSproutDB);      my $oldSprout = SFXlate->new_sprout_only($FIG_Config::oldSproutDB);
142      # Extract the genome group data from the old Sprout.      # Extract the genome group data from the old Sprout.
143      my %oldGroupHash = $oldSprout->GetGroups();          %oldGroupHash = $oldSprout->GetGroups();
144      if (! $options->{strict}) {      if (! $options->{strict}) {
145          %oldGroupHash = Sprout::Fix(%oldGroupHash);          %oldGroupHash = Sprout::Fix(%oldGroupHash);
146      }      }
     # Get the new Sprout.  
     my $sprout = SFXlate->new_sprout_only();  
     my %newGroupHash = $sprout->GetGroups();  
     if (! $options->{strict}) {  
         %newGroupHash = Sprout::Fix(%newGroupHash);  
147      }      }
148      # Read the group file.      # Read the group file.
149      my %groupData = Sprout::ReadGroupFile($options->{groupFile});      my %groupData = Sprout::ReadGroupFile($options->{groupFile});

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.27

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3