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

Diff of /FigKernelPackages/FIGGenDB.pm

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

revision 1.1, Fri Oct 22 17:05:18 2004 UTC revision 1.6, Mon Dec 5 19:06:30 2005 UTC
# Line 1  Line 1 
1    #
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  package FIGGenDB;  package FIGGenDB;
19    
20    use FIG;
21  use strict;  use strict;
22    
23  use Fcntl qw/:flock/;  # import LOCK_* constants  use Fcntl qw/:flock/;  # import LOCK_* constants
24    use CGI;
25  use POSIX;  use POSIX;
26  use IPC::Open2;  use IPC::Open2;
27    
28  use DBrtns;  use DBrtns;
29  use FIG_Config;  use FIG_Config;
30    
31  use constant GENDB_CGI=>"http://localhost/GENDB2.2/gendb-cgi/";  
32  use constant SEED_USER=>"seed";  use constant GENDB_CGI => "/GENDB/cgi-bin/";
 use constant SEED_PASS=>'seed';  
 use constant GENDB_PROJECT=>"GenDB_SEED";  
33    
34    
35  sub linkPEGGenDB {  sub linkPEGGenDB {
36      my ($peg) = @_;      my ($peg) = @_;
37      $peg =~ /fig\|(.+)\.peg/;      $peg =~ /fig\|(.+)\.peg/;
38      my $taxon = $1;      my $taxon = $1;
39      return "<a target=\"_blank\" href=\"".GENDB_CGI."seed_interface.cgi?action=view&login=".SEED_USER."&pass=".SEED_PASS."&project=".GENDB_PROJECT."&region=$peg&taxon_id=$taxon\">To View in GenDB</a>\n";  
40        my $cgi = &FIG::plug_url(GENDB_CGI);
41    
42        return q(<a target="_blank" href=") . $cgi .
43            "seed_interface.cgi?action=view".
44            "&region=$peg&taxon_id=$taxon\">To View in GenDB</a>\n";
45    }
46    
47    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  sub linkClusterGenDB {  sub linkClusterGenDB {
61      my ($peg, $taxon) = @_;      my ($peg, $taxon) = @_;
62      my $html = "<form action=\"".GENDB_CGI."seed_interface.cgi\">\n      # RAE: just return undef here so that we don't display the form for the Bounds as people think that this is working
63                  Action:<input type=\"text\" name=\"action\"/>\n      return undef;
64                  Organism (taxon ID):<input type=\"text\" name=\"taxon_id\"/>\n  
65                  [Start]:<input type=\"text\" name=\"start\"/>\n      my $cgi = &FIG::plug_url(GENDB_CGI);
66                  [Stop]:<input type=\"text\" name=\"stop\"/>\n      my $html = "<form target=\"_blank\" action=\"${cgi}seed_interface.cgi\">\n
67                  <input type=\"hidden\" name=\"login\"/ value=\"".SEED_USER."\">\n                  Bound1<input type=\"text\" id=\"bound1\" name=\"bound1\"/>\n
68                  <input type=\"hidden\" name=\"pass\"/ value=\"".SEED_PASS."\">\n                  Bound2<input type=\"text\" id=\"bound2\" name=\"bound2\"/>\n
69                  <input type=\"submit\" name=\"GenDB\" value=\"GenDB\">\n                  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                  </form>";                  </form>";
75      return $html;      return $html;
76  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.6

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3