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

Annotation of /FigWebServices/att2sub.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (view) (download)

1 : mkubal 1.1 use FIG;
2 :     my $fig = new FIG;
3 :     use HTML;
4 :     use CGI;
5 :    
6 :     my $cgi = new CGI;
7 :     my $html = [];
8 :    
9 :     if($cgi->param('genome') && $cgi->param('attribute') && $cgi->param('value'))
10 :     {
11 :    
12 :     push (@$html, "<TITLE>Connect Pegs with Attributes to Subsystems</TITLE>");
13 :    
14 : mkubal 1.2 my $genome_string = $cgi->param('genome');
15 :     my @string_parts = split($genome_string,", ");
16 :     my $genome = $string_parts[1];
17 : mkubal 1.1 my $att_param = $cgi->param('attribute');
18 :     my $value_param = $cgi->param('value');
19 :    
20 :     my @pegs = $fig->pegs_of($genome);
21 :     my %list_of_ss;
22 :     foreach my $peg (@pegs) {
23 :     next unless (my @attr=$fig->get_attributes($peg));
24 :     foreach my $attr (@attr) {
25 :     next unless (defined $attr);
26 :     my ($gotpeg, $tag, $val, $link)=@$attr;
27 :     $tag = uc($tag);
28 :     next unless ($tag eq $att_param);
29 :     $val = uc($val);
30 : mkubal 1.2 #$value_param = uc($value_param);
31 : mkubal 1.1 next unless($val eq $value_param);
32 :     my @subsystems = $fig->subsystems_for_peg($peg);
33 :     foreach my $ss (@subsystems)
34 :     {
35 :     my $ss_name = $ss->[0];
36 :     $list_of_ss{$ss_name} = "1";
37 :     }
38 :     }
39 :     }
40 :     my @list = keys(%list_of_ss);
41 :    
42 :     my $prefix = "$FIG_Config::cgi_url"."subsys.cgi?user=&ssa_name=";
43 :     my $suffix = "&request=show_ssa";
44 :     push(@$html,"<TABLE>");
45 :     foreach my $s (@list)
46 :     {
47 :     my $url = "<a href='$prefix.$s.$suffix'>$s</a>";
48 :     push(@$html,"<TR><TD>$url</TD></TR>");
49 :    
50 :     }
51 :     push(@$html,"</TABLE>");
52 :     &HTML::show_page($cgi,$html);
53 :     }
54 :    
55 :     else{
56 :    
57 :     $html = [];
58 :     push @$html, "<TITLE>Connect Pegs with Attributes to Subsystems</TITLE>";
59 :    
60 :     push(@$html,$cgi->start_form(-action => "att2sub.cgi",
61 :     -method => 'post')
62 :     );
63 :    
64 :    
65 :     my @gs_list;
66 :     my @genomes = $fig->genomes('complete');
67 :     foreach $g (@genomes){
68 :     my $gs = $fig->genus_species($g);
69 : mkubal 1.2 push(@gs_list, $g.", ".$gs);
70 : mkubal 1.1 }
71 :    
72 :     @gs_list2 =sort {uc($a) cmp uc($b)} @gs_list;
73 :     push(@$html,
74 :     $cgi->h3("select genome"),
75 :     $cgi->scrolling_list(-name => 'genome',
76 :     -values => [@gs_list2],
77 :     -size => 10,
78 :     -multiple => 1
79 :     ),
80 :     $cgi->hr
81 :     );
82 :    
83 :     my $opt=$fig->get_keys("peg"); # all the peg tags
84 :     my @options=sort {uc($a) cmp uc($b)} keys %$opt;
85 :     unshift(@options, undef);
86 :     push(@$html,$cgi->h3("select experiment"), $cgi->popup_menu(-name => 'attribute', -values=>\@options), $cgi->br, $cgi->hr);
87 :    
88 :     #my $opt2=$fig->get_values("peg"); # all the peg tags
89 :     #my @options2=sort {uc($a) cmp uc($b)} keys %$opt2;
90 :     #unshift(@options2, undef);
91 :     @options2 = ("up regulated","down regulated");
92 :     push(@$html,$cgi->h3("select value"), $cgi->popup_menu(-name => 'value', -values=>\@options2), $cgi->br,$cgi->hr);
93 :    
94 :     push(@$html,$cgi->submit('find subsystems'), $cgi->end_form);
95 :    
96 :     &HTML::show_page($cgi,$html);
97 :    
98 :     }

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3