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

Diff of /FigWebServices/array2sub.cgi

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

revision 1.6, Tue Jul 26 00:53:38 2005 UTC revision 1.10, Mon Aug 1 16:29:22 2005 UTC
# Line 5  Line 5 
5    
6  my $cgi = new CGI;  my $cgi = new CGI;
7  my $html = [];  my $html = [];
8    my @pegs_with_no_ss = ();
9    
10  if($cgi->param('genome') && $cgi->param('attribute') && $cgi->param('value'))  if($cgi->param('genome') && $cgi->param('attribute') && $cgi->param('value'))
11  {  {
12    
13          push (@$html, "<TITLE>Connect Pegs with Attributes to Subsystems</TITLE>");          push (@$html, "<TITLE>Connect Differentially Expressed Pegs to Subsystems</TITLE>");
14            push(@$html, $cgi->br,$cgi->hr);
15            push(@$html,$cgi->h3("Subsystems"));
16          my $genome_string = $cgi->param('genome');          my $genome_string = $cgi->param('genome');
17          my @string_parts = split(", ",$genome_string);          my @string_parts = split(", ",$genome_string);
18          my $genome = $string_parts[1];          my $genome = $string_parts[1];
# Line 27  Line 29 
29                          next unless ($tag eq $att_param);                          next unless ($tag eq $att_param);
30                          next unless($val eq $value_param);                          next unless($val eq $value_param);
31                          my @subsystems = $fig->subsystems_for_peg($peg);                          my @subsystems = $fig->subsystems_for_peg($peg);
32                            my $no_ss = 1;
33                          foreach my $ss (@subsystems)                          foreach my $ss (@subsystems)
34                          {                          {
35                                  my $ss_name = $ss->[0];                                  my $ss_name = $ss->[0];
36                                  $list_of_ss{$ss_name} = "1";                                  $list_of_ss{$ss_name} = "1";
37                                    $ss = 0;
38                          }                          }
39                            if($no_ss){push(@pegs_with_no_ss,$peg)}
40                   }                   }
41          }          }
42          my @list = keys(%list_of_ss);          my @list = keys(%list_of_ss);
43    
44          my $prefix = "$FIG_Config::cgi_url"."/subsys.cgi?user=&ssa_name=";          my $prefix = &FIG::cgi_url() . "/subsys.cgi?user=&ssa_name=";
45          my $suffix = "&request=show_ssa";          my $suffix = "&request=show_ssa";
46          push(@$html,"<TABLE>");          push(@$html,"<TABLE>");
47          foreach my $s (@list)          foreach my $s (@list)
48          {          {
49             my $url = "<a href="."$prefix"."$s"."$suffix".">$s</a>";             my $url = "<a href="."$prefix"."$s"."$suffix"."&color_by_peg_tag=$att_param".">$s</a>";
50             push(@$html,"<TR><TD>$url</TD></TR>");             push(@$html,"<TR><TD>$url</TD></TR>");
51    
52           }           }
53             push(@$html,"</TABLE>",$cgi->hr);
54    
55             push(@$html,$cgi->h3("Pegs Not in Subsystem"));
56             push(@$html,"<TABLE>");
57    
58             foreach my $p (@pegs_with_no_ss)
59             {
60                    my $cgi = &FIG::cgi_url();
61                    my $url =qq(<a href="$cgi/protein.cgi?prot=$p&user=">$p</a>);
62                    push(@$html,"<TR><TD>$url</TD></TR>");
63             }
64           push(@$html,"</TABLE>");           push(@$html,"</TABLE>");
65    
66           &HTML::show_page($cgi,$html);           &HTML::show_page($cgi,$html);
67  }  }
68    
69  else{  else{
70    
71          $html = [];          $html = [];
72          push @$html, "<TITLE>Connect Pegs with Attributes to Subsystems</TITLE>";          push @$html, "<TITLE>Connect Differentially Expressed Pegs to Subsystems</TITLE>";
73    
74          push(@$html,$cgi->start_form(-action => "array2sub.cgi",  -method => 'post'));          push(@$html,$cgi->start_form(-action => "array2sub.cgi",  -method => 'post'));
75    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.10

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3