[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.12, Sun Dec 31 23:30:44 2006 UTC revision 1.13, Sun Dec 31 23:45:17 2006 UTC
# Line 135  Line 135 
135  #   my @raw_output = &FIG::run_gathering_output("$FIG_Config::bin/check_subsystems", $subsys);  #   my @raw_output = &FIG::run_gathering_output("$FIG_Config::bin/check_subsystems", $subsys);
136  #   warn "Got raw output @raw_output\n";  #   warn "Got raw output @raw_output\n";
137      my @checked = map { chop; [split(/\t/,$_)] } @raw_output;      my @checked = map { chop; [split(/\t/,$_)] } @raw_output;
138    
139      # RAE: it only makes sense to have Assign Role in column 1, so I duplicate this instead of leaving the column empty. Blah.      # RAE: it only makes sense to have Assign Role in column 1, so I duplicate this instead of leaving the column empty. Blah.
140      $col_hdrs1 = ["PEG","Function","Role","Assign Role","Other Subsystems","Genome"];      $col_hdrs1 = ["PEG","Function","Role","Assign Role","Other Subsystems","Genome"];
141      $col_hdrs2 = ["PEG","Function","Role","Other Subsystems","Genome"];      $col_hdrs2 = ["PEG","Function","Role","Other Subsystems","Genome"];
# Line 145  Line 146 
146      {      {
147          if ($x->[1] =~ /^(mismatch|left-out)/)          if ($x->[1] =~ /^(mismatch|left-out)/)
148          {          {
149                next if (! $fig->is_real_feature($x->[2]));
150              my(undef,$code,$peg,$func,$role,$gs) = @$x;              my(undef,$code,$peg,$func,$role,$gs) = @$x;
151              #RAE added the other subsystems column to the table              #RAE added the other subsystems column to the table
152              my $othersubsys='';              my $othersubsys='';
# Line 179  Line 181 
181    
182      push(@$html,&HTML::make_table($col_hdrs2,$tab2,"PEGs NOT in Subsystem with MATCHING Functions"));      push(@$html,&HTML::make_table($col_hdrs2,$tab2,"PEGs NOT in Subsystem with MATCHING Functions"));
183      push(@$html,$cgi->end_form);      push(@$html,$cgi->end_form);
184    
185        my $col_hdrs3 = ['Genome','Genus and Species','Possible Variant Codes','Detected Roles'];
186        my $tab3      = [];
187        my @to_add = grep { $_->[1] eq 'maybe-add' } @checked;
188    
189        my($entry,$vcodes,$genome,$gs,@roles);
190        foreach $entry (sort { &sort_order($a->[3],$b->[3]) } @to_add)
191        {
192            (undef,undef,undef,$vcodes,$genome,$gs,@roles) = @$entry;
193            push(@$tab3,[$genome,$gs,$vcodes,join("<br>",@roles)]);
194        }
195        push(@$html,&HTML::make_table($col_hdrs3,$tab3,"Genomes that Should Be Considered For Addition"));
196    }
197    
198    sub sort_order {
199        my($a,$b) = @_;
200    
201        my @c1 = split(/,/,$a);
202        my @c2 = split(/,/,$b);
203        return $c2[0] <=> $c1[0];
204  }  }
205    
206  sub get_check_data {  sub get_check_data {
# Line 187  Line 209 
209    
210      if ($cgi->param('fast') && (-e "$FIG_Config::data/Subsystems/$subsys/warnings"))      if ($cgi->param('fast') && (-e "$FIG_Config::data/Subsystems/$subsys/warnings"))
211      {      {
212          @raw_output = `$FIG_Config::data/Subsystems/$subsys/warnings`;          @raw_output = `cat $FIG_Config::data/Subsystems/$subsys/warnings`;
213      }      }
214      else      else
215      {      {

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3