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

Diff of /FigWebServices/subsys.cgi

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

revision 1.16, Wed Nov 3 19:08:19 2004 UTC revision 1.17, Thu Nov 4 18:27:29 2004 UTC
# Line 692  Line 692 
692           $cgi->br);           $cgi->br);
693    
694      push(@$html,$cgi->checkbox(-name => 'ignore_alt', -value => 1, -checked => 0, -override => 1,-label => 'ignore alternatives'),$cgi->br);      push(@$html,$cgi->checkbox(-name => 'ignore_alt', -value => 1, -checked => 0, -override => 1,-label => 'ignore alternatives'),$cgi->br);
695        push(@$html,$cgi->checkbox(-name => 'ext_ids', -value => 1, -checked => 0, -label => 'use external ids'),$cgi->br);
696      push(@$html,$cgi->checkbox(-name => 'show_clusters', -value => 1, -checked => 0, -override => 1,-label => 'show clusters'),$cgi->br);      push(@$html,$cgi->checkbox(-name => 'show_clusters', -value => 1, -checked => 0, -override => 1,-label => 'show clusters'),$cgi->br);
697      push(@$html,$cgi->checkbox(-name => 'show_missing', -value => 1, -checked => 0, -override => 1,-label => 'show missing'),$cgi->br);      push(@$html,$cgi->checkbox(-name => 'show_missing', -value => 1, -checked => 0, -override => 1,-label => 'show missing'),$cgi->br);
698    
# Line 1127  Line 1128 
1128                  }                  }
1129                  @colors = sort { $count{$b} <=> $count{$a} } keys(%count);                  @colors = sort { $count{$b} <=> $count{$a} } keys(%count);
1130                  $color = (@colors > 0) ? $colors[0] : '#FFFFFF';                  $color = (@colors > 0) ? $colors[0] : '#FFFFFF';
1131                  push(@$row,"\@bgcolor=\"$color\":" . join(", ",map { &HTML::fid_link($cgi,$_->[0],"local") . $_->[1] } @$cell));                  push(@$row,"\@bgcolor=\"$color\":" . join(", ",map { ($cgi->param('ext_ids') ? &external_id($fig,$cgi,$_->[0]) : &HTML::fid_link($cgi,$_->[0],"local")) . $_->[1] } @$cell));
1132              }              }
1133              push(@$tab,$row);              push(@$tab,$row);
1134          }          }
# Line 2148  Line 2149 
2149      }      }
2150      return "";      return "";
2151  }  }
2152    
2153    sub external_id {
2154        my($fig,$cgi,$peg) = @_;
2155        my @tmp;
2156        my @aliases = ($fig->feature_aliases($peg),map { $_->[0] } $fig->mapped_prot_ids($peg));
2157        if      ((@tmp = grep { $_ =~ /^uni\|/ } @aliases) > 0)
2158        {
2159            @aliases = map { &HTML::uni_link($cgi,$_) } @tmp;
2160        }
2161        elsif   ((@tmp = grep { $_ =~ /^sp\|/ } @aliases) > 0)
2162        {
2163            @aliases = map { &HTML::sp_link($cgi,$_) } @tmp;
2164        }
2165        elsif   ((@tmp = grep { $_ =~ /^gi\|/ } @aliases) > 0)
2166        {
2167            @aliases = map { &HTML::gi_link($cgi,$_) } @tmp;
2168        }
2169        elsif   ((@tmp = grep { $_ =~ /^kegg\|/ } @aliases) > 0)
2170        {
2171            @aliases = map { &HTML::kegg_link($cgi,$_) } @tmp;
2172        }
2173        else
2174        {
2175            return wantarray() ? (&HTML::fid_link($cgi,$peg)) : &HTML::fid_link($cgi,$peg);
2176        }
2177    
2178        if (wantarray())
2179        {
2180            return @aliases;
2181        }
2182        else
2183        {
2184            return $aliases[0];
2185        }
2186    }

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3