[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.25, Wed Oct 4 16:02:41 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 105  Line 112 
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                                              },                                              },
117                                             "<targetDir>",                                             "<targetDir>",
118                                             @ARGV);                                             @ARGV);
# Line 115  Line 123 
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.
# Line 122  Line 144 
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.25

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3