[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.4, Sun Jun 18 07:12:58 2006 UTC revision 1.8, Sun Jun 18 07:53:45 2006 UTC
# Line 190  Line 190 
190                  $counters{$ss} += 1;                  $counters{$ss} += 1;
191                  $totalFeatures++;                  $totalFeatures++;
192              }              }
193              Trace("$totalFeatures total feature found for $genomeID.") if T(3);              Trace("$totalFeatures total features found for $genomeID.") if T(3);
194              # We have all our data. Next we need to compute the percentages and the links.              # We have all our data. Next we need to compute the percentages and the links.
195              # First, the link stuff.              # First, the link stuff.
196              my $linkPrefix = "$options->{linkCGI}?user=\&genome=$genomeID&SPROUT=1&request=";              my $linkPrefix = "$options->{linkCGI}?user=\&genome=$genomeID&SPROUT=1&request=";
# Line 198  Line 198 
198              for my $type (keys %linkParms) {              for my $type (keys %linkParms) {
199                  $counters{$type} = a( { href => "$linkPrefix$linkParms{$type}" },                  $counters{$type} = a( { href => "$linkPrefix$linkParms{$type}" },
200                                       sprintf("%d(%.1f%%)", $counters{$type},                                       sprintf("%d(%.1f%%)", $counters{$type},
201                                               $counters{$type} * 100 / $totalFeatures));                                               Tracer::Percent($counters{$type}, $totalFeatures)));
202              }              }
203              # Create the row text.              # Create the row text. We use a list reference to distribute the TD tag
204              my $rowHtml = td( "$genomeName$new", $genomeLen, $pegCount,              # across all the cells.
205                my $rowHtml = td(["$genomeName$new", $genomeLen, $pegCount,
206                                map { $counters{$_} } @columnTypes,                                map { $counters{$_} } @columnTypes,
207                                $rnaCount );                                $rnaCount,
208                                 ]);
209              # Put it in the row hash.              # Put it in the row hash.
210              $rows{$genomeName} = $rowHtml;              $rows{$genomeName} = $rowHtml;
211          }          }
# Line 222  Line 224 
224              # Count the row.              # Count the row.
225              $rowCount++;              $rowCount++;
226          }          }
227          # All done, close the file.          # All done, terminate the table and close the file.
228            print GROUPFILE "</table>\n";
229          close GROUPFILE;          close GROUPFILE;
230          Trace("$rowCount genomes processed.") if T(2);          Trace("$rowCount genomes processed.") if T(2);
231      }      }
# Line 265  Line 268 
268              $realGroupID = $1;              $realGroupID = $1;
269          }          }
270          # Append this group's genomes into the result hash.          # Append this group's genomes into the result hash.
271          Tracer::AddToListMap(\%retVal, $realGroupID, $groupHash{$groupID});          Tracer::AddToListMap(\%retVal, $realGroupID, @{$groupHash{$groupID}});
272      }      }
273      # Return the result hash.      # Return the result hash.
274      return %retVal;      return %retVal;

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.8

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3