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

Diff of /FigWebServices/check_subsys.cgi

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

revision 1.3, Wed Dec 8 20:22:20 2004 UTC revision 1.4, Wed Dec 8 23:18:01 2004 UTC
# Line 110  Line 110 
110    
111  sub check_subsystem {  sub check_subsystem {
112      my($cgi,$fig,$html,$subsys) = @_;      my($cgi,$fig,$html,$subsys) = @_;
113      my($col_hdrs,$tab1,$tab2,$x);      my($col_hdrs1,$col_hdrs2,$tab1,$tab2,$x);
114    
115        my $user=$cgi->param('user');
116      my @checked = map { chop; [split(/\t/,$_)] } `$FIG_Config::bin/check_subsystems $subsys`;      my @checked = map { chop; [split(/\t/,$_)] } `$FIG_Config::bin/check_subsystems $subsys`;
117      $col_hdrs = ["PEG","Function","Role","Other Subsystems", "Genome"];      # RAE: it only makes sense to have Assign Role in column 1, so I duplicate this instead of leaving the column empty. Blah.
118        $col_hdrs1 = ["PEG","Function","Role","Assign Role","Other Subsystems","Genome"];
119        $col_hdrs2 = ["PEG","Function","Role","Other Subsystems","Genome"];
120      $tab1 = [];      $tab1 = [];
121      $tab2 = [];      $tab2 = [];
122    
# Line 127  Line 130 
130           foreach my $ssr (@otherss)           foreach my $ssr (@otherss)
131            {            {
132             next if ($$ssr[0] eq $subsys);             next if ($$ssr[0] eq $subsys);
133             $othersubsys .= $cgi->a({href => "subsys.cgi?user=" . $cgi->param('user') . "&ssa_name=" . $$ssr[0] . "&request=show_ssa"}, $$ssr[0])  . "<br\n";             $othersubsys .= $cgi->a({href => "subsys.cgi?user=$user&ssa_name=" . $$ssr[0] . "&request=show_ssa"}, $$ssr[0])  . "<br\n";
134            }            }
135          }          }
136          my $link = &HTML::fid_link($cgi,$peg);          my $link = &HTML::fid_link($cgi,$peg);
137            my $checkbox=$cgi->checkbox(-name=>"checked", -label=>'', -value=>"to=$peg,from=$role");
138          if ($code eq "mismatch")          if ($code eq "mismatch")
139          {          {
140              push(@$tab1,[$link,$func,$role,$othersubsys,$gs]);              push(@$tab1,[$link,$func,$role,$checkbox,$othersubsys,$gs]);
141          }          }
142          else          else
143          {          {
144              push(@$tab2,[$link,$func,$role,$othersubsys,$gs]);              push(@$tab2,[$link,$func,$role,$othersubsys,$gs]);
145          }          }
146      }      }
147      push(@$html,&HTML::make_table($col_hdrs,$tab1,"PEGs IN Subsystem with MISMATCHING Functions"));  
148        # RAE addd the form controls
149        push(@$html, $cgi->start_form( -method => 'post', -action => 'fid_checked.cgi', -name => 'fid_checked'), $cgi->hidden(-name => 'user', -value => $user));
150        push(@$html,&HTML::make_table($col_hdrs1,$tab1,"PEGs IN Subsystem with MISMATCHING Functions"));
151        push(@$html, $cgi->br, &HTML::java_buttons("fid_checked", "checked"), $cgi->br);
152        push(@$html, $cgi->submit(-name=>'batch_assign', -label=>"Assign Roles to Selected PEGs"));
153      push(@$html,$cgi->hr,$cgi->br,$cgi->br);      push(@$html,$cgi->hr,$cgi->br,$cgi->br);
154    
155      push(@$html,&HTML::make_table($col_hdrs,$tab2,"PEGs NOT in Subsystem with MATCHING Functions"));      push(@$html,&HTML::make_table($col_hdrs2,$tab2,"PEGs NOT in Subsystem with MATCHING Functions"));
156  }  }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3