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

Diff of /FigWebServices/pir.cgi

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

revision 1.25, Sun Apr 3 20:42:24 2005 UTC revision 1.26, Thu Apr 7 19:16:10 2005 UTC
# Line 61  Line 61 
61    
62  unshift(@$html, "<TITLE>The SEED - PIR/SEED comparisons </TITLE>\n");  unshift(@$html, "<TITLE>The SEED - PIR/SEED comparisons </TITLE>\n");
63  # make sure that we read the file at the beginning  # make sure that we read the file at the beginning
64    
65    unless (-e $pir_file_from_pir) {$html=&check_updates($html); &HTML::show_page($cgi,$html,1); exit(0)}
66  my ($pegbypir, $pirid) =&read_pir_file("initial");  my ($pegbypir, $pirid) =&read_pir_file("initial");
67    
68    
# Line 149  Line 151 
151   my $full=1;   my $full=1;
152   if ($cgi->param("preliminary")) {$full=0}   if ($cgi->param("preliminary")) {$full=0}
153   # count different subsystems per sf   # count different subsystems per sf
154     my $textlimit;
155     $cgi->param('textlimit') && ($textlimit = $cgi->param('textlimit'));
156   my $ss; my @pirsf;   my $ss; my @pirsf;
157   foreach my $sf (keys %$pegbypir) {   foreach my $sf (keys %$pegbypir) {
158    next unless ($pegbypir->{$sf});    next unless ($pegbypir->{$sf});
159    next unless (scalar @{$pegbypir->{$sf}} >= $min);    next unless (scalar @{$pegbypir->{$sf}} >= $min);
160    next if ($full && $pirid->{$sf} =~ /\(preliminary\)/i);    next if ($full && $pirid->{$sf} =~ /\(preliminary\)/i);
161    next if (!$full && $pirid->{$sf} =~ /\(full/i);    next if (!$full && $pirid->{$sf} =~ /\(full/i);
162      next if ($textlimit && !($pirid->{$sf} =~ m/$textlimit/i || $sf =~ m/$textlimit/i));
163    push @pirsf, $sf;    push @pirsf, $sf;
164    if ($cgi->param('showsubsys')) {    if ($cgi->param('showsubsys')) {
165     foreach my $peg (@{$pegbypir->{$sf}}) {     foreach my $peg (@{$pegbypir->{$sf}}) {
# Line 169  Line 174 
174   my $display;   my $display;
175   foreach my $sf (@pirsf) {   foreach my $sf (@pirsf) {
176    next unless ($sf);    next unless ($sf);
177    my $displayname=$pirid->{$sf};    my $displayname=$sf . " " . $pirid->{$sf};
178    if (length($displayname) > 50) {$displayname=substr($displayname, 0, 50)}    if (length($displayname) > 50) {$displayname=substr($displayname, 0, 50)}
179    if ($cgi->param('showsubsys')) {$display->{$sf}=$displayname . " [". scalar @{$pegbypir->{$sf}} . "/". (scalar keys %{$ss->{$sf}}) . "]"}    if ($cgi->param('showsubsys')) {$display->{$sf}=$displayname . " [". scalar @{$pegbypir->{$sf}} . "/". (scalar keys %{$ss->{$sf}}) . "]"}
180    else {$display->{$sf}=$displayname . " [". scalar @{$pegbypir->{$sf}} . "]"}    else {$display->{$sf}=$displayname . " [". scalar @{$pegbypir->{$sf}} . "]"}
181   }   }
182    
183     unshift @pirsf, '';  $display->{''}='';
184     my $size=10;
185     if (scalar keys %$display < $size) {$size=scalar keys %$display}
186    
187   push (@$html, $cgi->start_form(-action => "pir.cgi"),   push (@$html, $cgi->start_form(-action => "pir.cgi"),
188    $cgi->h2("Please choose your super family"),    $cgi->h2("Please choose your super family"),
# Line 184  Line 192 
192    "\nIf you choose to show subsystem counts in this menu, you will get two numbers. The first of the two numbers in parenthesis is the number ",    "\nIf you choose to show subsystem counts in this menu, you will get two numbers. The first of the two numbers in parenthesis is the number ",
193    "\nof PEGs that map to that superfamily, and the second number in parenthesis is the number of <em>different</em> ",    "\nof PEGs that map to that superfamily, and the second number in parenthesis is the number of <em>different</em> ",
194    "\nsubsystems that those PEGs are in.\n", $cgi->p,"\n",    "\nsubsystems that those PEGs are in.\n", $cgi->p,"\n",
195    $cgi->scrolling_list(-name=>'pirsf', -values=>[keys %$display], -labels=>$display, -size=>10), $cgi->p,"\n",    $cgi->scrolling_list(-name=>'pirsf', -values=>[keys %$display], -labels=>$display, -size=>$size), $cgi->p,"\n",
196    "\nNummber of superfamilies shown: ", scalar keys %$display, $cgi->p,"\n",    "\nNummber of superfamilies shown: ", scalar keys %$display, $cgi->p,"\n",
197    "\n<a href=\"/FIG/Html/pir.html#menu\" class=\"help\" target=\"pirhelp\">Help on the menu contents</a>","\n",    "\n<a href=\"/FIG/Html/pir.html#menu\" class=\"help\" target=\"pirhelp\">Help on the menu contents</a>","\n",
198    "\nMinimum number of pegs per PIR superfamily shown in list &nbsp; <input type='text' name='min' value='$min' size=3 />","\n",    "\nMinimum number of pegs per PIR superfamily shown in list &nbsp; <input type='text' name='min' value='$min' size=3 />","\n",
199    "\nor show all PIR superfamilies: ", $cgi->checkbox(-name=>"showall", -label=>""), $cgi->p,"\n",    "\nor show all PIR superfamilies: ", $cgi->checkbox(-name=>"showall", -label=>""), $cgi->p,"\n",
200    $cgi->checkbox(-name=>"showsubsys", -label=>"Show subsystem counts in list"), $cgi->p,"\n",    $cgi->checkbox(-name=>"showsubsys", -label=>"Show subsystem counts in list"), $cgi->p,"\n",
201    $cgi->checkbox(-name=>"preliminary", -label=>"Show only preliminary PIR superfamilies"), $cgi->p,"\n",    $cgi->checkbox(-name=>"preliminary", -label=>"Show only preliminary PIR superfamilies"), $cgi->p,"\n",
202    $cgi->submit('submit', 'Update view'),"\n",    "Limit the list to some text: ", $cgi->textfield(-name=>'textlimit', -size=>20), $cgi->p, "\n",
203      $cgi->submit('submit', 'Recreate List'),"\n",
204    $cgi->submit('submit', 'Show Correspondence'),"\n",    $cgi->submit('submit', 'Show Correspondence'),"\n",
205    $cgi->reset,"\n",    $cgi->reset,"\n",
206    $cgi->p, $cgi->hr, $cgi->p,"\n",    $cgi->p, $cgi->hr, $cgi->p,"\n",

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3