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

Annotation of /FigWebServices/array2sub.cgi

Parent Directory Parent Directory | Revision Log Revision Log


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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3