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

Diff of /FigWebServices/protein.cgi

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

revision 1.18, Sat Mar 20 02:10:23 2004 UTC revision 1.19, Sun Mar 21 02:20:55 2004 UTC
# Line 20  Line 20 
20  }  }
21    
22  my $html = [];  my $html = [];
23    unshift @$html, "<TITLE>The SEED Protein Page</TITLE>\n";
24    
25  my $prot = $cgi->param('prot');  my $prot = $cgi->param('prot');
26  if (! $prot)  if (! $prot)
27  {  {
28        unshift @$html, "<TITLE>The SEED: Protein Page</TITLE>\n";
29      push(@$html,"<h1>Sorry, you need to specify a protein</h1>\n");      push(@$html,"<h1>Sorry, you need to specify a protein</h1>\n");
30      &HTML::show_page($cgi,$html);      &HTML::show_page($cgi,$html);
31      exit;      exit;
# Line 36  Line 38 
38      }      }
39      else      else
40      {      {
41            unshift @$html, "<TITLE>The SEED: Protein Page</TITLE>\n";
42          push(@$html,"<h1>Sorry, $prot appears not to have a FIG id at this point</h1>\n");          push(@$html,"<h1>Sorry, $prot appears not to have a FIG id at this point</h1>\n");
43          &HTML::show_page($cgi,$html);          &HTML::show_page($cgi,$html);
44          exit;          exit;
# Line 71  Line 74 
74      my $seq = $fig->get_translation($prot);      my $seq = $fig->get_translation($prot);
75      if (! $seq)      if (! $seq)
76      {      {
77            unshift @$html, "<TITLE>The SEED: Protein Page</TITLE>\n";
78          push(@$html,$cgi->h1("Sorry, $prot does not have a translation"));          push(@$html,$cgi->h1("Sorry, $prot does not have a translation"));
79          return;          return;
80      }      }
# Line 92  Line 96 
96              $val =~ s/\\n/\n/g;              $val =~ s/\\n/\n/g;
97              push(@$args,[$name,$val]);              push(@$args,[$name,$val]);
98          }          }
99            unshift @$html, "<TITLE>The SEED: Protein Tool</TITLE>\n";
100          push(@$html,&HTML::get_html($url,$method,$args));          push(@$html,&HTML::get_html($url,$method,$args));
101      }      }
102  }  }
# Line 133  Line 138 
138  sub view_annotations {  sub view_annotations {
139      my($fig,$cgi,$html,$prot) = @_;      my($fig,$cgi,$html,$prot) = @_;
140    
141        unshift @$html, "<TITLE>The SEED: Protein Annotations</TITLE>\n";
142      my $col_hdrs = ["who","when","annotation"];      my $col_hdrs = ["who","when","annotation"];
143      my $tab = [ map { [$_->[2],$_->[1],"<pre>" . $_->[3] . "<\/pre>"] } $fig->feature_annotations($prot) ];      my $tab = [ map { [$_->[2],$_->[1],"<pre>" . $_->[3] . "<\/pre>"] } $fig->feature_annotations($prot) ];
144      if (@$tab > 0)      if (@$tab > 0)
# Line 149  Line 155 
155      my($fig,$cgi,$html,$peg) = @_;      my($fig,$cgi,$html,$peg) = @_;
156      my($ann);      my($ann);
157    
158        unshift @$html, "<TITLE>The SEED: Protein Annotations</TITLE>\n";
159      if ($fig->is_real_feature($peg))      if ($fig->is_real_feature($peg))
160      {      {
161          my $col_hdrs = ["who","when","PEG","genome","annotation"];          my $col_hdrs = ["who","when","PEG","genome","annotation"];
# Line 181  Line 188 
188      my($fig,$cgi,$html,$peg) = @_;      my($fig,$cgi,$html,$peg) = @_;
189      my($pair,$peg1,$peg2,$link1,$link2);      my($pair,$peg1,$peg2,$link1,$link2);
190    
191        unshift @$html, "<TITLE>The SEED: Functional Coupling</TITLE>\n";
192      my $user = $cgi->param('user');      my $user = $cgi->param('user');
193      my $to   = $cgi->param('to');      my $to   = $cgi->param('to');
194      my @coup = grep { $_->[1] eq $to } $fig->coupling_and_evidence($peg,5000,1.0e-20,0.1,"keep");      my @coup = grep { $_->[1] eq $to } $fig->coupling_and_evidence($peg,5000,1.0e-20,0.1,"keep");
# Line 226  Line 234 
234  sub show_initial {  sub show_initial {
235      my($fig,$cgi,$html,$prot) = @_;      my($fig,$cgi,$html,$prot) = @_;
236    
237        unshift @$html, "<TITLE>The SEED: Protein Page</TITLE>\n";
238      my $gs = $fig->org_of($prot);      my $gs = $fig->org_of($prot);
239      push(@$html,"<h1>Protein $prot: $gs</h1>\n");      push(@$html,"<h1>Protein $prot: $gs</h1>\n");
240      if ($prot =~ /^fig\|\d+\.\d+\.peg/)      if ($prot =~ /^fig\|\d+\.\d+\.peg/)
# Line 1028  Line 1037 
1037      my($fig,$cgi,$html,$prot) = @_;      my($fig,$cgi,$html,$prot) = @_;
1038      my($seq,$func,$i);      my($seq,$func,$i);
1039    
1040        unshift @$html, "<TITLE>The SEED: Protein Sequence</TITLE>\n";
1041      if ($seq = $fig->get_translation($prot))      if ($seq = $fig->get_translation($prot))
1042      {      {
1043          $func = $fig->function_of($prot,$cgi->param('user'));          $func = $fig->function_of($prot,$cgi->param('user'));
# Line 1055  Line 1065 
1065      my($fig,$cgi,$html,$fid) = @_;      my($fig,$cgi,$html,$fid) = @_;
1066      my($seq,$func,$i);      my($seq,$func,$i);
1067    
1068        unshift @$html, "<TITLE>The SEED: Nucleotide Sequence</TITLE>\n";
1069      if ($seq = $fig->dna_seq($fig->genome_of($fid),scalar $fig->feature_location($fid)))      if ($seq = $fig->dna_seq($fig->genome_of($fid),scalar $fig->feature_location($fid)))
1070      {      {
1071          $func = $fig->function_of($prot,$cgi->param('user'));          $func = $fig->function_of($prot,$cgi->param('user'));

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3