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

Annotation of /FigWebServices/array2sub.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (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 :     my $genome_string = $cgi->param('genome');
15 :     my @string_parts = split(", ",$genome_string);
16 :     my $genome = $string_parts[1];
17 :     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 : mkubal 1.2 #$tag = uc($tag);
28 : mkubal 1.1 next unless ($tag eq $att_param);
29 :     next unless($val eq $value_param);
30 :     my @subsystems = $fig->subsystems_for_peg($peg);
31 :     foreach my $ss (@subsystems)
32 :     {
33 :     my $ss_name = $ss->[0];
34 :     $list_of_ss{$ss_name} = "1";
35 :     }
36 :     }
37 :     }
38 :     my @list = keys(%list_of_ss);
39 :    
40 : mkubal 1.3 my $prefix = "$FIG_Config::cgi_url"."/subsys.cgi?user=&ssa_name=";
41 : mkubal 1.1 my $suffix = "&request=show_ssa";
42 :     push(@$html,"<TABLE>");
43 :     foreach my $s (@list)
44 :     {
45 : mkubal 1.4 my $url = "<a href="."$prefix"."$s"."$suffix".">$s</a>";
46 : mkubal 1.1 push(@$html,"<TR><TD>$url</TD></TR>");
47 :    
48 :     }
49 :     push(@$html,"</TABLE>");
50 :     &HTML::show_page($cgi,$html);
51 :     }
52 :    
53 :     else{
54 :    
55 :     $html = [];
56 :     push @$html, "<TITLE>Connect Pegs with Attributes to Subsystems</TITLE>";
57 :    
58 :     push(@$html,$cgi->start_form(-action => "array2sub.cgi", -method => 'post'));
59 :    
60 :    
61 :     my @gs_list;
62 :     my @genomes = $fig->genomes('complete');
63 :     foreach $g (@genomes){
64 :     my $gs = $fig->genus_species($g);
65 :     push(@gs_list, $gs.", ".$g);
66 :     }
67 :    
68 :     @gs_list2 =sort {uc($a) cmp uc($b)} @gs_list;
69 :     push(@$html,
70 :     $cgi->h3("select genome"),
71 :     $cgi->scrolling_list(-name => 'genome',
72 :     -values => [@gs_list2],
73 :     -size => 10,
74 :     -multiple => 1
75 :     ),
76 :     $cgi->hr
77 :     );
78 :    
79 :     #my $opt=$fig->get_keys("peg"); # all the peg tags
80 :     #my @options=sort {uc($a) cmp uc($b)} keys %$opt;
81 :     #unshift(@options, undef);
82 :     @options =("microarray_sigmaB_regulon","pH_75_vs_55");
83 :     push(@$html,$cgi->h3("select experiment"), $cgi->popup_menu(-name => 'attribute', -values=>\@options), $cgi->br, $cgi->hr);
84 :    
85 :     @options2 = ("up regulated","down regulated");
86 :     push(@$html,$cgi->h3("select value"), $cgi->popup_menu(-name => 'value', -values=>\@options2), $cgi->br,$cgi->hr);
87 :    
88 :     push(@$html,$cgi->submit('find subsystems'), $cgi->end_form);
89 :    
90 :     &HTML::show_page($cgi,$html);
91 :    
92 :     }

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3