[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.34, Sat Sep 20 14:31:22 2008 UTC revision 1.36, Mon Mar 2 22:25:08 2009 UTC
# Line 59  Line 59 
59  use File::Path;  use File::Path;
60  use Sprout;  use Sprout;
61  use SFXlate;  use SFXlate;
62  use CGI qw(:standard);  use CGI qw(-nosticky);
63  use FIG;  use FIG;
64  use WikiTools;  use WikiTools;
65    
# Line 105  Line 105 
105      # Get the super-group list.      # Get the super-group list.
106      my @superGroups = sort keys %newGroupHash;      my @superGroups = sort keys %newGroupHash;
107      # Set up some useful stuff for the four count columns.      # Set up some useful stuff for the four count columns.
108      my %linkParms = ( s0 => "nothypo_sub", n0 => "nothypo_nosub",      my $url = "%SCRIPTURL{rest}%/NmpdrPlugin/search?Class=OrgSumSearch;Search=Go";
109                        s1 => "hypo_sub", n1 => "hypo_nosub" );      my %linkParms = ( s0 => "$url;hypothetical=named;insubsystem=in;genome=",
110                          n0 => "$url;hypothetical=named;insubsystem=out;genome=",
111                          s1 => "$url;hypothetical=hypo;insubsystem=in;genome=",
112                          n1 => "$url;hypothetical=hypo;insubsystem=out;genome=" );
113      my @columnTypes = ('s0', 'n0', 's1', 'n1');      my @columnTypes = ('s0', 'n0', 's1', 'n1');
114      # Prepare a hash for the summary counters. These will be used on the organism summary page.      # Prepare a hash for the summary counters. These will be used on the organism summary page.
115      my %summaries = ();      my %summaries = ();
# Line 152  Line 155 
155                              " *Hypothetical genes not in subsystems*", # n1                              " *Hypothetical genes not in subsystems*", # n1
156                              " *Subsystems*",                              " *Subsystems*",
157                              " *RNAs*";                              " *RNAs*";
158            # Make the table sortable.
159            push @outputLines, '%TABLE{sort="on"}%';
160          # Create the header row.          # Create the header row.
161          push @outputLines, "| " . join(" | ", @columnNames) . " |";          push @outputLines, "| " . join(" | ", @columnNames) . " |";
162          # The data rows will be built next. We'll be putting them into a hash keyed by          # The data rows will be built next. We'll be putting them into a hash keyed by
# Line 219  Line 224 
224              $groupTotals{features} += $totalFeatures;              $groupTotals{features} += $totalFeatures;
225              # We have all our data. Next we need to compute the percentages.              # We have all our data. Next we need to compute the percentages.
226              for my $type (keys %linkParms) {              for my $type (keys %linkParms) {
227                  $counters{$type} = sprintf("%d(%.1f%%)", $counters{$type},                  my $counterData = sprintf("%d(%.1f%%)", $counters{$type},
228                                             Tracer::Percent($counters{$type}, $totalFeatures));                                             Tracer::Percent($counters{$type}, $totalFeatures));
229                    $counters{$type} = CGI::a({ href => $linkParms{$type} . $genomeID }, $counterData);
230              }              }
231              my @counterValues = map { $counters{$_} } @columnTypes;              my @counterValues = map { $counters{$_} } @columnTypes;
232              # The last column is a subsystem count.              # The last column is a subsystem count.

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.36

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3