[Bio] / FigWebServices / heat_map.cgi Repository:
ViewVC logotype

Diff of /FigWebServices/heat_map.cgi

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

revision 1.2, Tue Jun 6 02:25:37 2006 UTC revision 1.3, Tue Jun 6 06:31:12 2006 UTC
# Line 58  Line 58 
58      my %options;      my %options;
59      map {$options{$_} = $fig->genus_species($_) . " ($_)"} &genomes_with_cnx();      map {$options{$_} = $fig->genus_species($_) . " ($_)"} &genomes_with_cnx();
60    
61      my %limit=(""=>1);      my %limit=(""=>1, "unclassified"=>1);
62      foreach my $ssc ($fig->all_subsystem_classifications()) {$limit{$ssc->[0]}=1}      foreach my $ssc ($fig->all_subsystem_classifications()) {$limit{$ssc->[0]}=1}
63    
64      unless ($cgi->param('complete')) {$cgi->param('complete', 'All')}      unless ($cgi->param('complete')) {$cgi->param('complete', 'All')}
# Line 115  Line 115 
115      next unless ($fig->is_genome($genomes[$i]));      next unless ($fig->is_genome($genomes[$i]));
116      foreach my $attr ($fig->get_attributes($genomes[$i], "ss_connections"))      foreach my $attr ($fig->get_attributes($genomes[$i], "ss_connections"))
117      {      {
118          $attr->[2] =~ /^(.*):(\d+\.\d+)$/;          $attr->[2] =~ /^(.*):(([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+)))$/;
119          my ($ss, $score)=($1, $2);          my ($ss, $score)=($1, $2);
120          unless ($ss && defined $score) {die "Can't parse a ss and a score from ".(join("\n", @$attr))}          unless ($ss && defined $score) {die "Can't parse a ss and a score from ".(join("\n", @$attr))}
121          ($score > $max) ? ($max=$score) : 1;          ($score > $max) ? ($max=$score) : 1;
# Line 128  Line 128 
128  foreach my $ss (keys %$scores)  foreach my $ss (keys %$scores)
129  {  {
130      my @class=@{$fig->subsystem_classification($ss)};      my @class=@{$fig->subsystem_classification($ss)};
131      if (($cgi->param('limit') && ($cgi->param('limit') eq "unclassified" || $cgi->param('limit') eq $class[0])) || !$cgi->param('limit'))      if (
132            (
133                $cgi->param('limit') &&
134                ($cgi->param('limit') eq "unclassified" && !$class[0]) ||
135                ($cgi->param('limit') eq $class[0])
136            ) ||
137            !$cgi->param('limit')
138          )
139      {      {
140          push @data, [@class, $ss, @{$scores->{$ss}}];          push @data, [@class, $ss, @{$scores->{$ss}}];
141      }      }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3