[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.26, Sun Oct 8 05:44:55 2006 UTC
# Line 73  Line 73 
73    
74  Path to the CGI script for displaying detailed statistics.  Path to the CGI script for displaying detailed statistics.
75    
76    =item noNewCheck
77    
78    If specified, the check for new genomes in the group is suppressed. This
79    may need to be done if there's been a change in the database definition. Note
80    that all this really does is keep the B<NEW!> symbol from showing. It does
81    not affect which genomes show up in the table.
82    
83  =back  =back
84    
85  =cut  =cut
# Line 104  Line 111 
111                                              linkCGI => ['../FIG/genome_statistics.cgi',                                              linkCGI => ['../FIG/genome_statistics.cgi',
112                                                          'path to CGI script for detailed statistics'],                                                          'path to CGI script for detailed statistics'],
113                                              groupFile => ["$FIG_Config::sproutData/groups.tbl",                                              groupFile => ["$FIG_Config::sproutData/groups.tbl",
114                                                            "location of the NMPDR group description file"],                                                            'location of the NMPDR group description file'],
115                                                noNewCheck => [0, 'if specified, skips the check for new genomes'],
116                                                targetDir => ["$FIG_Config::nmpdr_base/next/html/includes",
117                                                              'target directory'],
118                                              },                                              },
119                                             "<targetDir>",                                             "",
120                                             @ARGV);                                             @ARGV);
121  # Verify the directory name.  # Verify the directory name.
122  my $targetDir = $parameters[0];  my $targetDir = $options->{targetDir};
123  if (! $targetDir) {  if (! $targetDir) {
124      Confess("No target directory specified.");      Confess("No target directory specified.");
125  } elsif (! -d $targetDir) {  } elsif (! -d $targetDir) {
126      Confess("Target directory $targetDir not found.");      Confess("Target directory $targetDir not found.");
127  } else {  } else {
128        # Get the new Sprout.
129        my $sprout = SFXlate->new_sprout_only();
130        my %newGroupHash = $sprout->GetGroups();
131        # Extract the genome group data from the new Sprout.
132        if (! $options->{strict}) {
133            %newGroupHash = Sprout::Fix(%newGroupHash);
134        }
135        # This hash will be used to determine which genomes are new.
136        my %oldGroupHash = ();
137        if ($options->{noNewCheck}) {
138            # Here we can't look at the old Sprout. Set up the hash
139            # so it looks like the old Sprout's data is the same as ours.
140            %oldGroupHash = map { $_ => $newGroupHash{$_} } keys %newGroupHash;
141        } else {
142      # Get the old Sprout.      # Get the old Sprout.
143      my $oldSprout = SFXlate->new_sprout_only($FIG_Config::oldSproutDB);      my $oldSprout = SFXlate->new_sprout_only($FIG_Config::oldSproutDB);
144      # Extract the genome group data from the old Sprout.      # Extract the genome group data from the old Sprout.
145      my %oldGroupHash = $oldSprout->GetGroups();          %oldGroupHash = $oldSprout->GetGroups();
146      if (! $options->{strict}) {      if (! $options->{strict}) {
147          %oldGroupHash = Sprout::Fix(%oldGroupHash);          %oldGroupHash = Sprout::Fix(%oldGroupHash);
148      }      }
     # Get the new Sprout.  
     my $sprout = SFXlate->new_sprout_only();  
     my %newGroupHash = $sprout->GetGroups();  
     if (! $options->{strict}) {  
         %newGroupHash = Sprout::Fix(%newGroupHash);  
149      }      }
150      # Read the group file.      # Read the group file.
151      my %groupData = Sprout::ReadGroupFile($options->{groupFile});      my %groupData = Sprout::ReadGroupFile($options->{groupFile});

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3