[Bio] / FigKernelPackages / FIGGenDB.pm Repository:
ViewVC logotype

Annotation of /FigKernelPackages/FIGGenDB.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (view) (download) (as text)

1 : olson 1.6 #
2 :     # Copyright (c) 2003-2006 University of Chicago and Fellowship
3 :     # for Interpretations of Genomes. All Rights Reserved.
4 :     #
5 :     # This file is part of the SEED Toolkit.
6 :     #
7 :     # The SEED Toolkit is free software. You can redistribute
8 :     # it and/or modify it under the terms of the SEED Toolkit
9 :     # Public License.
10 :     #
11 :     # You should have received a copy of the SEED Toolkit Public License
12 :     # along with this program; if not write to the University of Chicago
13 :     # at info@ci.uchicago.edu or the Fellowship for Interpretation of
14 :     # Genomes at veronika@thefig.info or download a copy from
15 :     # http://www.theseed.org/LICENSE.TXT.
16 :     #
17 :    
18 : heiko 1.1 package FIGGenDB;
19 :    
20 : olson 1.2 use FIG;
21 : heiko 1.1 use strict;
22 :    
23 :     use Fcntl qw/:flock/; # import LOCK_* constants
24 : olson 1.4 use CGI;
25 : heiko 1.1 use POSIX;
26 :     use IPC::Open2;
27 :    
28 :     use DBrtns;
29 :     use FIG_Config;
30 :    
31 : olson 1.4
32 :     use constant GENDB_CGI => "/GENDB/cgi-bin/";
33 : heiko 1.1
34 :    
35 :     sub linkPEGGenDB {
36 :     my ($peg) = @_;
37 :     $peg =~ /fig\|(.+)\.peg/;
38 :     my $taxon = $1;
39 : olson 1.2
40 :     my $cgi = &FIG::plug_url(GENDB_CGI);
41 :    
42 :     return q(<a target="_blank" href=") . $cgi .
43 : olson 1.4 "seed_interface.cgi?action=view".
44 : olson 1.2 "&region=$peg&taxon_id=$taxon\">To View in GenDB</a>\n";
45 : heiko 1.1 }
46 :    
47 : olson 1.4 sub importOrganismGenDB {
48 :     my ($peg) = @_;
49 :     $peg =~ /fig\|(.+)\.peg/;
50 :     my $taxon = $1;
51 :    
52 :     my $cgi = &FIG::plug_url(GENDB_CGI);
53 :    
54 :     return q(<a target="_blank" href=") . $cgi .
55 :     "seed_interface.cgi?action=import".
56 :     "&taxon_id=$taxon\">Import Organism into GenDB</a>\n";
57 :    
58 :     }
59 :    
60 : heiko 1.1 sub linkClusterGenDB {
61 :     my ($peg, $taxon) = @_;
62 : redwards 1.5 # RAE: just return undef here so that we don't display the form for the Bounds as people think that this is working
63 :     return undef;
64 :    
65 : olson 1.3 my $cgi = &FIG::plug_url(GENDB_CGI);
66 : olson 1.4 my $html = "<form target=\"_blank\" action=\"${cgi}seed_interface.cgi\">\n
67 :     Bound1<input type=\"text\" id=\"bound1\" name=\"bound1\"/>\n
68 :     Bound2<input type=\"text\" id=\"bound2\" name=\"bound2\"/>\n
69 :     Candidate(s):<input type=\"text\" id=\"candidates\" name=\"candidates\"/>\n
70 :     Threshold<input type=\"text\" name=\"fmgth\" value=\"1e-20\"/>\n
71 :     <input type=\"hidden\" name=\"action\" value=\"predict\"/>\n
72 :     <input type=\"hidden\" name=\"peg_id\" value=\"$peg\"/>\n
73 :     <input type=\"submit\" name=\"GenDB\" value=\"Find uncalled Gene\"/>\n
74 : heiko 1.1 </form>";
75 :     return $html;
76 :     }
77 :    
78 :    
79 :    
80 :     1;

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3