[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.27, Thu Apr 7 20:25:13 2005 UTC revision 1.28, Fri Apr 8 20:22:23 2005 UTC
# Line 75  Line 75 
75   # this should catch Update Data and Updata Anyway   # this should catch Update Data and Updata Anyway
76   $html=&update_data($html);   $html=&update_data($html);
77  }  }
78    elsif ($cgi->param('submit') eq "Create Download File") {
79     print STDERR "Creating download file\n";
80     $html=&create_download_file($html);
81     push @$html, $cgi->p({class=>"diagnostic"}, ("\n<small>Generating this table took approximately " . (time-$^T) . " seconds\n</small>"));
82    }
83  elsif ($cgi->param('submit') eq "Check for updates") {  elsif ($cgi->param('submit') eq "Check for updates") {
84   $html=&check_updates($html);   $html=&check_updates($html);
85   push @$html, $cgi->p({class=>"diagnostic"}, ("\n<small>Checking for updates took approximately " . (time-$^T) . " seconds\n</small>"));   push @$html, $cgi->p({class=>"diagnostic"}, ("\n<small>Checking for updates took approximately " . (time-$^T) . " seconds\n</small>"));
# Line 185  Line 190 
190   my $size=10;   my $size=10;
191   if ($numberpirfams < $size) {$size=$numberpirfams}   if ($numberpirfams < $size) {$size=$numberpirfams}
192    
193     # info about the file that they can download
194     my $ftpfiletime=0;
195     if (-e "$FIG_Config::temp/seed2pir.txt") {
196      my @stat=stat("$FIG_Config::temp/seed2pir.txt");
197      $ftpfiletime=localtime($stat[7]);
198     }
199    
200   push (@$html, $cgi->start_form(-action => "pir.cgi"),   push (@$html, $cgi->start_form(-action => "pir.cgi"),
201    $cgi->h2("Please choose your super family"),    $cgi->h2("Please choose your super family"),
202    "\nFirst, please enter a username: ", $cgi->textfield(-name=>"user", -value=>$user), $cgi->p,    "\nFirst, please enter a username: ", $cgi->textfield(-name=>"user", -value=>$user), $cgi->p,
# Line 193  Line 205 
205    "\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 ",
206    "\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> ",
207    "\nsubsystems that those PEGs are in.\n", $cgi->p,"\n",    "\nsubsystems that those PEGs are in.\n", $cgi->p,"\n",
208    $cgi->scrolling_list(-name=>'pirsf', -values=>[keys %$display], -labels=>$display, -size=>$size), $cgi->p,"\n",    $cgi->scrolling_list(-name=>'pirsf', -values=>[keys %$display], -labels=>$display, -size=>$size+1), $cgi->p,"\n",
209    "\nNumber of superfamilies shown: ", $numberpirfams, $cgi->p,"\n",    "\nNumber of superfamilies shown: ", $numberpirfams, $cgi->p,"\n",
210    "\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",
211    "\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",
# Line 217  Line 229 
229    "<a href=\"/FIG/Html/pir.html#updates\" class=\"help\" target=\"pirhelp\">Help on updates</a>", "\n",    "<a href=\"/FIG/Html/pir.html#updates\" class=\"help\" target=\"pirhelp\">Help on updates</a>", "\n",
230    $cgi->p("Please click the button to check the PIR site and see whether there is a new version of the PIR superfamily data you should use"),"\n",    $cgi->p("Please click the button to check the PIR site and see whether there is a new version of the PIR superfamily data you should use"),"\n",
231    $cgi->submit('submit', 'Check for updates'),"\n",    $cgi->submit('submit', 'Check for updates'),"\n",
232    
233      $cgi->p, $cgi->hr, $cgi->p,"\n",
234      $cgi->p("<strong>Data for PIR</strong>"),
235      "<a href=\"/FIG/Html/pir.html#ftpdown\" class=\"help\" target=\"pirhelp\">Help on Data for PIR</a>\n",
236      $cgi->p("The latest version of the SEED to PIR comparisons for download was generated on $ftpfiletime\n"),
237      $cgi->p("Please click the button to create a new file.\n"),
238      $cgi->submit('submit', 'Create Download File'),"\n",
239    
240    $cgi->end_form,    $cgi->end_form,
241   );   );
242    
# Line 399  Line 419 
419      "<p>The job has started in the background but will likely take some time.<br />\n",      "<p>The job has started in the background but will likely take some time.<br />\n",
420      "The job has an ID of $bkj, and you can check it out from the <A href=\"/FIG/seed_ctl.cgi\">SEED Control Panel</a></p>\n",      "The job has an ID of $bkj, and you can check it out from the <A href=\"/FIG/seed_ctl.cgi\">SEED Control Panel</a></p>\n",
421      "<p>You should not use the PIR superfamilies while the job is runnning</p>\n";      "<p>You should not use the PIR superfamilies while the job is runnning</p>\n";
422     return $html;
423    }
424    
425    
426    sub create_download_file {
427     my $html=shift;
428     my $bkj=$fig->run_in_background(sub
429        {
430            my $time=time;
431            print "Generating PIR/SEED correspondance from SEED side began at ", scalar(localtime($time)), "\n";
432            system("seed2pir > $FIG_Config::temp/seed2pir.txt");
433            print "Complete at ", scalar(localtime(time)), ". Running took ", (time-$time)/60, " minutes\n";
434        }
435      );
436    
437     push @$html, "<h2>Creating your data has started</h2>",
438        "<p>The job has started in the background but will likely take some time.<br />\n",
439        "The job has an ID of $bkj, and you can check it out from the <A href=\"/FIG/seed_ctl.cgi\">SEED Control Panel</a></p>\n";
440   return $html;   return $html;
441  }  }
442    
# Line 409  Line 445 
445    
446    
447    
448    
449  sub cool_colors {  sub cool_colors {
450   # just an array of "websafe" colors or whatever colors we want to use. Feel free to remove bad colors (hence the lines not being equal length!)   # just an array of "websafe" colors or whatever colors we want to use. Feel free to remove bad colors (hence the lines not being equal length!)
451   return (   return (

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3