[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.14, Mon Feb 23 23:03:59 2004 UTC revision 1.15, Wed Mar 3 14:56:43 2004 UTC
# Line 33  Line 33 
33    
34  if    ($request eq "use_protein_tool")       { &use_protein_tool($fig,$cgi,$prot); }  if    ($request eq "use_protein_tool")       { &use_protein_tool($fig,$cgi,$prot); }
35  elsif ($request eq "view_annotations")       { &view_annotations($fig,$cgi,$html,$prot); }  elsif ($request eq "view_annotations")       { &view_annotations($fig,$cgi,$html,$prot); }
36    elsif ($request eq "view_all_annotations")   { &view_all_annotations($fig,$cgi,$html,$prot); }
37  elsif ($request eq "aa_sequence")            { &aa_sequence($fig,$cgi,$html,$prot); }  elsif ($request eq "aa_sequence")            { &aa_sequence($fig,$cgi,$html,$prot); }
38  elsif ($request eq "dna_sequence")           { &dna_sequence($fig,$cgi,$html,$prot); }  elsif ($request eq "dna_sequence")           { &dna_sequence($fig,$cgi,$html,$prot); }
39  elsif ($request eq "fast_assign")            { &make_assignment($fig,$cgi,$html,$prot); }  elsif ($request eq "fast_assign")            { &make_assignment($fig,$cgi,$html,$prot); }
# Line 130  Line 131 
131      }      }
132  }  }
133    
134    sub view_all_annotations {
135        my($fig,$cgi,$html,$peg) = @_;
136        my($ann);
137    
138        if ($fig->is_real_feature($peg))
139        {
140            my $col_hdrs = ["who","when","PEG","genome","annotation"];
141            my @related  = $fig->related_by_func_sim($peg,$cgi->param('user'));
142            push(@related,$peg);
143    
144            my @annotations = $fig->merged_related_annotations(\@related);
145    
146            my $tab = [ map { $ann = $_;
147                              [$ann->[2],$ann->[1],&HTML::fid_link($cgi,$ann->[0]),
148                               $fig->genus_species(&FIG::genome_of($ann->[0])),
149                               "<pre>" . $ann->[3] . "</pre>"
150                               ] } @annotations];
151            if (@$tab > 0)
152            {
153                push(@$html,&HTML::make_table($col_hdrs,$tab,"All Related Annotations for $peg"));
154            }
155            else
156            {
157                push(@$html,"<h1>No Annotations for $peg</h1>\n");
158            }
159        }
160    }
161    
162  #==============================================================================  #==============================================================================
163  #  show_coupling_evidence  #  show_coupling_evidence
164  #==============================================================================  #==============================================================================
# Line 241  Line 270 
270      &print_assignments($fig,$cgi,$html,$peg);      &print_assignments($fig,$cgi,$html,$peg);
271    
272      push(@$html,$cgi->hr);      push(@$html,$cgi->hr);
273      my $link = $cgi->self_url() . "&request=view_annotations";      my $link1 = $cgi->self_url() . "&request=view_annotations";
274      push(@$html,"<br><a href=$link>To View Annotations</a>\n");      my $link2 = $cgi->self_url() . "&request=view_all_annotations";
275        push(@$html,"<br><a href=$link1>To View Annotations</a>/<a href=$link2>To View All Related Annotations</a>\n");
276    
277      my $link = $cgi->self_url() . "&request=aa_sequence";      my $link = $cgi->self_url() . "&request=aa_sequence";
278      push(@$html,"<br><a href=$link>Protein Sequence</a>\n");      push(@$html,"<br><a href=$link>Protein Sequence</a>\n");

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3